Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions include/thingset.h
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,17 @@ int thingset_export_subsets_progressively(struct thingset_context *ts, uint8_t *
enum thingset_data_format format, unsigned int *index,
size_t *len);

/**
* Aborts the export of data to the buffer passed to @ref
* thingset_export_subsets_progressively. Call this method if
* the export has failed outside ThingSet code.
*
* @param ts Pointer to ThingSet context.
*
* @returns 0 for success
*/
int thingset_export_subsets_progressively_abort(struct thingset_context *ts);

/**
* Export id, value and/or name of a single data item.
*
Expand Down
6 changes: 6 additions & 0 deletions src/thingset.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ int thingset_export_subsets_progressively(struct thingset_context *ts, uint8_t *
return ret;
}

int thingset_export_subsets_progressively_abort(struct thingset_context *ts)
{
k_sem_give(&ts->lock);
return 0;
}

int thingset_export_subsets(struct thingset_context *ts, uint8_t *buf, size_t buf_size,
uint16_t subsets, enum thingset_data_format format)
{
Expand Down