23#ifndef _SHARED_OFFLINE_H_
24#define _SHARED_OFFLINE_H_
61#define SHARED_OFFLINE_INFINITE_DELAY (uint32_t)(-1)
159 uint32_t * remaining_s_p);
shared_offline_status_e
Offline state.
@ SHARED_OFFLINE_STATUS_UNINITIALIZED
@ SHARED_OFFLINE_STATUS_ONLINE
@ SHARED_OFFLINE_STATUS_OFFLINE
shared_offline_res_e Shared_Offline_enter_offline_state(uint8_t id, uint32_t delay_s)
Call to asynchronously enter in offline state.
shared_offline_res_e Shared_Offline_register(uint8_t *id_p, offline_setting_conf_t cbs)
Register to offline share lib It is required to take part of the offline arbitration.
void(* offline_cb_f)(uint32_t delay_s)
Offline callback called when the node enter offline state It means that all the module are ready to e...
shared_offline_res_e Shared_Offline_init(void)
Initialize shared offline module.
shared_offline_res_e Shared_Offline_enter_online_state(uint8_t id)
Call to asynchronously enter in online state.
shared_offline_status_e Shared_Offline_get_status(uint32_t *elapsed_s_p, uint32_t *remaining_s_p)
Get the current status.
shared_offline_res_e Shared_Offline_unregister(uint8_t id_p)
Unregister from offline share lib Once done, you will not be notified anymore for online/offline even...
offline_cb_f on_offline_event
online_cb_f on_online_event
shared_offline_res_e
List of return code.
@ SHARED_OFFLINE_RES_WRONG_ID
@ SHARED_OFFLINE_RES_WRONG_ROLE
@ SHARED_OFFLINE_RES_UNINITIALIZED
@ SHARED_OFFLINE_RES_ALREADY_ONLINE
@ SHARED_OFFLINE_RES_NO_MORE_ROOM
void(* online_cb_f)(uint32_t delay_from_deadline_s)
Online callback called when the node enter online state.