BACnetWriteGroup (FUN) ¶ FUNCTION BACnetWriteGroup : IEC_BACNET_STATUS Sends an unconfirmed WriteGroup request. The WriteGroup service is used by a sending BACnet-user to update arbitrary Channel objects Present_Value properties for a particular numbered control group. The WriteGroup service is an unconfirmed service. Upon receipt of a WriteGroup service request, all devices that are members of the specified control group shall write to their corresponding Channel objects Present_Value properties with the value applicable to the Channel Number, if any. A device shall be considered to be a member of a control group if that device has one or more Channel objects for which the ‘Group Number’ from the service appears in its Control_Groups property. If the receiving device does not contain one or more Channel objects with matching channel numbers, then those values shall be ignored. The WriteGroup service may be unicast, multicast, broadcast locally, on a particular remote network, or using the global BACnet network address. Because global broadcasts are generally discouraged, the use of multiple directed broadcasts is preferred. InOut: Scope Name Type Comment Return BACnetWriteGroup 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_WRITE_GROUP_INFO A pointer to the service request information data structure.
BACnetWriteProperty (FUN) ¶ FUNCTION BACnetWriteProperty : IEC_BACNET_STATUS Sends a WriteProperty request Sends a request to write a value to a property of an object. This routine may control APDU properties like APDU length, segmentation, and timeout for both request and in 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_SIMPLE_ACK_COMPLETE_CB routine, which is provided by the 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 routine sends a request and waits for the reply. Asynchron call. As soon as pResultStatus is IEC_BACNET_STATUS.BACNET_STATUS_OK the call was successfully completed. InOut: Scope Name Type Comment Return BACnetWriteProperty IEC_BACNET_STATUS A status indicating whether 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. pWriteInfo POINTER TO IEC_BACNET_WRITE_INFO A pointer to the service information data structure. This data structure identifies the property within the device and includes the object ID, property ID array index and also a property contents buffer with the value to be written. 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.
BACnetWritePropertyMultiple (FUN) ¶ FUNCTION BACnetWritePropertyMultiple : IEC_BACNET_STATUS Sends an WritePropertyMultiple request. Modifies the values of one or more specified properties of one or more Objects. This routine may control APDU properties like APDU length, segmentation, and timeout for both request and in 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_WRITE_PROP_MUL_COMPLETE_CB routine, which is provided by the 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_WRITE_PROP_MUL_COMPLETE_CB routine then this routine sends a request and waits for the reply. Asynchron call. As soon as pResultStatus is IEC_BACNET_STATUS.BACNET_STATUS_OK the call was successfully completed. InOut: Scope Name Type Comment Return BACnetWritePropertyMultiple IEC_BACNET_STATUS A status indicating whether 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_WRITE_MUL_INFO A pointer to the service request information data structure. 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. pFirstFailed POINTER TO IEC_BACNET_DEV_OBJ_PROP_REFERENCE A pointer to a structure to hold the device object property refernce which failed to be written.
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)
BACnetBackupBACnetDevice (FUN) ¶ FUNCTION BACnetBackupBACnetDevice : IEC_BACNET_STATUS Function initiates a backup for an BACnet device. This function will start an backup procedure for the specified device. InOut: Scope Name Type Comment Return BACnetBackupBACnetDevice IEC_BACNET_STATUS Input pInfo POINTER TO IEC_BACNET_BACKUPRESTORE_INFO Pointer to information which specifies which device should be backuped and where the file object data should be stored to be backuped. pICallback CmpEventMgr.ICmpEventCallback A pointer to the event-callback interface to inform about failures and progress information during the procedure execution. 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. phTransaction POINTER TO BYTE The handle which identifies the transaction handled by the user application. The given handle has to be unique, in case the application needs to separate multiple pending requests. This handle is transparent for the BACnet API and is returned unchanged to the user application in the completion routine callback. This handle may be NULL, but the user application will be unable to cancel pending requests by a call to BACnetCancelPendingConfirmedRequest or to separate them in the callback if multiple completions are pending in such case.
BACnetCloseClientCustomer (FUN) ¶ FUNCTION BACnetCloseClientCustomer : IEC_BACNET_STATUS Closes an advanced BACnet client customer handle. The user application should call this API function to release all ressources of the advanced BACnet client API. InOut: Scope Name Type Comment Return BACnetCloseClientCustomer IEC_BACNET_STATUS Input hCustomer IEC_BACNET_HANDLE An handle to an created advanced BACnet client customer created by BACnetOpenClientCustomer.
BACnetGetClientDeviceCommunication (FUN) ¶ FUNCTION BACnetGetClientDeviceCommunication : IEC_BACNET_STATUS Retrieves the current device communication control value for the specified device. The user application can request the current communication enable state for registered devices. InOut: Scope Name Type Comment Return BACnetGetClientDeviceCommunication IEC_BACNET_STATUS Input devId IEC_BACNET_INST_NUMBER The device instance number for which communication needs to be requested. A value of 0xFFFFFFFF will retrieve the global communication enable / disable state. pDccValue POINTER TO IEC_BACNET_DCC_VALUE A pointer to hold the requested communication state which is filled by the API.
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.