Sternum Embedded SDK
|
Configuration structure for initializing the SDK.
This structure must be filled by the user before initializing the SDK.
#include <sternum_settings.h>
Data Fields | |
uint32_t | inter_transmission_delay_ms |
Time to wait between each transmission [ms]. More... | |
const char * | firmware_version |
String identifying client's application firmware version. More... | |
bool | flush_automatically |
Option for transmitting traces immediately if possible. More... | |
unsigned char * | trace_buffer |
Pointer to trace_buffer - array serving as buffer for constructing single trace. More... | |
size_t | trace_buffer_size |
Size of trace_buffer in bytes. More... | |
unsigned char * | communication_buffer |
Pointer to communication_buffer - array serving as RAM cache for all pending traces. More... | |
size_t | communication_buffer_size |
Size of communication_buffer in bytes. More... | |
uint64_t | access_token |
Access token is device type ID. More... | |
uint64_t | device_id |
Device ID unique for each device (eg. More... | |
uint64_t sternum_sdk_settings_t::access_token |
Access token is device type ID.
It must match access token in Sternum Platform.
unsigned char* sternum_sdk_settings_t::communication_buffer |
Pointer to communication_buffer - array serving as RAM cache for all pending traces.
The communication buffer size should be greater than the trace_buffer size to ensure it can accommodate the protocol header and pending traces. If the communication buffer becomes full, any additional traces will be dropped. Therefore, it is crucial to configure the size appropriately based on the expected volume of trace data and frequency of transmission.
size_t sternum_sdk_settings_t::communication_buffer_size |
Size of communication_buffer in bytes.
uint64_t sternum_sdk_settings_t::device_id |
Device ID unique for each device (eg.
device serial number or unique random number).
const char* sternum_sdk_settings_t::firmware_version |
String identifying client's application firmware version.
bool sternum_sdk_settings_t::flush_automatically |
Option for transmitting traces immediately if possible.
If enabled, each usage of STERNUM_ADS_TRACE(...) will trigger transmission attempt immediately.
inter_transmission_delay_ms
trace will not be sent, but will be kept in in packet buffer until next transmission request. uint32_t sternum_sdk_settings_t::inter_transmission_delay_ms |
Time to wait between each transmission [ms].
If flush or automatic flush is called before inter_transmission_delay_ms time passed, it will not be executed. Traces will be kept in buffer awaiting next transmission attempt.
Possible value range [0; UINT_MAX]. The value should be chosen based on your network specification. Requires proper implementation of sternum_port_get_time. Default is 100 [ms].
unsigned char* sternum_sdk_settings_t::trace_buffer |
Pointer to trace_buffer - array serving as buffer for constructing single trace.
The buffer size determines the maximum length of a single trace. Increasing the buffer size allows for longer trace construction and transmission.
Trace buffer of size 1024 bytes should fit the length of most traces. If memory constraints are a concern, consider reducing the size accordingly. Minimum suggested size for this buffer is 124. Note it will disallow to construct longer traces.
size_t sternum_sdk_settings_t::trace_buffer_size |
Size of trace_buffer in bytes.