Exemple #1
0
        public TxRequest16(XBeeAddress16 address16, byte[] data)
        {
            this.ApiID = XBeeApiType.TxRequest16;
            _address16 = address16;

            _value = data;
        }
Exemple #2
0
 public void ReadBytes(ByteReader br)
 {
     _address16      = XBeeAddress16.ReadBytes(br);
     _address64      = XBeeAddress64.ReadBytes(br);
     _signalStrength = br.ReadByte();
     _ni             = br.ReadString(terminationCharacter);
 }
 public ZNetTxStatusResponse(short length, ByteReader br)
     : base(length, br)
 {
     _address16       = XBeeAddress16.ReadBytes(br);
     _retryCount      = br.ReadByte();
     _deliveryStatus  = br.ReadByte();
     _discoveryStatus = br.ReadByte();
 }
Exemple #4
0
 public ZNetRxResponse(short length, ByteReader br)
     : base(length, br)
 {
     _address64 = XBeeAddress64.ReadBytes(br);
     _address16 = XBeeAddress16.ReadBytes(br);
     _options   = br.ReadByte();
     _value     = br.ReadBytes(length - 12);
 }
Exemple #5
0
 public RxResponse16(short length, ByteReader br)
     : base(length, br)
 {
     _address16 = XBeeAddress16.ReadBytes(br);
     _rssi      = br.ReadByte();
     _options   = br.ReadByte();
     _value     = br.ReadBytes(length - 5);
 }
Exemple #6
0
        public ZNetTxRequest(XBeeAddress64 address64, XBeeAddress16 address16, byte[] data)
        {
            this.ApiID = XBeeApiType.ZNetTxRequest;
            _address64 = address64;
            _address16 = address16;

            _value = data;
        }
 public ZNetTxRequest(XBeeAddress64 address64, XBeeAddress16 address16, byte broadcastRadius, byte options, byte[] value)
 {
     this.ApiID       = XBeeApiType.ZigBeeTransmitRequest;
     _address64       = address64;
     _address16       = address16;
     _broadcastRadius = broadcastRadius;
     _options         = options;
     _value           = value;
 }
 public ExplicitZigBeeCommand(XBeeAddress64 address64, XBeeAddress16 address16, byte sourceEndpoint, byte destinationEndpoint, ushort clusterId, ushort profileId, byte[] payload)
     : base(XBeeApiType.ExplicitAddressingZigBeeCommandFrame)
 {
     DestinationAddress64 = address64;
     DestinationAddress16 = address16;
     SourceEndpoint       = sourceEndpoint;
     DestinationEndpoint  = destinationEndpoint;
     ClusterId            = clusterId;
     ProfileId            = profileId;
     Payload = payload;
 }
Exemple #9
0
        public RemoteAtRequest(XBeeAddress64 address64, XBeeAddress16 address16, bool applyChanges, string command, byte[] value)
            : base(command, value)
        {
            this.ApiID = XBeeApiType.RemoteAtCommandRequest;
            _address64 = address64;
            _address16 = address16;

            if (applyChanges)
            {
                _options = 0x02;
            }
        }
Exemple #10
0
 public ExplicitZigBeeResponse(short length, ByteReader br)
     : base(length, br)
 {
     SourceAddress64     = XBeeAddress64.ReadBytes(br);
     SourceAddress16     = XBeeAddress16.ReadBytes(br);
     SourceEndpoint      = br.ReadByte();
     DestinationEndpoint = br.ReadByte();
     ClusterId           = br.ReadUInt16();
     ProfileId           = br.ReadUInt16();
     Options             = br.ReadByte();
     Payload             = br.GetAvailableBytes();
 }
Exemple #11
0
        public void ReadBytes(ByteReader br)
        {
            _address16 = XBeeAddress16.ReadBytes(br);
            _address64 = XBeeAddress64.ReadBytes(br);

            _ni = br.ReadString(terminationCharacter);

            _parent16      = XBeeAddress16.ReadBytes(br);
            _deviceType    = br.ReadByte();
            _status        = br.ReadByte();
            _profileID     = br.ReadUInt16();
            _manufactureID = br.ReadUInt16();
        }
Exemple #12
0
        public XBeeSensorRead(short length, ByteReader br)
            : base(length, br)
        {
            _address64 = XBeeAddress64.ReadBytes(br);
            _address16 = XBeeAddress16.ReadBytes(br);

            _options = br.ReadByte();

            _sensors = br.ReadByte();

            _sensorA = br.ReadUInt16();
            _sensorB = br.ReadUInt16();
            _sensorC = br.ReadUInt16();
            _sensorD = br.ReadUInt16();

            _temperature = br.ReadUInt16();
        }
        public ZNetNodeIdentificationResponse(short length, ByteReader br)
            : base(length, br)
        {
            _address64 = XBeeAddress64.ReadBytes(br);
            _address16 = XBeeAddress16.ReadBytes(br);

            _options = br.ReadByte();

            _addressNode16 = XBeeAddress16.ReadBytes(br);
            _addressNode64 = XBeeAddress64.ReadBytes(br);

            _ni = br.ReadString((byte)0x00);            // TODO: verfiy if this is correct?!

            _parent16      = XBeeAddress16.ReadBytes(br);
            _deviceType    = br.ReadByte();
            _status        = br.ReadByte();
            _profileID     = br.ReadUInt16();
            _manufactureID = br.ReadUInt16();
        }
Exemple #14
0
        public ZNetRxIoSampleResponse(short length, ByteReader br)
            : base(length, br)
        {
            _address64 = XBeeAddress64.ReadBytes(br);
            _address16 = XBeeAddress16.ReadBytes(br);

            _options = br.ReadByte();

            _numSamples          = br.ReadByte();
            _digitalChannelMask1 = br.ReadByte();
            _digitalChannelMask2 = br.ReadByte();
            _analogChannelMask   = br.ReadByte();

            if (_digitalChannelMask1 != 0x00 || _digitalChannelMask2 != 0x00)
            {
                _digital1 = br.ReadByte();
                _digital2 = br.ReadByte();
            }

            if (_analogChannelMask != 0x00)
            {
                if ((_analogChannelMask & 0x01) == 0x01)
                {
                    _AD0 = br.ReadUInt16();
                }
                if ((_analogChannelMask & 0x02) == 0x02)
                {
                    _AD1 = br.ReadUInt16();
                }
                if ((_analogChannelMask & 0x04) == 0x04)
                {
                    _AD2 = br.ReadUInt16();
                }
                if ((_analogChannelMask & 0x08) == 0x08)
                {
                    _AD3 = br.ReadUInt16();
                }
                if ((_analogChannelMask & 0x80) == 0x80)
                {
                    _supplyVoltage = br.ReadUInt16();
                }
            }
        }
        public RemoteAtResponse(short length, ByteReader br)
            : base(length, br)
        {
            _address64 = XBeeAddress64.ReadBytes(br);
            _address16 = XBeeAddress16.ReadBytes(br);

#if (MF)
            _command = ByteUtil.GetString(br.ReadBytes(2));
#elif (WindowsCE)
            byte[] tempArr = br.ReadBytes(2);
            _command = Encoding.ASCII.GetString(tempArr, 0, tempArr.Length);
#else
            _command = Encoding.ASCII.GetString(br.ReadBytes(2));
#endif

            _status = br.ReadByte();

            if (br.AvailableBytes > 0)
            {
                _value = br.ReadBytes(length - 14);
            }
        }
Exemple #16
0
 public RemoteAtRequest(XBeeAddress64 address64, XBeeAddress16 address16, AtCommand cmd)
     : this(address64, address16, true, cmd)
 {
 }
Exemple #17
0
 public RemoteAtRequest(XBeeAddress16 address16, string command)
     : this(XBeeAddress64.BROADCAST, address16, true, command, new byte[0])
 {
 }
Exemple #18
0
 public RemoteAtRequest(XBeeAddress64 address64, XBeeAddress16 address16, bool applyChanges, AtCommand cmd)
     : this(address64, address16, applyChanges, cmd.Command, cmd.Value)
 {
 }