-
Notifications
You must be signed in to change notification settings - Fork 7
Compilation flags for optimization
Most of Sigfox radio parameters and features are conditioned to a dedicated flag, so that the stack can be configured to perfectly match your application, without dead code and thus with a minimum memory footprint. The flags are located in the sigfox_ep_flags.h
file, but can also be set through the cmake
command when building the project (see section How to add Sigfox library to your project).
To have such a flexibility, the stack uses a lot of preprocessor directives, which makes the source code less readable. If you plan to look or modify the source files, we advise you to run the cmake pre-compilation command, that will remove all preprocessor directives according to your flags selection (see section Precompiled source code).
Below is the list of available flags.
Flag name | Value | Description |
---|---|---|
RCx_ZONE |
undefined / defined
|
Support the RCx radio configuration if defined. |
APPLICATION_MESSAGES |
undefined / defined
|
Support uplink application messages if defined. |
CONTROL_KEEP_ALIVE_MESSAGE |
undefined / defined
|
Support uplink control keep alive message if defined. |
BIDIRECTIONAL |
undefined / defined
|
Support bidirectional procedure (downlink) if defined. Only applicable to application messages. Otherwise all messages will be uplink only. |
ASYNCHRONOUS |
undefined / defined
|
Asynchronous mode if defined, blocking mode otherwise. |
LOW_LEVEL_OPEN_CLOSE |
undefined / defined
|
Enable MCU and RF open/close functions if defined. |
REGULATORY |
undefined / defined
|
Enable radio regulatory control (DC, FH or LBT check) if defined. See state machine |
LATENCY_COMPENSATION |
undefined / defined
|
Enable radio latency compensation to improve MCU timers accuracy. |
SINGLE_FRAME |
undefined / defined
|
Send 1 frame per message (N=1) if defined. Otherwise number of frames per message is dynamically given when sending a message (N=1, 2 or 3). |
UL_BIT_RATE_BPS |
undefined / 100 / 600
|
If defined, give the only uplink bit rate supported (100bps or 600bps depending on the RC). Otherwise, value is dynamically given when sending a message. |
TX_POWER_DBM_EIRP |
undefined / <tx_power_dbm_eirp>
|
If defined, give the only TX power supported by the radio. Otherwise the value is dynamically given when sending a message. |
T_IFU_MS |
undefined / <t_ifu_ms>
|
If defined, give the fixed inter-frame delay used between uplink frames of a same message (0 to 2000ms). Value 0 disables the delay and associated timers to optimize memory space. Otherwise value is dynamically given when sending a message. |
T_CONF_MS |
undefined / <t_conf_ms>
|
If defined, give the fixed delay between downlink frame reception and uplink confirmation message (1400 to 4000ms). Otherwise value is dynamically given when sending a message. |
UL_PAYLOAD_SIZE |
undefined / <ul_payload_size>
|
If defined, give the only uplink payload length supported (0 to 12). Value 0 enables the bit 0, bit 1 and empty messages. Otherwise, all uplink payload lengths are dynamically supported. |
CRC_HW |
undefined / defined
|
If defined, enable hardware CRC through MCU API functions. Otherwise the embedded driver is used. |
MESSAGE_COUNTER_ROLLOVER |
undefined / 128 / 256 / 512 / 1024 / 2048 / 4096
|
If defined, give the only message counter rollover value supported. Otherwise, value is dynamically given when opening the library. |
PARAMETERS_CHECK |
undefined / defined
|
Enable parameters check if defined. |
CERTIFICATION |
undefined / defined
|
Enable certification test features if defined (required to use addons RFP and TA). |
PUBLIC_KEY_CAPABLE |
undefined / defined
|
Enable public key switch feature if defined. |
VERBOSE |
undefined / defined
|
Enable credentials (ID / PAC) API access and version control functions if defined. |
ERROR_CODES |
undefined / defined
|
Use return codes if defined, otherwise all functions return void. |
ERROR_STACK |
undefined / <error_stack_depth>
|
If defined, store low level errors in a stack (the macro gives the depth). Errors can be read with the SIGFOX_EP_API_unstack_error() function. |