public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true) : base(command, value) { RemoteAddress64 = remoteSerial; RemoteAddress16 = remoteAddress; ApplyChanges = applyChanges; }
public void OpenGate(byte[] gateAddress) { var address = new XBeeAddress64(gateAddress); _api.BeginSend(new RemoteAtCommand(lockPort, address, powerOnCommand)); Thread.Sleep(2000); _api.BeginSend(new RemoteAtCommand(lockPort, address, powerOffCommand)); }
public XBeeAddress64 ParseAddress64() { var addr = new XBeeAddress64(); for (var i = 0; i < 8; i++) { addr[i] = Read("64-bit Address byte " + i); } return(addr); }
public override void Parse(IPacketParser parser) { FrameId = parser.Read("Frame Id"); RemoteSerial = parser.ParseAddress64(); RemoteAddress = parser.ParseAddress16(); Command = UshortUtils.ToUshort( parser.Read("AT Response Char 1"), parser.Read("AT Response Char 2")); Status = (AtResponseStatus) parser.Read("AT Response Status"); Value = parser.ReadRemainingBytes(); }
public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, byte[] value = null, bool applyChanges = true) : this(command, remoteSerial, XBeeAddress16.Unknown, value, applyChanges) { }
public RemoteAtCommand(string command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true) : this(UshortUtils.FromAscii(command), remoteSerial, remoteAddress, value, applyChanges) { }
public XBeeAddress64 ParseAddress64() { var addr = new XBeeAddress64(); for (var i = 0; i < 8; i++) addr[i] = Read("64-bit Address byte " + i); return addr; }