LimitDeviceObjectPropertyReferencesToCertainTypes (FB)¶
FUNCTION_BLOCK LimitDeviceObjectPropertyReferencesToCertainTypes EXTENDS BACnet.BACnetServerPluginBase IMPLEMENTS BACnet.IBACnetEventConsumer
Default implementation to limit properties of type CmpBACnet.IEC_BACNET_DATA_TYPE.DATA_TYPE_DEV_OBJ_PROP_REFERENCE to refer to properties of selected value types (BOOLEAN, UNSIGNED, SIGNED, REAL, ENUMERATED, BIT_STRING) only.
This default implementation registers a write callback and rejects property write requests with inappropriate value types. BACnetServer.RWPropCBComplete needs to be 0 to ensure the write callback gets called prior modification (not after - RWPropCBComplete = 1). In case BACnetServer.RWPropCBComplete = 1 this default implementation rejects to register itself.
LimitDeviceObjectPropertyReferencesToCertainTypes also checks client created objects for the same rules. This requires to be informed about client create object requests processed already, so LimitDeviceObjectPropertyReferencesToCertainTypes registers a (client) create object service application hook to watch client create object requests processed already from another BACnetServer-plugin (eventually). To ensure this technique can work you have to register LimitDeviceObjectPropertyReferencesToCertainTypes after the BACnetServer-plugin taking care for client create object requests (lets call it the “object producer” - see ClientCreatableObjects) and to ensure LimitDeviceObjectPropertyReferencesToCertainTypes.BACnetEventCallback gets called (see ClientCreatableObjects.BlockFurtherProcessing:=FALSE) because the the “object producer” doesn’t block processing further down the line (eventually setting it’s return value of BACnetEventCallback to TRUE).
Actual limitation: works for Trend_Log object, not for Trend_Log_Multiple yet, because Trend_Log_Multiple.Log_DeviceObjectProperty is BACnetARRAY[N] of BACnetDeviceObjectPropertyReference.
Properties:
Methods:
Structure: