2.5.2 Base Management
This API defines the interface functions for several Base Node features, such as the Firmware Update Protocol, Network Events, Prime Profile (for remote PIBs access), Zero Cross, and Whitelist Management. The protocol interface and callback interfaces of these features are defined in the prime_api_host.h file.
The base management callbacks are initialized with the following function:
void bmng_set_callbacks(prime_bmng_callbacks_t *px_fup_cbs);
Where the argument is a pointer to a struct with all callback functions:
typedef struct {
bmng_fup_ack_ind_cb_t fup_ack_ind_cb;
bmng_fup_error_ind_cb_t fup_error_ind_cb;
bmng_fup_version_ind_cb_t fup_version_ind_cb;
bmng_fup_status_ind_cb_t fup_status_ind_cb;
bmng_fup_kill_ind_cb_t fup_kill_ind_cb;
bmng_network_event_ind_cb_t network_event_ind_cb;
bmng_pprof_ack_ind_cb_t pprof_ack_ind_cb;
bmng_pprof_get_response_cb_t pprof_get_response_cb;
bmng_pprof_get_enhanced_response_cb_t pprof_get_enhanced_response_cb;
bmng_pprof_zerocross_response_cb_t pprof_zerocross_response_cb;
bmng_pprof_zc_diff_response_cb_t pprof_zc_diff_response_cb;
bmng_whitelist_ack_cb_t whitelist_ack_cb;
} prime_bmng_callbacks_t;
Each callback must have the appropriate parameters. The definition of the callback format is in the prime_api_defs_host.h file. If a callback is set to NULL, the corresponding confirm or indication message will not be forwarded to any callback function.
