-
Notifications
You must be signed in to change notification settings - Fork 3
feat slot skipping
Describe the slot skipping feature in Baloo.
It is sometimes useful that some nodes do not participate in certain slots, or even skip complete rounds, e.g., to save energy, or to improve performance in very dense networks. The so-called "slot skipping" feature in Baloo caters for such needs.
This feature is always enabled.
Available for all supported platforms.
Compatible with all features and communication primitives.
Baloo allows the user to trigger skipping using the return values of certain callback functions.
Skipping a single slot can be triggered using the return value of the on_slot_pre()
callback. The return type of this callback is gmw_skip_event_t
, which is a enum
containing the following values:
typedef enum {
GMW_EVT_NO_SKIP = 0, /* The slot is executed normally */
GMW_EVT_SKIP_SLOT = 1, /* The slot is skipped: the node turns off its radio */
GMW_EVT_SKIP_DEFAULT = 0 /* Default = no skip */
} gmw_skip_event_t;
If the user returns GMW_EVT_SKIP_SLOT
, the middleware does not start the communication primitive in the following slot. The on_slot_post() callback is executed immediately. The next data slot is executed normally.
Skipping an entire round can be triggered using the advanced state machine feature. The user can set the state of any node to Suspended by returning GMW_SUSPENDED
in the on_control_slot_post()
callback function. This results in the middleware executing the on_round_finished()
callback immediately, then yielding until the next round.
The baloo-sleeping-beauty
application (see \examples
) provides an example use this feature: At the end of the protocol bootstrapping phase, the network host selects a subset of nodes that should participate in the next few rounds; all other nodes skip the round and go to sleep (i.e., they skip an entire round).
Moreover, the protocol periodically performs link quality estimations. Each node maintains a list of neighboring nodes, which allows them to skip the communication slots used by their non-neighboring nodes (i.e., they skip single slots).