コード例 #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;
 }
コード例 #2
0
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : base(command, value)
 {
     RemoteAddress64 = remoteSerial;
     RemoteAddress16 = remoteAddress;
     ApplyChanges    = applyChanges;
 }
コード例 #3
0
ファイル: XBeeConnector.cs プロジェクト: johnnybegood/Minnox
        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));
        }
コード例 #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);
        }
コード例 #5
0
        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();
        }
コード例 #6
0
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, byte[] value = null, bool applyChanges = true)
     : this(command, remoteSerial, XBeeAddress16.Unknown, value, applyChanges)
 {
 }
コード例 #7
0
 public RemoteAtCommand(string command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : this(UshortUtils.FromAscii(command), remoteSerial, remoteAddress, value, applyChanges)
 {
 }
コード例 #8
0
ファイル: PacketParser.cs プロジェクト: jamespettigrew/GBee
        public XBeeAddress64 ParseAddress64()
        {
            var addr = new XBeeAddress64();

            for (var i = 0; i < 8; i++)
                addr[i] = Read("64-bit Address byte " + i);

            return addr;
        }
コード例 #9
0
 public RemoteAtCommand(ushort command, XBeeAddress64 remoteSerial, byte[] value = null, bool applyChanges = true)
     : this(command, remoteSerial, XBeeAddress16.Unknown, value, applyChanges)
 {
 }
コード例 #10
0
 public RemoteAtCommand(string command, XBeeAddress64 remoteSerial, XBeeAddress16 remoteAddress, byte[] value = null, bool applyChanges = true)
     : this(UshortUtils.FromAscii(command), remoteSerial, remoteAddress, value, applyChanges)
 {
 }