![]() |
COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Payload (PLOAD) structure. More...
#include <jsondef.h>
Public Member Functions | |
| json11::Json | to_json () const |
| Convert class contents to JSON object. More... | |
| void | from_json (const string &s) |
| Set class contents from JSON string. More... | |
Public Attributes | |
| uint16_t | key_cnt = 0 |
| Number of keys being used. More... | |
| uint16_t | keyidx [10] = {0} |
| Name for each key. More... | |
| float | keyval [10] = {0.f} |
| Value for each key. More... | |
Payload (PLOAD) structure.
You can define up to MAXPLOADKEYCNT keys by giving them unique names. You can then set double precision values for these keys in the dynamic structure.
|
inline |
|
inline |
Set class contents from JSON string.
Parses the provided JSON-formatted string and sets the class data. String should be formatted like the string returned from to_json()
| s | JSON-formatted string to set class contents to |
| uint16_t ploadstruc::key_cnt = 0 |
Number of keys being used.
| uint16_t ploadstruc::keyidx[10] = {0} |
Name for each key.
| float ploadstruc::keyval[10] = {0.f} |
Value for each key.