24#ifndef ZEPHYR_BLUESYNC_SRC_BS_STATE_MACHINE_H_
25#define ZEPHYR_BLUESYNC_SRC_BS_STATE_MACHINE_H_
struct bs_sm_handlers handlers
bs_sm_state_t bs_state_machine_get_state()
Get the current state.
void bs_state_machine_init(struct bs_sm_handlers *handlers)
Init the state machine by passing the list of callbacks.
void bs_state_machine_set_role(bluesync_role_t role)
Indicate the role to the state machine.
bluesync_role_t bs_state_machine_get_role()
Get the node role.
bs_sm_state_t
Type definition representing the states.
bs_sm_event_t
Type definition representing the events.
void bs_state_machine_run(bs_sm_event_t event)
Annonce an event to the state machine.
bluesync_role_t
Defines the operational roles for a BlueSync node.
Struct defining the callbacks of the state machine.
void(* bs_adv_cb)(void)
This callback is called when entering in adv state.
void(* bs_stop_cb)(void)
This callback is called when entering in stop state.
void(* bs_sync_cb)()
This callback is called when entering in sync state.
void(* bs_scan_wait_for_sync_cb)(void)
This callback is called when entering in wait_for_sync state.
void(* bs_update_cb)(void)
This callback is called when entering in update state.