Serial

Configuration Options

API Reference

Functions

int thingset_serial_send_report(const char *path)

Send ThingSet report to serial client.

Parameters:
  • path – Path to subset or group that should be reported

Returns:

0 for success or negative errno in case of error

int thingset_serial_send(const uint8_t *buf, size_t len)

Send ThingSet message (response or report) to serial client.

Parameters:
  • buf – Buffer with ThingSet message

  • len – Length of message

Returns:

0 for success or negative errno in case of error

void thingset_serial_set_rx_callback(thingset_sdk_rx_callback_t rx_cb)

Set custom callback for received data.

If this callback is set, ThingSet messages are not processed automatically anymore, but forwarded through the callback.