Beispiel #1
0
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : base(command, value)
 {
     RemoteAddress64 = remoteSerial;
     RemoteAddress16 = remoteAddress;
     ApplyChanges = applyChanges;
 }
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : base(command, value)
 {
     RemoteAddress64 = remoteSerial;
     RemoteAddress16 = remoteAddress;
     ApplyChanges    = applyChanges;
 }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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();
        }
Beispiel #6
0
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, byte[] value = null, bool applyChanges = true)
     : this(command, remoteSerial, XBeeAddress16.Unknown, value, applyChanges)
 {
 }
Beispiel #7
0
 public RemoteAtCommand(string command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : this(UshortUtils.FromAscii(command), remoteSerial, remoteAddress, value, applyChanges)
 {
 }
Beispiel #8
0
        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 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)
 {
 }