public void WhoIs(UInt16 startAddress = UInt16.MinValue, UInt16 endAddress = UInt16.MaxValue, int timeOut = 1000) { var apdu = new WhoIs(startAddress, endAddress); var npdu = new BacNetIpNpdu(); npdu.Destination = new BacNetAddress(); npdu.Destination.Network = ByteConverter.GetBytes((ushort)65535); BacNetDevice.Instance.Services.Execute(npdu, apdu); //WaitForResponce(); }
public void ReceivedWhoIs(BacNetRawMessage msg) { WhoIs apdu = new WhoIs(msg.Apdu); uint devId = BacNetDevice.Instance.DeviceId; if ((apdu.LowLimit != null && apdu.HighLimit != null && apdu.LowLimit.Value < devId && apdu.HighLimit.Value > devId) || (apdu.LowLimit == null || apdu.HighLimit == null)) BacNetDevice.Instance.Services.Unconfirmed.IAm(); }