Replies: 1 comment 2 replies
-
Hi @towen, We've had a very similar problem a few years ago and didn't find any existing method that fulfilled our needs, so we developed an easy to understand protocol called ThingSet, which allows to manipulate and report device data using JSON (default) or CBOR (for extremely low memory requirements like for CAN or LoRaWAN). There is a C/C++ ThingSet library which can be included as a Zephyr module. The data objects which should be exposed via ThingSet are configured in the application, see this example for our MPPT charge controller firmware. Currently, passing the data to different interfaces like UART (for shell-like access), CAN, Bluetooth and LoRa is still part of the application, but we're working on an integration into above mentioned library, so that each application would only require a few lines of code to make the whole data access layer work. All data is allocated statically. You can use different types of non-volatile storage (e.g. Zephyr Looking through your requirements, these are the aspects which are not (yet) completely fulfilled out of the box:
Feel free to ask any further questions you may have. Martin |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am designing a system that involves quite a lot of data sharing between different threads, ISRs and modules.
The idea is to replace global variables with a flexible data store which enables loose-coupling between modules, for ease of maintenance and ease of testing.
My requirements are:
malloc
is OK until just before the run state, andfree
will never be needed.I have considered the settings subsystem and CANopenNode, but it seems to be overcomplicated, and it does not work with EEPROM. Also, if I'm not mistaken, there is no way to use the values in RAM without writing them out to non-volatile storage, which is slow.
One option is for me to implement an EEPROM backend for the settings, if the settings subsystem fits the rest of the above requirements.
Another option would be to implement it manually. I have some prototype code working using linked lists or even a lightweight hashmap library, but it feels like I am reinventing the wheel.
Any advice and suggestions please?
Thanks
Tom
Related: #38841
Beta Was this translation helpful? Give feedback.
All reactions