BACnetCloseServerEtc ¶ Functions for directly accessing BACnet close server functionalities of the BACnet component on the runtime system. BACnetClose (Function)
BACnetClose (FUN) ¶ FUNCTION BACnetClose : IEC_BACNET_STATUS Closes a BACnet application Stops any device access and releases any resources used by the API. No other BACnet API functions should be called after this function has benn called. This function shall be called before the application completes it’s execution to release any resources the API has used. Return: IEC_BACNET_STATUS InOut: Scope Name Type Return BACnetClose IEC_BACNET_STATUS
BACnetCopyPropertyContents (FUN) ¶ FUNCTION BACnetCopyPropertyContents : IEC_BACNET_STATUS Copies a property contents buffer. Some usefull function for copying property contents buffer. To use this function all the pointers inside data structures in source property contents needs to reside within the given buffer size. If you get an property contents from stack API (hook or callback) this is guaranteed.n If pointers are not arranged this way the function will return an error. Memory for the destination contents will be allocated if it is initialized with pointer NULL and size 0 by the user application. In this case it has to be freed with a call to ::BACnetFreeStackAllocatedMemory after use. Return: IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetCopyPropertyContents IEC_BACNET_STATUS Input pDest POINTER TO IEC_BACNET_PROPERTY_CONTENTS A pointer to the destination property contents structure. pSource POINTER TO IEC_BACNET_PROPERTY_CONTENTS A pointer to the source property contents structure which is to copy. bCopyRawBufferToo IEC_BACNET_BOOLEAN If set to True the RAW-Buffer of the source property contents buffer which holds the ASN1 encoding of the data will also be copied into the destination contents.
BACnetRegisterObjectIdNameBindingsChangeCallback (FUN) ¶ FUNCTION BACnetRegisterObjectIdNameBindingsChangeCallback : IEC_BACNET_STATUS Registers a callback for object identifier changes on dynamic object bindings. With this callback a user application gets informed about any detected object changes or finished object resolutions which were pending and have completed now. This callback is only called on successful object resolutions or changes. It won’t be called on expired retries or timeouts for an pending resolution. Return: IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetRegisterObjectIdNameBindingsChangeCallback IEC_BACNET_STATUS Input pICallback CmpEventMgr.ICmpEventCallback Pointer to the event-callback interface. Event-callback argument type is EVT_BACNET_OBJECT_ID_CHANGE . Purpose documented in BACstack: A pointer to the callback function to register.
BACnetRegisterTimeProviderFunction (FUN) ¶ FUNCTION BACnetRegisterTimeProviderFunction : IEC_BACNET_STATUS Registers a user application callback to provide the BACnet API with correct system clock or system time information. The user application gives the BACnet API the opportunity to request a valid system clock or system time on such OS plattforms which do not provide them in the standard funktions linke time() or gettimeofday(). The user application, on the other side, has so the opportunity to “simulate” the system clock or system time.n Please keep in mind that this callback might be called very often by the BACnet API if there are many time related actions configured. InOut: Scope Name Type Comment Return BACnetRegisterTimeProviderFunction IEC_BACNET_STATUS Input pICallback CmpEventMgr.ICmpEventCallback Pointer to the event-callback interface. Event-callback argument type is EVT_BACNET_OS_TIME_PROVIDER . Purpose documented in BACstack: A pointer to the user application callback function. A null pointer can be used to unregister the callback and use the default implementation.
BACnetSendDeviceRestartNotification (FUN) ¶ FUNCTION BACnetSendDeviceRestartNotification : IEC_BACNET_STATUS Sends the device restart notification to all recipients for the given device instance. Return: IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetSendDeviceRestartNotification IEC_BACNET_STATUS Input instNumber IEC_BACNET_INST_NUMBER The Device object instance number of the Device for which the restart notifications will be sent. A value of 0xFFFFFFFF will send restart notifications for all devices.
BACnetSendNetworkManagementMessage (FUN) ¶ FUNCTION BACnetSendNetworkManagementMessage : IEC_BACNET_STATUS Gives the user application the ability to send network management messages. The purpose of the BACnet network layer is to provide the means by which messages can be relayed from one BACnet network to another, regardless of the BACnet data link technology in use on that network. Whereas the data link layer provides the capability to address messages to a single device or broadcast them to all devices on the local network, the network layer allows messages to be directed to a single remote device, broadcast on a remote network, or broadcast globally to all devices on all networks. A BACnet Device is uniquely located by a network number and a MAC address.nn For detailed descritions of usage of this function look under ::BACNET_NETWORK_MANAGEMENT_MESSAGE and consult chapter 6 “THE NETWORK LAYER” from ANSI/ASHRAE Standard 135-2012. Return: IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetSendNetworkManagementMessage IEC_BACNET_STATUS Input pSourceAddress POINTER TO IEC_BACNET_ADDRESS If the BACnet application has only one device constructed and installed, this can be NULL. In this case the MAC address of this device will be used. Otherwise this shall be the MAC address returned on device object construction. pDestinationAddress POINTER TO IEC_BACNET_ADDRESS This is the MAC address of the device to which the request should be sent. pMessage POINTER TO IEC_BACNET_NETWORK_MANAGEMENT_MESSAGE The network management message to send to an specified device or as broadcast.
BACnetSetBACstackTaskPriority (FUN) ¶ FUNCTION BACnetSetBACstackTaskPriority : IEC_BACNET_STATUS Set the task priority of the BACstack process task. The BACstack process task priority can be configured in CODESYScontrol.cfg, section [CmpBACnet] entry TaskPrio. To support configuration of this task priority from either project object tree or user application BACnetSetBACstackTaskPriority can be used prior to starting the BACnet server. Setting the task priority using BACnetSetBACstackTaskPriority does have precedence over the value configured in CODESYScontrol.cfg. InOut: Scope Name Type Return BACnetSetBACstackTaskPriority IEC_BACNET_STATUS Input taskPrio UDINT
BACnetSetCallback (FUN) ¶ FUNCTION BACnetSetCallback : IEC_BACNET_STATUS Sets or deletes the read and write callback. Registers an application callbacks to be called when the API default actions processes an read or write access to some property. The callbacks are intended to update the value in the database when the value is accessed from the network or by internal processes in the API, thus providing the new value in the read callback or storing the value in the write callback. This routine can be called multiple times in order to reregister the callback procedure or even deregister it with a 0 pointer. InOut: Scope Name Type Comment Return BACnetSetCallback IEC_BACNET_STATUS A status indicating whether the operation worked. Input eCallbackType IEC_BACNET_CALLBACK_TYPE The type of callback the user application want’s to register or unregister. pICallback CmpEventMgr.ICmpEventCallback The event-callback interface which is to be registered or unregistered. pIReleaseCallback CmpEventMgr.ICmpEventCallback Event-callback interface which notifies user application that it may release the buffer provided for the read callback value transfer. May be 0 if this service is not needed.
BACnetDeviceAddressToInstNumber (FUN) ¶ FUNCTION BACnetDeviceAddressToInstNumber : IEC_BACNET_STATUS Retrieves the device instance number for a given BACnet MAC address. This function retrieves the device instnac number for a given BACnet MAC address. The API searches in the local device database in the server API, in the dynamic address binding list and in the ‘Address_Binding’ property of local constructed device objects in the server API database. Return: IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetDeviceAddressToInstNumber IEC_BACNET_STATUS Input pAddress POINTER TO IEC_BACNET_ADDRESS A pointer with a valid BACnet MAC address for which the device instance number should be retrieved. pInstNumber POINTER TO IEC_BACNET_INST_NUMBER A pointer to store the device instance number for the requested BACnet MAC address.