Sternum Linux SDK
sternum_settings_t Struct Reference

Detailed Description

Configuration structure for initializing the SDK.

This structure must be filled by the user before initializing the SDK.

#include <sternum_settings.h>

Data Fields

const char * sternum_url
 Your Sternum dedicated transmission URL. More...
 
const char * firmware_version
 String identifying client's application firmware version. More...
 
uint64_t access_token
 Device definition id for traces transmitted from the importing application. More...
 
uint64_t device_id
 Device id for traces transmitted from the importing application. More...
 
const uint64_t * relay_override_device_id
 If a remote device that originated the relayed traces cannot have a random a device ID, provide an alternate device ID. More...
 
bool is_production
 If the application is in production/development phase. More...
 
const char * cache_file_path
 Path of the trace file cache. More...
 
size_t max_cache_size_bytes
 The maximum amount of bytes to store on disk when caching traces. More...
 

Field Documentation

◆ access_token

uint64_t sternum_settings_t::access_token

Device definition id for traces transmitted from the importing application.

◆ cache_file_path

const char* sternum_settings_t::cache_file_path

Path of the trace file cache.

The cache file is used for constructing trace and storing traces before transmission. The file cache maintains persistence across multiple application executions. Each application instance must use a unique file cache.

The provided string must be either a full path or a filename.

Note
Accepted formats:
  • Full path (must start with '/'):
    cache_file_path = "/home/user/sternum_cache.bin"
    • Cache will be stored in the specified path
    • The directory of the cache file must exist before running the application.
    • The application must have permission to write to this location.
  • File name - the file will be created in current working directory
    cache_file_path = "cache.bin"
    • cache will be stored in "$cwd/cache.bin" where cwd is current working directory

◆ device_id

uint64_t sternum_settings_t::device_id

Device id for traces transmitted from the importing application.

◆ firmware_version

const char* sternum_settings_t::firmware_version

String identifying client's application firmware version.

◆ is_production

bool sternum_settings_t::is_production

If the application is in production/development phase.

The SDK will report this status to the cloud during initialization for diagnostic purposes.

◆ max_cache_size_bytes

size_t sternum_settings_t::max_cache_size_bytes

The maximum amount of bytes to store on disk when caching traces.

Cache is automatically emptied when internet connection is available.

Note
The recommended minimum cache size is 65KB to ensure that the biggest protocol payloads can be processed.

◆ relay_override_device_id

const uint64_t* sternum_settings_t::relay_override_device_id

If a remote device that originated the relayed traces cannot have a random a device ID, provide an alternate device ID.

If NULL is provided, device id won't be overridden.

◆ sternum_url

const char* sternum_settings_t::sternum_url

Your Sternum dedicated transmission URL.