COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Full COSMOS Event 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 | |
double | utc = 0. |
Time event is to start. More... | |
double | utcexec = 0. |
Time event was executed. More... | |
char | node [40+1] = "" |
Node for event. More... | |
char | name [40+1] = "" |
Name of event. More... | |
char | user [40+1] = "" |
User of event. More... | |
uint32_t | flag = 0 |
Event flags. More... | |
uint32_t | type = 0 |
Event type. More... | |
double | value = 0. |
Value of condition. More... | |
double | dtime = 0. |
Event initial time consumed. More... | |
double | ctime = 0. |
Event continuous time consumed. More... | |
float | denergy = 0.f |
Event initial energy consumed. More... | |
float | cenergy = 0.f |
Event continuous energy consumed. More... | |
float | dmass = 0.f |
Event initial mass consumed. More... | |
float | cmass = 0.f |
Event continuous mass consumed. More... | |
float | dbytes = 0.f |
Event initial bytes consumed. More... | |
float | cbytes = 0.f |
Event continuous bytes consumed. More... | |
jsonhandle | handle |
Handle of condition that caused event, NULL if timed event. More... | |
char | data [(COSMOS_MAX_DATA)] = "" |
Event specific data. More... | |
char | condition [(COSMOS_MAX_DATA)] = "" |
Condition that caused event, NULL if timed event. More... | |
Full COSMOS Event structure.
This is the struct that holds each Event, along with associated resources and conditions.
|
inline |
Convert class contents to JSON object.
Returns a json11 JSON object of the class
|
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 |
double eventstruc::utc = 0. |
Time event is to start.
double eventstruc::utcexec = 0. |
Time event was executed.
char eventstruc::node[40+1] = "" |
Node for event.
char eventstruc::name[40+1] = "" |
Name of event.
char eventstruc::user[40+1] = "" |
User of event.
uint32_t eventstruc::flag = 0 |
Event flags.
uint32_t eventstruc::type = 0 |
Event type.
double eventstruc::value = 0. |
Value of condition.
double eventstruc::dtime = 0. |
Event initial time consumed.
double eventstruc::ctime = 0. |
Event continuous time consumed.
float eventstruc::denergy = 0.f |
Event initial energy consumed.
float eventstruc::cenergy = 0.f |
Event continuous energy consumed.
float eventstruc::dmass = 0.f |
Event initial mass consumed.
float eventstruc::cmass = 0.f |
Event continuous mass consumed.
float eventstruc::dbytes = 0.f |
Event initial bytes consumed.
float eventstruc::cbytes = 0.f |
Event continuous bytes consumed.
jsonhandle eventstruc::handle |
Handle of condition that caused event, NULL if timed event.
char eventstruc::data[(COSMOS_MAX_DATA)] = "" |
Event specific data.
char eventstruc::condition[(COSMOS_MAX_DATA)] = "" |
Condition that caused event, NULL if timed event.