COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
All Component 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 | |
bool | enabled = true |
Enabled? More... | |
uint16_t | type = 0 |
Component Type. More... | |
uint16_t | model = 0 |
Device Model. More... | |
uint32_t | flag = 0 |
Device flag - catch all for any small piece of information that might be device specific. More... | |
uint16_t | addr = 0 |
Device specific address. More... | |
uint16_t | cidx = 0 |
Component Index. More... | |
uint16_t | didx = 0 |
Device specific index. More... | |
uint16_t | pidx = 0 |
Piece index. More... | |
uint16_t | bidx = 0 |
Power Bus index. More... | |
uint16_t | portidx = 0 |
Connection information for device. More... | |
float | namp = 0.f |
Nominal Amperage. More... | |
float | nvolt = 0.f |
Nominal Voltage. More... | |
float | amp = 0.f |
Current Amperage. More... | |
float | volt = 0.f |
Current Voltage. More... | |
float | power = 0.f |
Current Power. More... | |
float | energy = 0.f |
Total energy usage. More... | |
float | drate = 0.f |
Current data rate. More... | |
float | temp = 0.f |
Current Temperature. More... | |
double | utc = 0. |
Device information time stamp. More... | |
All Component structure.
These are the elements that are repeated in all devices. Each device specific structure has these as its first elements, followed by any specific elements. They are all then combined together in one grand union as a devicestruc.
|
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 |
bool allstruc::enabled = true |
Enabled?
uint16_t allstruc::type = 0 |
Component Type.
uint16_t allstruc::model = 0 |
Device Model.
uint32_t allstruc::flag = 0 |
Device flag - catch all for any small piece of information that might be device specific.
uint16_t allstruc::addr = 0 |
Device specific address.
uint16_t allstruc::cidx = 0 |
Component Index.
uint16_t allstruc::didx = 0 |
Device specific index.
uint16_t allstruc::pidx = 0 |
Piece index.
uint16_t allstruc::bidx = 0 |
Power Bus index.
uint16_t allstruc::portidx = 0 |
Connection information for device.
float allstruc::namp = 0.f |
Nominal Amperage.
float allstruc::nvolt = 0.f |
Nominal Voltage.
float allstruc::amp = 0.f |
Current Amperage.
float allstruc::volt = 0.f |
Current Voltage.
float allstruc::power = 0.f |
Current Power.
float allstruc::energy = 0.f |
Total energy usage.
float allstruc::drate = 0.f |
Current data rate.
float allstruc::temp = 0.f |
Current Temperature.
double allstruc::utc = 0. |
Device information time stamp.