ThingSet / thingset-device-library

ThingSet library for resource-constrained devices written in C/C++
https://thingset.io/thingset-device-library/
Apache License 2.0
14 stars 6 forks source link

Move examples into dedicated folder #20

Closed martinjaeger closed 3 years ago

martinjaeger commented 3 years ago

The main purpose of the PR is to move the example out of the library's src directory to fix #18.

In addition to the existing sample I also added a more basic one with a very simple and flat data objects structure, which required a small fix in the text mode to allow the flat hierarchy.

The flat hierarchy is currently not properly covered by unit tests because it requires a different (additional) test dataset. I would also like to allow ? command for larger data sets and avoid returning "Bad Request" as soon as a group is found at the root level. But those changes would require quite a bit of effort, so I leave that for an additional PR.