30 #ifndef COSMOS_COMMAND_H 31 #define COSMOS_COMMAND_H 49 #define MAXCOMMANDWORD 20 218 #endif // COSMOS_COMMAND_H #define EVENT_TYPE_COMMAND
Definition: cosmos-defs.h:215
Definition: agentclass.cpp:54
bool is_alreadyrun()
Determines if the Event has already run.
Definition: event.h:179
uint32_t flag
Definition: event.h:70
string name
Definition: event.h:66
Class to manage Event information.
Definition: event.h:57
uint32_t true_count
Definition: event.h:77
bool already_ran
Definition: event.h:76
double mjd
Definition: event.h:62
string generator(string name, string data, double utc, string condition, uint32_t flag)
Definition: event.cpp:53
uint32_t type
Definition: event.h:68
#define EVENT_FLAG_TRUE
Event true last time.
Definition: cosmos-defs.h:173
double utcexec
Definition: event.h:64
string data
Definition: event.h:72
#define EVENT_FLAG_SOLO
Command Event should run by itself.
Definition: cosmos-defs.h:175
string condition
Definition: event.h:74
#define EVENT_FLAG_ACTUAL
Event actualy happened (versus being predicted).
Definition: cosmos-defs.h:164
bool is_repeat()
Determines if the Event repeatable.
Definition: event.h:155
#define EVENT_FLAG_REPEAT
Repeating event.
Definition: cosmos-defs.h:171
string get_event_string()
Retrieves Event information.
Definition: event.cpp:138
double getUtcExec()
Retrieves Event::utcexec.
Definition: event.h:137
void set_command(string jstring)
Sets Event information from a JSON formatted string.
Definition: event.cpp:118
bool is_conditional()
Determines if the Event is a conditional command.
Definition: event.h:167
JSON Support definitions.
Headers and definitions common to all COSMOS.
bool is_command()
Determines if the Event is a command.
Definition: event.h:161
string getTime()
Retrieves Event::mjd.
Definition: event.h:131
string event_string
Definition: event.h:79
Full COSMOS Event structure.
Definition: jsondef.h:1093
void set_utcexec()
Sets Event::utcexec to current time.
Definition: event.h:101
double getUtc()
Retrieves Event::mjd.
Definition: event.h:125
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
bool condition_true(cosmosstruc *cinfo)
Definition: event.cpp:158
bool is_solo()
Determines if the Event is a solo command.
Definition: event.h:173
Event()
Default constructor.
Definition: event.cpp:39
bool is_ready()
Determines if it is time for the Event to execute.
Definition: event.h:149
#define EVENT_FLAG_CONDITIONAL
Conditional event.
Definition: cosmos-defs.h:169
~Event()
Destructor.
Definition: event.cpp:51
friend bool operator==(const Event &cmd1, const Event &cmd2)
Equality operator.
Definition: event.cpp:103
string get_data()
Retrieves Event::data.
Definition: event.h:143
Definition: jsondef.h:4199
string mjd2iso8601(double mjd)
Definition: timelib.cpp:1316
void set_actual()
Sets Event::flag to indicate the event has actually executed (i.e. EVENT_FLAG_ACTUAL) ...
Definition: event.h:107
friend std::ostream & operator<<(std::ostream &out, const Event &cmd)
Extraction operator.
Definition: event.cpp:82
void set_alreadyrun(bool value)
Definition: event.h:180
string get_name()
Retrieves Event::name.
Definition: event.h:113