public override void handle(LocalDevice localDevice, Address from, OctetString linkService) { // Check if we're in the device id range. if (limits != null) { uint localId = localDevice.Configuration.InstanceId; if (localId < limits.DeviceInstanceRangeLowLimit.Value || localId > limits.DeviceInstanceRangeHighLimit.Value) { return; } } // Check if we have the thing being looking for. BACnetObject result; if (@object.ContextId == 2) { ObjectIdentifier oid = (ObjectIdentifier)@object.Data; result = localDevice.GetObject(oid); } else if (@object.ContextId == 3) { string name = ((CharacterString)@object.Data).ToString(); result = localDevice.GetObject(name); } else { return; } if (result != null) { // Return the result in an i have message. IHaveRequest response = new IHaveRequest(localDevice.Configuration.Id, result.Id, result.RawObjectName); localDevice.sendGlobalBroadcast(response); } }
public override void handle(LocalDevice localDevice, Address from, OctetString linkService) { BACnetObject local = localDevice.Configuration; // Check if we're in the device id range. if (DeviceInstanceRangeLowLimit != null && local.InstanceId < DeviceInstanceRangeLowLimit.Value) { return; } if (DeviceInstanceRangeHighLimit != null && local.InstanceId > DeviceInstanceRangeHighLimit.Value) { return; } // Return the result in a i am message. //DCC - AdK //if(!localDevice.getDCCEnableDisable().equals(EnableDisable.disable)) { IAmRequest iam = localDevice.MakeIAmRequest(); localDevice.sendGlobalBroadcast(iam, true); //} }