|
BlueSync - BLE Time Sync for Zephyr
High-precision time synchronization for BLE Mesh networks
|
#include "bluesync.h"

Go to the source code of this file.
Data Structures | |
| struct | bs_sm_handlers |
| Struct defining the callbacks of the state machine. More... | |
Enumerations | |
| enum | bs_sm_state_t { BS_NONE_STATE = 0 , BS_SCAN_WAIT_FOR_SYNC = 1 , BS_SYNC = 2 , BS_UPDATE = 3 , BS_ADV = 4 , BS_STOP = 5 , BS_COUNT = 6 } |
| Type definition representing the states. More... | |
| enum | bs_sm_event_t { EVENT_NONE = 0 , EVENT_INIT = 1 , EVENT_NEW_SYNC_RCV = 2 , EVENT_SYNC_EXPIRED = 3 , EVENT_UPDATE_SUCCESS = 4 , EVENT_UPDATE_FAILED = 5 , EVENT_ADV_EXPIRED = 6 , EVENT_NEW_NET_SYNC = 7 , EVENT_COUNT = 8 } |
| Type definition representing the events. More... | |
Functions | |
| void | bs_state_machine_run (bs_sm_event_t event) |
| Annonce an event to the state machine. | |
| 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 | bs_state_machine_get_state () |
| Get the current state. | |
Variables | |
| struct bs_sm_handlers * | bs_sm_handlers |
| This struct is implemented in the bluesync.c file. | |
| enum bs_sm_event_t |
Type definition representing the events.
| Enumerator | |
|---|---|
| EVENT_NONE | |
| EVENT_INIT | |
| EVENT_NEW_SYNC_RCV | |
| EVENT_SYNC_EXPIRED | |
| EVENT_UPDATE_SUCCESS | |
| EVENT_UPDATE_FAILED | |
| EVENT_ADV_EXPIRED | |
| EVENT_NEW_NET_SYNC | |
| EVENT_COUNT | |
Definition at line 47 of file bs_state_machine.h.
| enum bs_sm_state_t |
Type definition representing the states.
| Enumerator | |
|---|---|
| BS_NONE_STATE | |
| BS_SCAN_WAIT_FOR_SYNC | |
| BS_SYNC | |
| BS_UPDATE | |
| BS_ADV | |
| BS_STOP | |
| BS_COUNT | |
Definition at line 33 of file bs_state_machine.h.
| bluesync_role_t bs_state_machine_get_role | ( | ) |
| bs_sm_state_t bs_state_machine_get_state | ( | ) |
| void bs_state_machine_init | ( | struct bs_sm_handlers * | handlers | ) |
Init the state machine by passing the list of callbacks.
| handlers |
Definition at line 152 of file bs_state_machine.c.
| void bs_state_machine_run | ( | bs_sm_event_t | event | ) |
Annonce an event to the state machine.
| event |
Definition at line 107 of file bs_state_machine.c.
| void bs_state_machine_set_role | ( | bluesync_role_t | role | ) |
Indicate the role to the state machine.
| role |
Definition at line 160 of file bs_state_machine.c.
|
extern |
This struct is implemented in the bluesync.c file.