![]() |
COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Class to manage Event information. More...
#include <event.h>
Public Member Functions | |
| Event () | |
| Default constructor. More... | |
| ~Event () | |
| Destructor. More... | |
| void | set_command (string jstring) |
| Sets Event information from a JSON formatted string. More... | |
| void | set_utcexec () |
| Sets Event::utcexec to current time. More... | |
| void | set_actual () |
| Sets Event::flag to indicate the event has actually executed (i.e. EVENT_FLAG_ACTUAL) More... | |
| string | get_name () |
| Retrieves Event::name. More... | |
| string | get_event_string () |
| Retrieves Event information. More... | |
| double | getUtc () |
| Retrieves Event::mjd. More... | |
| string | getTime () |
| Retrieves Event::mjd. More... | |
| double | getUtcExec () |
| Retrieves Event::utcexec. More... | |
| string | get_data () |
| Retrieves Event::data. More... | |
| bool | is_ready () |
| Determines if it is time for the Event to execute. More... | |
| bool | is_repeat () |
| Determines if the Event repeatable. More... | |
| bool | is_command () |
| Determines if the Event is a command. More... | |
| bool | is_conditional () |
| Determines if the Event is a conditional command. More... | |
| bool | is_solo () |
| Determines if the Event is a solo command. More... | |
| bool | is_alreadyrun () |
| Determines if the Event has already run. More... | |
| void | set_alreadyrun (bool value) |
| string | generator (string name, string data, double utc, string condition, uint32_t flag) |
| string | generator (eventstruc event) |
| bool | condition_true (cosmosstruc *cinfo) |
Public Attributes | |
| double | mjd |
| double | utcexec =0. |
| string | name |
| uint32_t | type |
| uint32_t | flag |
| string | data |
| string | condition |
| bool | already_ran |
| uint32_t | true_count =0 |
| string | event_string |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Event &cmd) |
| Extraction operator. More... | |
| bool | operator== (const Event &cmd1, const Event &cmd2) |
| Equality operator. More... | |
Class to manage Event information.
An Event is a collection of information related to a single occurance.
| Cosmos::Event::Event | ( | ) |
Default constructor.
| void Cosmos::Event::set_command | ( | string | jstring | ) |
Sets Event information from a JSON formatted string.
| jstring | Event information string formatted as JSON |
This function copies all Event information (from a JSON formatted string) into the current Event object
|
inline |
Sets Event::utcexec to current time.
This function is called after event execution and updates the execution time.
|
inline |
Sets Event::flag to indicate the event has actually executed (i.e. EVENT_FLAG_ACTUAL)
This function is called after event execution and updates the execution status.
|
inline |
| string Cosmos::Event::get_event_string | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Determines if it is time for the Event to execute.
|
inline |
Determines if the Event repeatable.
|
inline |
Determines if the Event is a command.
|
inline |
Determines if the Event is a conditional command.
|
inline |
Determines if the Event is a solo command.
|
inline |
Determines if the Event has already run.
|
inline |
| string Cosmos::Event::generator | ( | string | name, |
| string | data, | ||
| double | utc, | ||
| string | condition, | ||
| uint32_t | flag | ||
| ) |
| string Cosmos::Event::generator | ( | eventstruc | event | ) |
| bool Cosmos::Event::condition_true | ( | cosmosstruc * | cinfo | ) |
Extraction operator.
| out | Reference to ostream |
| cmd | Reference to const Event |
Writes the given Event to the given output stream (in JSON format) and returns a reference to the modified ostream.
Equality operator.
| cmd1 | First event |
| cmd2 | Second event |
| double Cosmos::Event::mjd |
Event start time (Modified Julian Date)
| double Cosmos::Event::utcexec =0. |
Event execution time (Coordinated Universal Time) – JIMNOTE: but appears to be using MJD in the code? should it be named mjdexec?
| string Cosmos::Event::name |
Event name
| uint32_t Cosmos::Event::type |
Event type
| uint32_t Cosmos::Event::flag |
Event flag
| string Cosmos::Event::data |
Event data
| string Cosmos::Event::condition |
Event condition
| bool Cosmos::Event::already_ran |
Event run indicators
| uint32_t Cosmos::Event::true_count =0 |
| string Cosmos::Event::event_string |
Event information stored as a JSON string