Property selection and write protection
This example shows how properties of BACnet objects can be write-protected. Furthermore, the example shows how unneeded properties can be removed from objects.
By default, all properties (which may be writeable according to the BACnet standard) are executed as writeable. All properties possible in the respective object type are also included.
Properties that are to be read-only are listed in the array aWriteProtected
. Properties that are not used and thus should be removed from the object are listed in the array aDisabled
.
Related properties (these are marked in the standard with a footnote of the same name) must be present in their entirety or removed in their entirety. In the example below, the properties |
Variables
fbBi : FB_BACnet_BI := (
sObjectName := 'Example Binary Input Object',
sDescription := 'Objectname and Description properties are read-only',
stSettings := (
aDisabled := [
E_BACnetPropIdentifier.PropChangeOfStateCount,
E_BACnetPropIdentifier.PropChangeOfStateTime,
E_BACnetPropIdentifier.PropTimeOfStateCountReset
],
aWriteProtected := [
E_BACnetPropIdentifier.PropObjectName,
E_BACnetPropIdentifier.PropDescription
]
)
);
Code
fbBi();