Base controller class for JSON datapacks. More...
#include <json_datapack_controller.h>
Public Member Functions | |
| const nlohmann::json & | getEmptyDataPack () const |
Public Member Functions inherited from DataPackController< nlohmann::json > | |
| DataPackController ()=default | |
| Constructor. More... | |
| virtual | ~DataPackController ()=default |
| virtual nlohmann::json * | getDataPackInformation ()=0 |
| Get datapack information to be forwarded to the NRP. More... | |
| virtual void | handleDataPackData (const nlohmann::json &data)=0 |
| Handle received datapack data. More... | |
Protected Member Functions | |
| JsonDataPackController (const DataPackIdentifier &datapackId) | |
| Constructor that should be called by the derived class. More... | |
| void | setCachedData (const nlohmann::json &data) |
| Sets the "data" part of the cached JSON object. More... | |
| nlohmann::json * | getCachedData () |
| Returns reference to the "data" part of the cached JSON object. More... | |
Protected Attributes | |
| DataPackIdentifier | _datapackId |
| nlohmann::json | _data |
| Cached incoming/outgoing data in JSON format. More... | |
| nlohmann::json | _emptyDataPack |
Base controller class for JSON datapacks.
The class provides helper methods and common members for controllers that are used to handle JSON datapacks.
|
inlineprotected |
Constructor that should be called by the derived class.
|
inlineprotected |
Returns reference to the "data" part of the cached JSON object.
|
inline |
|
inlineprotected |
Sets the "data" part of the cached JSON object.
|
protected |
Cached incoming/outgoing data in JSON format.
The format of the data is the following: { <datapack_name> : { type : <datapack_type>, engine_name : <engine_name>, data : <data> } }
|
protected |
|
protected |