Skip to content
Version 6.1.0
Contact Us

BACnetStack_RegisterCallbackPrepareRestore

void BACnetStack_RegisterCallbackPrepareRestore(
bool (*FPCallbackPrepareRestore)(const uint32_t deviceInstance));

Registers the callback the stack calls to create the files a BACnet client will WRITE the restore image into, on a ReinitializeDevice with reinitializedStateOfDevice = startRestore.

Called from inside BACnetStack_Tick().

THE CLIENT HAS ALREADY BEEN ACKNOWLEDGED. The SimpleAck is sent before this runs, there is no errorCode out-parameter, and returning false only moves the device into the restoreFailure state and logs. The client learns of the failure by reading System_Status / Backup_And_Restore_State.

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::FPCallbackPrepareRestore

BACnet reference: ANSI/ASHRAE 135-2024 clause 19.1 (Backup and Restore).

Parameter Direction Description
FPCallbackPrepareRestore in The function pointer for the CallbackPrepareRestore function. See CASBACnetStack::FPCallbackPrepareRestore for more info.

FPCallbackPrepareRestore

Topic: Service callbacks. Declared in CASBACnetStackDLL.h.