Skip to content

feat static control

Romain Jacob edited this page Mar 28, 2019 · 3 revisions

Objective

Describe the static control feature in Baloo.

Description

It is often the case that the control information remains always the same, or changes according to some pre-defined algorithm. This is referred to as a static control. In such a case, the amount of information included in the control packet can be drastically reduced, limiting the radio-on time of the control packet (i.e., saving time and energy). This is made possible by the static control feature in Baloo.

This feature is disabled by default.

Availability

Available for all supported platforms.

Compatibility

Compatible with all features and communication primitives.

Using the feature

Beware!
As described below, the control information updates are made independently by every node. This is therefore a dangerous feature to use: all nodes must make updates in a deterministic and/or compatible manner.
Otherwise, nodes may start executing different schedules, which will likely result in chaos!

The static control feature is controlled by the following macros (typically in project-conf.h):

#define GMW_CONF_USE_STATIC_SCHED   
#define GMW_CONF_USE_STATIC_CONFIG

When either of these define is set, each node becomes responsible to update the corresponding section(s) of the control information at the NET layer (often done within a dedicated app_control_static_update() function - see the example below). However, remember that the middleware must also be informed of the new control: the control information at the middleware layer must be updated to match the NET layer control, which must be done in the on_control_slot_post() callback function.

The remaining control sections are handled as usual: the parameters are updated by the host, sent in the control packet (if instructed to do so), and passed by the middleware to the NET layer upon reception.

Example

The baloo-test-static application (see \examples) provides an example use this feature. In this example, useful information is contained in the user_byte section of the control packet: it is used by all nodes to know what static update should be performed. Node alternates between different number of retransmissions for the data slots (2 and 4).