EVT_BACNET_READFILE (STRUCT)¶
TYPE EVT_BACNET_READFILE : STRUCT
The AtomicReadFile service hook
This is the type declaration for the Atomic Read File service application hook. This hook allows a BACnet application to process this service since there are no default processing of this service in the present API version. This hook is given all of the parameters of a service request, and is responsible for all error checking. A hook can be registered by the registering API routine at any time by BACnetSetHook. One hook procedure is registered per service. If a hook is registered more than once for the same service, the new hook procedure replaces old one. A 0 procedure pointer can be used to deregister the hook. If no hook is registered, this service will send back the Reject (Unrecognized_Service) message. A Read-File hook must complete its service request processing by using one of the transaction completion API routines: BACnetSrvcAbortCbCompletion, BACnetSrvcErrorCbCompletion, BACnetSrvcIgnoreCbCompletion, or BACnetSrvcRejectCbCompletion. Hooks can access the local Properties maintained in the API database by using the BACnetStorePropertyInstance / BACnetRetrievePropertyInstance routines. A hook can choose not to override the default API processing of a service request by returning the value CB_STATUS_DEFAULT.
- InOut:
- Name - Type - Comment - pCBStatus- POINTER TO IEC_BACNET_CB_STATUS - CB-Status returned for the event. “Default” processes the standard APIs reaction, which needs no additional Callback-Signalling. - phTransaction- POINTER TO BYTE - THIS is the Transaction State Machine (TSM) handle FOR the current service request. It is generated by the BACnet API and is the first parameter given to the Hook- Completion functions. - sourceAddress- POINTER TO IEC_BACNET_ADDRESS - THIS is the MAC address OF the BACnet addressed device FROM which the request has been sent. - destinationAddress- POINTER TO IEC_BACNET_ADDRESS - This is the MAC address of the device constructed by the application which has received the request. - pServiceInfo- POINTER TO IEC_BACNET_READ_FILE_INFO - A pointer to the service information data structure. The fields of this data structure include objectID, File Access Type (either FILE_ACCESS_STREAM or FILE_ACCESS_RECORD) and Read File Range data structure. 
