BACnetConstructDevice (FUN)ΒΆ
FUNCTION BACnetConstructDevice : IEC_BACNET_STATUS
Creates a local device in the BACnet server database.
This function will construct an device object in the local server database. The application has to provide a list with correctly initialized property values. The maximum number of objects that may be stored in a local device is specified at device creation.
Return: IEC_BACNET_STATUS
- InOut:
Scope
Name
Type
Comment
Return
BACnetConstructDevice
Input
instNumber
The Device object instance number of the Device.
pAddress
POINTER TO IEC_BACNET_ADDRESS
A pointer to a BACnetAddress structure which has to be initialized by the user application. If the device shall be bound to an specified datalink, the network number in the address structure has to be one of the configured datalink network numbers and the length shall be the ::BACNET_MAC_BROADCAST_LENGTH. If a special binding is not required the network number in the address structure shall be set to ::BACNET_NETWORK_LOCAL. Upon successful creation this will be filled with the BACnet MAC address under which the device will be reachable.
propList
POINTER TO IEC_BACNET_PROPERTY_INSTANCE
Points to the device object description with the property list including their initial values along with additional flags determining default actions for each property. First property in the list shall be object-identifier. Values of object-identifier and object-name properties shall be unique inside of each device.
propCount
Count of property instances in the array of property instances.
pError
POINTER TO IEC_BACNET_ERROR
Points to memory to store additional error information in case of any error. Can be NULL if user is not interested to get this information.
pnFirstFailedIdx
POINTER TO IEC_BACNET_PROPERTY_COUNT
Points to memory to store the index in the list of property instances which has failed to be stored in the objects database. Can be NULL if user is not interested to get this information.
maxNumberOfObjects
Specifies the maximum number of objects which may be created in this device. If no limit checking is required set this parameter to 0.