예제 #1
0
 protected void Init()
 {
     ExpectedResponse   = Response.Single;
     TimeoutValue       = PacketParser.DefaultParseTimeout;
     DestinationAddress = null;
     DestinationNode    = null;
     Filter             = null;
 }
예제 #2
0
 /// <summary>
 /// Reads remote module basic information
 /// </summary>
 /// <param name="sender">XBee module that will send AT command to remote target</param>
 /// <param name="remoteXbee">XBee module which infomation will be retrieved</param>
 /// <returns>Remote XBee basic infomation</returns>
 public static XBeeConfiguration Read(XBeeApi sender, XBeeAddress remoteXbee)
 {
     return(new XBeeConfiguration(sender, remoteXbee)
     {
         ApiMode = Common.ApiMode.Read(sender, remoteXbee),
         HardwareVersion = Common.HardwareVersion.Read(sender, remoteXbee),
         Firmware = Common.Firmware.Read(sender, remoteXbee),
         SerialNumber = Common.SerialNumber.Read(sender, remoteXbee),
         NodeIdentifier = Common.NodeIdentifier.Read(sender, remoteXbee)
     });
 }
예제 #3
0
 public bool Equals(XBeeAddress other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Arrays.AreEqual(other.Address, Address));
 }
예제 #4
0
 public IRequest ToAll()
 {
     DestinationAddress = XBeeAddress64.Broadcast;
     return(this);
 }
예제 #5
0
 public IRequest To(XBeeAddress destination)
 {
     DestinationAddress = destination;
     return(this);
 }
예제 #6
0
 public IRequest To(ulong serialNumber)
 {
     DestinationAddress = new XBeeAddress64(serialNumber);
     return(this);
 }
예제 #7
0
 public IRequest To(ushort networkAddress)
 {
     DestinationAddress = new XBeeAddress16(networkAddress);
     return(this);
 }
예제 #8
0
 private XBeeConfiguration(XBeeApi xbee, XBeeAddress remoteXbee = null)
 {
     _xbee       = xbee;
     _remoteXbee = remoteXbee;
 }