public void SendRequest(DeviceRequest request) { lock (((ICollection)listRequest)) { listRequest.Enqueue(request); eventRequest.Set(); } }
public DeviceRequest SetTime() { DateTime dt = DateTime.Now; byte year = Convert.ToByte(dt.Year - 2000); byte month = Convert.ToByte(dt.Month); byte day = Convert.ToByte(dt.Day); byte hour = Convert.ToByte(dt.Hour); byte minute = Convert.ToByte(dt.Minute); byte seconds = Convert.ToByte(dt.Second); List <byte> bytes = new List <byte>(); bytes.Add(year); bytes.Add(month); bytes.Add(day); bytes.Add(hour); bytes.Add(minute); bytes.Add(seconds); byte[] timeData = bytes.ToArray(); DeviceRequest req = new DeviceRequest(0x82, timeData); return(req); }
public DeviceRequest ReadDeviceInformation(int timeOut) { DeviceRequest req = new DeviceRequest(0x91, new byte[] { }); return req; }
public DeviceRequest ReadChannelInformation(byte channelId) { DeviceRequest req = new DeviceRequest(0x93, new byte[] { channelId }); return req; }
public DeviceRequest GetVersionInformation(int timeOut) { DeviceRequest req = new DeviceRequest(0x97, new byte[] { }); return req; }
public DeviceRequest GetVersionInformation(int timeOut) { DeviceRequest req = new DeviceRequest(0x97, new byte[] { }); return(req); }
public DeviceRequest WriteChannelInfo(byte[] RequestData) { DeviceRequest req = new DeviceRequest(0x83, RequestData); return req; }
//设置量程 public DeviceRequest SetSpan(byte channelId, byte gearvalue, int timeOut) { DeviceRequest req = new DeviceRequest(0x84, new byte[] { channelId,gearvalue }); return req; }
public DeviceRequest Reset() { DeviceRequest req2 = new DeviceRequest(0x86, new byte[] { }); return req2; }
public DeviceRequest SetSpan(byte channelId, byte gearvalue, int timeOut) //设置量程 { DeviceRequest req = new DeviceRequest(0x84, new byte[] { channelId, gearvalue }); return(req); }
public DeviceRequest ReadChannelInformation(byte channelId) { DeviceRequest req = new DeviceRequest(0x93, new byte[] { channelId }); return(req); }
public DeviceRequest ReadLastTime() { DeviceRequest req = new DeviceRequest(0x92, new byte[] { 1 }); return(req); }
public DeviceRequest WriteChannelInfo(byte[] RequestData) { DeviceRequest req = new DeviceRequest(0x83, RequestData); return(req); }
public DeviceRequest GetTimeNow() { DeviceRequest req = new DeviceRequest(0x92, new byte[] { 0 }); return(req); }
public DeviceRequest ReadDeviceInformation(int timeOut) { DeviceRequest req = new DeviceRequest(0x91, new byte[] { }); return(req); }
public DeviceRequest ReadLastTime() { DeviceRequest req = new DeviceRequest(0x92, new byte[] { 1 }); return req; }
public DeviceRequest ReadSpan(byte channelid) { DeviceRequest req2 = new DeviceRequest(0x94, new byte[]{channelid}); return req2; }
public DeviceRequest ReadSpan(byte channelid) { DeviceRequest req2 = new DeviceRequest(0x94, new byte[] { channelid }); return(req2); }
public DeviceRequest Reset() { DeviceRequest req2 = new DeviceRequest(0x86, new byte[] { }); return(req2); }
public DeviceRequest SetTime() { DateTime dt = DateTime.Now; byte year = Convert.ToByte(dt.Year - 2000); byte month = Convert.ToByte(dt.Month); byte day = Convert.ToByte(dt.Day); byte hour = Convert.ToByte(dt.Hour); byte minute = Convert.ToByte(dt.Minute); byte seconds = Convert.ToByte(dt.Second); List<byte> bytes = new List<byte>(); bytes.Add(year); bytes.Add(month); bytes.Add(day); bytes.Add(hour); bytes.Add(minute); bytes.Add(seconds); byte[] timeData = bytes.ToArray(); DeviceRequest req = new DeviceRequest(0x82, timeData); return req; }
public DeviceRequest GetTimeNow() { DeviceRequest req = new DeviceRequest(0x92, new byte[] { 0}); return req; }
public DeviceRequest WriteDeviceInformation(byte[] cmdlist, int timeOut) { DeviceRequest req = new DeviceRequest(0x81, cmdlist); return req; }
public DeviceRequest WriteDeviceInformation(byte[] cmdlist, int timeOut) { DeviceRequest req = new DeviceRequest(0x81, cmdlist); return(req); }