CmpBACnet Library Documentation ¶ Company 3S - Smart Software Solutions GmbH Title CmpBACnet Version 3.5.18.0 Categories System|SysLibs Namespace CmpBACnet Author 3S - Smart Software Solutions GmbH Placeholder CmpBACnet Description 1 ¶ CmpBACnet library is the library corresponding to CmpBACnet runtime component. Contents: ¶ BACnetAsyncTransactionToken (Struct) BACnetClientAPI BACnetAcknowledgeAlarm (Function) BACnetAddListElement (Function) BACnetCancelPendingConfirmedRequest (Function) BACnetConfPrivateTransfer (Function) BACnetConfTextMessage (Function) BACnetCreateObject (Function) BACnetCreateObjectResult (Struct) BACnetDeleteObject (Function) BACnetDeviceCommControl (Function) BACnetGetAlarmSummary (Function) BACnetGetEnrollmentSummary (Function) BACnetGetEventInfo (Function) BACnetLifeSafetyOperation (Function) BACnetReadAllPropertyDataContents (Function) BACnetReadFile (Function) BACnetReadProperty (Function) BACnetReadPropertyMultiple (Function) BACnetReadRange (Function) BACnetReinitializeDevice (Function) BACnetRemoveListElement (Function) BACnetSubscribeCOV (Function) BACnetSubscribeCOVProperty (Function) BACnetUnconfPrivateTransfer (Function) BACnetUnconfTextMessage (Function) BACnetWhoHas (Function) BACnetWhoIs (Function) BACnetWriteFile (Function) BACnetWriteGroup (Function) BACnetWriteProperty (Function) BACnetWritePropertyMultiple (Function) advanced Indices and tables ¶ 1 Based on CmpBACnet.library, last modified 01.04.2022, 08:11:46. LibDoc 4.4.0.0-b.27 The content file CmpBACnet.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 01.04.2022, 08:11:46.
BACnetClientAPI ¶ Functions for directly accessing BACnet client functionalities of the BACnet component on the runtime system. BACnetAcknowledgeAlarm (Function) BACnetAddListElement (Function) BACnetCancelPendingConfirmedRequest (Function) BACnetConfPrivateTransfer (Function) BACnetConfTextMessage (Function) BACnetCreateObject (Function) BACnetCreateObjectResult (Struct) BACnetDeleteObject (Function) BACnetDeviceCommControl (Function) BACnetGetAlarmSummary (Function) BACnetGetEnrollmentSummary (Function) BACnetGetEventInfo (Function) BACnetLifeSafetyOperation (Function) BACnetReadAllPropertyDataContents (Function) BACnetReadFile (Function) BACnetReadProperty (Function) BACnetReadPropertyMultiple (Function) BACnetReadRange (Function) BACnetReinitializeDevice (Function) BACnetRemoveListElement (Function) BACnetSubscribeCOV (Function) BACnetSubscribeCOVProperty (Function) BACnetUnconfPrivateTransfer (Function) BACnetUnconfTextMessage (Function) BACnetWhoHas (Function) BACnetWhoIs (Function) BACnetWriteFile (Function) BACnetWriteGroup (Function) BACnetWriteProperty (Function) BACnetWritePropertyMultiple (Function) advanced BACnetBackupBACnetDevice (Function) BACnetCloseClientCustomer (Function) BACnetGetClientDeviceCommunication (Function) BACnetOpenClientCustomer (Function) BACnetRegisterClientCommunicationStateCallback (Function) BACnetRegisterClientDataPoint (Function) BACnetRegisterClientEventNotification (Function) BACnetRegisterClientUnsubscribeCompletionCallback (Function) BACnetRestartAllClients (Function) BACnetRestoreBACnetDevice (Function) BACnetSetClientDeviceCommunication (Function) BACnetSetClientDeviceFixAddress (Function) BACnetSetClientDeviceFixSubscribeCovTime (Function) BACnetSetClientGlobalCommTimingParameters (Function) BACnetSetClientGlobalMaxDeviceActions (Function) BACnetUnregisterClientDataPoint (Function) BACnetUnregisterClientEventNotification (Function)
BACnetAsyncTransactionToken (STRUCT) ¶ TYPE BACnetAsyncTransactionToken : STRUCT A transaction token for BACnet “asynchronous calls”. For all “asynchronous calls” there is a callback in CODESYS runtime component CmpBACnet, which get’s called asynchronously after the IEC-code has startet the “asynchronous call”. This had been chosen as the best solution to avoid the complexitity of handling those callbacks via “IEC-Events”. The callback in CODESYS runtime component CmpBACnet sets a request status, which can be checked by the IEC-code, this mechanism is referenced as “caller status polling” later on. BACnetAsyncTransactionToken is used to identify transactions of “asynchronous calls” like BACnetReadProperty , and to allow BACnetCancelPendingConfirmedRequest if needed. BACnetAsyncTransactionToken transports a pointer to the request status, to allow “caller status polling”. The caller had to provide the memory pointed to by this pointer. InOut: Name Type Initial Comment transactionID UDINT 0 Unique ID to identify the transaction. Set the transactionID prio to the “asynchronous call”. Reset the transactionID to 0 after the “asynchronous call” is done or after a call to BACnetCancelPendingConfirmedRequest . pStatus POINTER TO IEC_BACNET_STATUS 0 Asynchronous Status of the call. If this value switches from IEC_BACNET_STATUS.BACNET_STATUS_BUSY to another state, for example IEC_BACNET_STATUS.BACNET_STATUS_OK , the asynchronous call has finished. callbackDone UDINT 0 internal information to keep track of transaction status cancelled UDINT 0 internal information to keep track of transaction status
BACnetAcknowledgeAlarm (FUN) ¶ FUNCTION BACnetAcknowledgeAlarm : IEC_BACNET_STATUS Sends an AcknowledgeAlarm request. Sends a message to the initiating device to acknowledge that the operator has seen and responded to the event notification that required the acknowledgment. This routine may acknowledge either Confirmed Event Notification or Unconfirmed Event Notification requests. This routine allows to control APDU properties like APDU length, segmentation and timeout for both request and response. This routine can execute asynchronously, i.e. this routine will return to the caller before the BACnet reply comes so that the application can keep running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_SIMPLE_ACK_COMPLETE_CB routine, which is provided by the BACnet application, shall be used to process this information. If a number of asynchronous requests are sent, the responses shall be queued and identified by the transaction handles. If the application does not supply the BACNET_SIMPLE_ACK_COMPLETE_CB routine, then the BACnetAcknowledgeAlarm routine sends a request and waits for reply. InOut: Scope Name Type Comment Return BACnetAcknowledgeAlarm IEC_BACNET_STATUS A status indicating if the operation worked. Input pSourceAddress POINTER TO IEC_BACNET_ADDRESS If the BACnet application has only one device constructed and installed, this can be 0. 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. pAckAlarmParams POINTER TO IEC_BACNET_ACK_ALARM_INFO A pointer to the memory block which contains a number of acknowledgement parameters: a process identifier to recognize a notification to which this acknowledgement is responding, an event object’s identifier, an event state, a time stamp to identify the event notification that is acknowledging, the identifier of operator or process that is acknowledging this event notification, and the time this acknowledgement was issued. pAPDUParams POINTER TO IEC_BACNET_APDU_PROPERTIES A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be 0. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request. pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken . pError POINTER TO IEC_BACNET_ERROR A pointer to a structure to hold BACnet Error information. pError may be 0 if the application isn’t interested in detailed error information.
BACnetAddListElement (FUN) ¶ FUNCTION BACnetAddListElement : IEC_BACNET_STATUS Sends an Add-List-Element request. Sends an Add-List-Element request to add one or more list elements to an object property which is a list. This routine sends Add-List-Element request using address instead of device handle to identify destination device. This routine allows to control APDU properties like APDU length and segmentation and timeout for both request and response. This routine can execute asynchronously, i.e. this routine will return to the caller before the BACnet reply comes so that the application can keep running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_CHANGE_LIST_COMPLETE_CB routine, which is provided by the BACnet application, shall be used to process this information. If a number of asynchronous service requests are sent, the responses shall be queued and identified by the transaction handles. If the application does not supply BACNET_CHANGE_LIST_COMPLETE_CB, then the BACnetAddListElement routine sends a request and waits for the reply. InOut: Scope Name Type Comment Return BACnetAddListElement IEC_BACNET_STATUS A status indicating if the operation worked. Input pSourceAddress POINTER TO IEC_BACNET_ADDRESS If the BACnet application has only one device constructed and installed, this can be 0. 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. pAddInfo POINTER TO IEC_BACNET_CHANGE_LIST_INFO A pointer to the service information data structure. This data structure contains the objectID, ePropertyID, nIndex and a buffer in which the Property Contents datatype list is placed. pAPDUParams POINTER TO IEC_BACNET_APDU_PROPERTIES A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be NULL. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request. pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken . pError POINTER TO IEC_BACNET_ERROR A pointer to a structure to hold BACnet Error information. pError may be 0 if the application isn’t interested in detailed error information. pFirstFailed POINTER TO IEC_BACNET_UNSIGNED A pointer to a buffer in which to place the sequence number of the first element in the pElements list which cannot be added to the property. pFirstFailed may be 0.
BACnetCancelPendingConfirmedRequest (FUN) ¶ FUNCTION BACnetCancelPendingConfirmedRequest : IEC_BACNET_STATUS This function can be used by an BACnet application to cancel pending confirmed transactions directly which would take a long time to terminate if they would terminate by normal APDU retries and timeouts. If the application cancels such an transaction the transactions completion function <b>WILL NOT BE CALLED</b>. InOut: Scope Name Type Comment Return BACnetCancelPendingConfirmedRequest IEC_BACNET_STATUS Input pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken .
BACnetConfPrivateTransfer (FUN) ¶ FUNCTION BACnetConfPrivateTransfer : IEC_BACNET_STATUS ConfirmedPrivateTransfer completion routine. Sends a request to invoke proprietary or non-standard confirmed service in a remote device. This routine may control APDU properties like APDU length, segmentation, and timeout for both request and response. This routine can execute asynchronously, so this routine will return to the caller before the BACnet reply is received so that the applications keeps running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_PRIVATE_XFER_COMPLETE_CB routine, which has to be provided by the BACnet application, will be used to process this information. If a number of asynchronous requests are sent, the responses will be queued and identified by the transaction handles. If the application does not supply the BACNET_PRIVATE_XFER_COMPLETE_CB routine, then the BACnetConfPrivateTransfer routine sends a request and waits for reply. return IEC_BACNET_STATUS InOut: Scope Name Type Comment Return BACnetConfPrivateTransfer IEC_BACNET_STATUS Input pSourceAddress POINTER TO IEC_BACNET_ADDRESS If the BACnet application has only one device constructed and installed, this can be 0. 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. pServiceInfo POINTER TO IEC_BACNET_PRIVATE_TRANSFER_INFO A pointer to the service information data structure. This data structure is to transport the service parameters to the destination device. pAPDUParams POINTER TO IEC_BACNET_APDU_PROPERTIES A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be NULL. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request. pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken . pResult POINTER TO IEC_BACNET_PRIVATE_TRANSFER_INFO A pointer to a buffer to hold the Result data if successful executed (datatype IEC_BACNET_PRIVATE_TRANSFER_INFO). The application may initialize the parameters member of the IEC_BACNET_PRIVATE_TRANSFER_INFO struture with a NULL pointer and bufferSize with 0 too. In this case the memory for the response is allocated by the API and the application is responsible to release it with a call to BACnetFreeStackAllocatedMemory if the buffer is no longer needed. pError POINTER TO IEC_BACNET_ERROR A pointer to a structure to hold BACnet Error information. pError may be NULL if the application isn’t interested in detailed error information.
BACnetConfTextMessage (FUN) ¶ FUNCTION BACnetConfTextMessage : IEC_BACNET_STATUS Sends an confirmed TextMessage. Sends a request to transmit a text to the remote device. Message may be prioritized into Normal or Urgent categories. In addition, a text message may be optionally classified by a numeric class code or class identification string. The interpretation of the class is a local matter. This routine may control APDU properties like APDU length, segmentation, and timeout, for both request and response. This routine can execute asynchronously, so this routine will return to the caller before the BACnet reply is received so that the applications keeps running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_SIMPLE_ACK_COMPLETE_CB routine, which has to be provided by the BACnet application, will be used to process this information. If a number of asynchronous requests are sent, the responses will be queued and identified by the transaction handles. If application does not supply the BACNET_SIMPLE_ACK_COMPLETE_CB routine, then this routine sends a request and waits for reply. InOut: Scope Name Type Comment Return BACnetConfTextMessage 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. pServiceInfo POINTER TO IEC_BACNET_TEXT_MESSAGE_INFO A pointer to the service information data structure. This data structure of datatype BACNET_TEXT_MESSAGE_INFO contains an object Identifier of device object of the request initiator, a boolean if Message Class Present attribute, a message class, a message priority, a message string type and a message string. pAPDUParams POINTER TO IEC_BACNET_APDU_PROPERTIES A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be NULL. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request. pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken . pError POINTER TO IEC_BACNET_ERROR A pointer to a structure to hold BACnet Error information. pError may be NULL if the application isn’t interested in detailed error information.
BACnetCreateObject (FUN) ¶ FUNCTION BACnetCreateObject : IEC_BACNET_STATUS Sends a CreateObject request. Sends a request to create a new instance of an object which may be as standard as vendor-specified object. This service may provide initialization of the properties of the newly created standard objects or the property values may be written later. This routine may control APDU properties like APDU length, segmentation and timeout for both request and response. This routine can execute asynchronously, i.e. this routine will return to the caller before the BACnet reply comes so that the applications can keep running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_CREATE_OBJECT_COMPLETE_CB routine, which is provided by the BACnet application, shall be used to process this information. If a number of asynchronous requests are sent, the responses shall be queued and identified by the transaction handles. If the application does not supply the BACNET_CREATE_OBJECT_COMPLETE_CB routine; then this routine sends a request and waits for reply. InOut: Scope Name Type Comment Return BACnetCreateObject IEC_BACNET_STATUS A status indicating if the operation worked. Input pSourceAddress POINTER TO IEC_BACNET_ADDRESS If the BACnet application has only one device constructed and installed, this can be 0. 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. pServiceInfo POINTER TO IEC_BACNET_CREATE_OBJECT_INFO A pointer to the request information data structure. This data structure specifies either Object Type or ObjectID to create a new instance of an object and a list of property values. pAPDUParams POINTER TO IEC_BACNET_APDU_PROPERTIES A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be 0. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request. pTransactionToken POINTER TO BACnetAsyncTransactionToken Transaction token of the asynchronous call - see BACnetAsyncTransactionToken . pError POINTER TO IEC_BACNET_ERROR A pointer to a structure to hold BACnet Error information. pError may be 0 if the application isn’t interested in detailed error information. pObjectID POINTER TO BACnetCreateObjectResult A pointer to the memory block to return the object Identifier of a newly created object, plus the “first failed” property which may be 0. See BACnetCreateObjectResult pFirstFailed POINTER TO IEC_BACNET_UNSIGNED A pointer to a buffer in which to place the sequence number of the first element in the pElements list which cannot be added to the property. pFirstFailed may be 0.
BACnetCreateObjectResult (STRUCT) ¶ TYPE BACnetCreateObjectResult : STRUCT A data transport unit for results of BACnetCreateObject . BACnetCreateObjectResult transports a pointers to an object-ID and the “first failed” sequence number. The caller had to provide the memory pointed to by those pointers. InOut: Name Type Comment pObjectID POINTER TO IEC_BACNET_OBJECT_ID A pointer to the memory block to return the object Identifier of a newly created object if successfully creating of the object, and successfully initializing all the properties specified. pFirstFailed POINTER TO IEC_BACNET_UNSIGNED A pointer to the memory block to transport the numerical position, started at 1, of the offending property value which was successfully written. If the present request is considered invalid for reasons other than property initialization or the present request is valid, this argument shall have a value of zero.