COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Telemetry (TELEM) 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 | type = 0 |
Data type. More... | |
uint8_t | vuint8 = 0 |
Union of data. More... | |
int8_t | vint8 = 0 |
uint16_t | vuint16 = 0 |
int16_t | vint16 = 0 |
uint32_t | vuint32 = 0 |
int32_t | vint32 = 0 |
float | vfloat = 0.f |
double | vdouble = 0.f |
char | vstring [40+1] = "" |
Telemetry (TELEM) structure.
This provides access to a union of a variety of possible data types, along with an optional indicator of what type the data actually is. The same data is then accessible as all supported data types, both in the structure and the Namespace.
|
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 telemstruc::type = 0 |
Data type.
uint8_t telemstruc::vuint8 = 0 |
Union of data.
int8_t telemstruc::vint8 = 0 |
uint16_t telemstruc::vuint16 = 0 |
int16_t telemstruc::vint16 = 0 |
uint32_t telemstruc::vuint32 = 0 |
int32_t telemstruc::vint32 = 0 |
float telemstruc::vfloat = 0.f |
double telemstruc::vdouble = 0.f |
char telemstruc::vstring[40+1] = "" |