SDK

Configuration Options

The ThingSet SDK itself has to be enabled for all subsystems and interfaces:

Below options define the general publication settings:

Common options for the SDK:

API Reference

The following table gives an overview of the IDs used by the ThingSet protocol and SDK and the ranges freely available for the application.

ID range

Defined in

Purpose

0x01 - 0x0F

Application

Application-specific groups or items

0x10 - 0x1F

ThingSet core

Part of the core ThingSet specification

0x20 - 0x2F

ThingSet SDK

Groups for Thingset SDK subsystems

0x30 - 0x37

ThingSet SDK

Subsets defined by ThingSet SDK

0x38 - 0x3F

Application

Subsets defined by the application

0x40 - 0x1FF

Application

Available for custom application-specific objects

0x200 - 0x2FF

ThingSet SDK

Sub-objects of above groups and related overlays

0x300 - 0x37F

ThingSet SDK

Sub-objects of _Reporting overlay

Defines

TS_ID_ROOT
TS_ID_TIME
TS_ID_IDS
TS_ID_PATHS
TS_ID_METADATAURL
TS_ID_NODEID
TS_ID_NODENAME
TS_ID_AUTH
TS_ID_AUTH_TOKEN
TS_ID_LORAWAN
TS_ID_LORAWAN_DEV_EUI
TS_ID_LORAWAN_JOIN_EUI
TS_ID_LORAWAN_APP_KEY
TS_ID_LORAWAN_DEV_NONCE
TS_ID_LORAWAN_ABP
TS_ID_LORAWAN_DEV_ADDR
TS_ID_LORAWAN_APP_SKEY
TS_ID_LORAWAN_NWK_SKEY
TS_ID_NET
TS_ID_NET_WIFI_SSID
TS_ID_NET_WIFI_PSK
TS_ID_NET_IPV4
TS_ID_NET_IPV6
TS_ID_NET_WEBSOCKET_HOST
TS_ID_NET_WEBSOCKET_PORT
TS_ID_NET_WEBSOCKET_USE_TLS
TS_ID_NET_WEBSOCKET_AUTH_TOKEN
TS_ID_NET_CAN_NODE_ADDR
TS_ID_DFU
TS_ID_DFU_INIT
TS_ID_DFU_WRITE
TS_ID_DFU_DATA
TS_ID_DFU_BOOT
TS_ID_LOG
TS_ID_LOG_TIME
TS_ID_LOG_MESSAGE
TS_ID_LOG_MODULE
TS_ID_LOG_LEVEL
TS_ID_REP_LOG
TS_ID_REP_LOG_SELF
TS_ID_REP_LOG_ENABLE
TS_ID_REP_LOG_MAX_LEVEL
TS_ID_REPORTING
TS_NAME_SUBSET_LIVE
TS_ID_SUBSET_LIVE
TS_ID_REP_LIVE
TS_ID_REP_LIVE_ENABLE
TS_ID_REP_LIVE_PERIOD
TS_NAME_SUBSET_SUMMARY
TS_ID_SUBSET_SUMMARY
TS_ID_REP_SUMMARY
TS_ID_REP_SUMMARY_ENABLE
TS_ID_REP_SUMMARY_PERIOD
TS_SUBSET_NVM

Data that should be stored in EEPROM or Flash

TS_SUBSET_LIVE

Live data for high bandwidth interfaces (e.g. UART, BLE)

TS_SUBSET_SUMMARY

Summarized data for low bandwidth interfaces like LoRaWAN

THINGSET_INIT_PRIORITY_SDK
THINGSET_INIT_PRIORITY_STORAGE
THINGSET_INIT_PRIORITY_DEFAULT

Typedefs

typedef void (*thingset_sdk_rx_callback_t)(const uint8_t *buf, size_t len)

Callback typedef for received ThingSet messages in different interfaces

Functions

struct shared_buffer *thingset_sdk_shared_buffer(void)

Get TX buffer that can be shared between different ThingSet interfaces

Returns:

Pointer to shared_buffer instance

int thingset_sdk_reschedule_work(struct k_work_delayable *dwork, k_timeout_t delay)

Add delayable work to the common ThingSet SDK work queue. This should be used to offload processing of incoming requests and sending out reports.

Variables

char node_id[17]
uint8_t eui64[8]
bool pub_events_enable
bool live_reporting_enable
uint32_t live_reporting_period
bool summary_reporting_enable
uint32_t summary_reporting_period
struct thingset_context ts
struct shared_buffer

Public Members

struct k_sem lock
uint8_t *data
const size_t size
size_t pos