BACnetOpenClientCustomer (FUN) ¶ FUNCTION BACnetOpenClientCustomer : IEC_BACNET_HANDLE Creates a new advanced BACnet client customer handle. To use the advanced BACnet client API, first an customer needs to be created. This handle is needed to register device object property references for data acquisation or subscriptions to event notification of remote or local devices and objects. Returns a valid handle on success or a NULL handle on failure. InOut: Scope Name Type Comment Return BACnetOpenClientCustomer IEC_BACNET_HANDLE Input bReportOnlyOnValueChanges IEC_BACNET_BOOLEAN If this parameter is set to True, the value change notification callback BACNET_CLIENT_VALUE_CB is only called if the value has changed and not every time on reception of an ChangeOfValue notification or on response on ReadProperty request.
BACnetRegisterClientCommunicationStateCallback (FUN) ¶ FUNCTION BACnetRegisterClientCommunicationStateCallback : IEC_BACNET_STATUS Registers a callback for communication changes. This registers a callback routine. This callback can be registered at any time. If the callback is registered more than once, the new callback procedure replaces old one. A NULL procedure pointer cancels the callback.n This function gives a user application the ability to get notified if an connection to one of the registered devices couldn’t or could be established. It is called in every case were the connection state to an BACnet remote device changes. InOut: Scope Name Type Comment Return BACnetRegisterClientCommunicationStateCallback IEC_BACNET_STATUS Input hCustomer IEC_BACNET_HANDLE An handle to an created advanced BACnet client customer created by BACnetOpenClientCustomer . pICallback CmpEventMgr.ICmpEventCallback A pointer to the event-callback interface which gets called on changes in communication to the device. To unregister a NULL pointer shall be used here. pUserArg POINTER TO BYTE A pointer to data from the user application which is transparent for the API. This pointer will not be modified by the BACnet API. This may be NULL.
BACnetRegisterClientDataPoint (FUN) ¶ FUNCTION BACnetRegisterClientDataPoint : IEC_BACNET_STATUS Registers an device object property reference for data acquisation. This is the main function of the advanced BACnet client API. A user application can register device object property references to local and remote BACnet devices to get their property values on an easy way. This function will do most of the work, normally a client application has to manage, just in one call. It checks periodical for the presence and online state for devices and checks for integrity of the values Note 1: Local devices OR objects are those which have been created BY calls TO |BACnetConstructDevice| and BACnetConstructObject and are objects in the stack API’s own object database. Note 2: If different customer register for the same reference but with different modes the following rules apply here: If one customer wants to subscribe the other polls the subscriber winns. If both want polling the shorter interval winns. If one customer wants clock aligned polling and the other subscribes it will be done both: subscribed AND polled clock aligned. InOut: Scope Name Type Comment Return BACnetRegisterClientDataPoint IEC_BACNET_STATUS Input hCustomer IEC_BACNET_HANDLE An handle to an created advanced BACnet client customer created by BACnetOpenClientCustomer . devId IEC_BACNET_INST_NUMBER The device instance number from the remote or local device from which the value shall be acquired. pObjId POINTER TO IEC_BACNET_OBJECT_ID A pointer to the object identifier from the remote or local object from which the value shall be acquired. propId IEC_BACNET_PROPERTY_ID The property identifier from which the value shall be acquired. index IEC_BACNET_ARRAY_INDEX The property array index from which the value shall be acquired. If the property is not an array the value shall be ::BACNET_VOID_INDEX. If the property is an array and the whole array should be acquired the value ::BACNET_ENTIRE_ARRAY shall be used here. bSubscribe IEC_BACNET_BOOLEAN If set to True the value acquisation will be done by subscribing for the change of value service if the device supports this service. If the device doesn’t support this service and parameter bPoll is set to False the user application will get notified with an error in the BACNET_CLIENT_VALUE_CB callback. resubscribe IEC_BACNET_UNSIGNED The resubscribe time in seconds after that the subscrition to the change of value service will be renewed. For more information look at the ::BACNET_SUBSCRIBE_COV_INFO. bPoll IEC_BACNET_BOOLEAN If set to True the value acquisation will be done by periodical reading the property value from the device. If both parameters bSubscribe AND bPoll are set to True the subscrition will be prefered. But if the device doesn’t support subscriptions it will be polled as a fallback. If multiple references from the same device need to be polled in the same interval and the device supports the ReadPropertyMultiple service, this service will be used to acquire the values. pollinterval IEC_BACNET_UNSIGNED The poll interval defined in seconds in which periodically the value is read from the device. If the nSubscribeMode parameter is set to ::BACNET_SUBSCRIBE_POLL_CLOCKALIGNED the smallest interval will be 60 seconds. pollClockAlignedIntervalOffset IEC_BACNET_UNSIGNED The offset which is added to the clock aligned interval at which the acquisation will take place. Example: A value is needed 10 minutes after every full hour so pollinterval will be set to 3600 seconds and pollClockAlignedIntervalOffset will be set to 600 seconds. nSubscribeMode IEC_BACNET_CLIENT_SUBSCRIBE_MODE This defines how the data is acquired. pICallback CmpEventMgr.ICmpEventCallback A pointer to the event-callback interface which gets called on value notification. pUserArg POINTER TO BYTE A pointer to data from the user application which is transparent for the API. This pointer will not be modified by the BACnet API. This pointer and the pUserFct pointer is associated with the given device instance, object identifier, property identifier and property array index group. So for every different combination of those parameters these pointers are stored. This pointer may be NULL.
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.