BACnetStack_RegisterCallbackCompleteBackup
void BACnetStack_RegisterCallbackCompleteBackup( bool (*FPCallbackCompleteBackup)(const uint32_t deviceInstance));Registers the callback the stack calls to tear down a backup session and clean up the files it created.
Called from inside BACnetStack_Tick(), on a ReinitializeDevice with reinitializedStateOfDevice = endBackup, and also when the Backup_Failure_Timeout deadline expires while a backup is in progress.
THE RETURN IS RESERVED. It is read only to write a log line; the stack resets the backup/restore state and returns System_Status to operational either way. There is no errorCode out-parameter and nothing reaches the client. Return true.
The Backup_Failure_Timeout deadline is only armed when CallbackGetSystemTime is registered; without a clock an abandoned backup never self-aborts and this callback is never reached that way. See BACnetStack_RegisterCallbackPrepareBackup() for the all-five-callbacks registration rule. Registering has no effect if backup and restore was not compiled (STACK_OPTION_DM_BR_BACKUP_AND_RESTORE).
See also: CASBACnetStack::FPCallbackCompleteBackup
BACnet reference: ANSI/ASHRAE 135-2024 clause 19.1 (Backup and Restore).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
FPCallbackCompleteBackup |
in | The function pointer for the CallbackCompleteBackup function. See CASBACnetStack::FPCallbackCompleteBackup for more info. |
Callback type
Section titled “Callback type”Topic: Service callbacks. Declared in CASBACnetStackDLL.h.