using Bro.Common.Base; using Bro.Common.Helper; namespace Bro.Device.PointLaser_Omron { [Device("PointLaser_Omron", "欧姆龙点激光", EnumHelper.DeviceAttributeType.Device)] public class PointLaser_OmronDriver : TcpClientWrapBase { public bool TriggerOnce(out double result, out string msg) { result = -999; msg = ""; if (WriteAndRead("MS\r\n", out msg, out string reply, true)) { if (double.TryParse(reply, out result)) { result = result * (InitialConfig as PointLaser_OmronInitialConfig).DataRatio; return true; } return false; } else { return false; } } } }