Avionics
Dropship Simulator
Watch.h
Go to the documentation of this file.
1 #include "../Message.h"
2 #include "../Nullable.h"
3 #include <vector>
4 #include "../Enumerations.h"
5 
6 class Watch
7 {
8 public:
10  std::string guid;
12  float* currentState = nullptr;
14 
16  std::string onClear;
22  bool sendEmail = true;
23 
24  class Condition
25  {
26  public:
28  std::wstring message;
42  bool messageOnStack = false;
44  float secondsSinceLast = 0.0f;
45  };
46 
47  std::vector<Condition> conditions;
48 };
std::wstring message
message to add
Definition: Watch.h:28
bool messageOnStack
is this message currently on the stack
Definition: Watch.h:42
Nullable< Systems::Fault > fault
fault that triggers this condition
Definition: Watch.h:40
std::vector< Condition > conditions
Definition: Watch.h:47
MessageLevel level
message level
Definition: Watch.h:30
Systems::Fault * faultState
Definition: Watch.h:13
std::string guid
component to watch
Definition: Watch.h:10
Nullable< float > repeatAbove
above this threshold will retrigger this condition every minute
Definition: Watch.h:38
Nullable< float > repeatBelow
below this threshold will retrigger this condition every minute
Definition: Watch.h:36
Nullable< float > above
above this threshold will trigger this condition
Definition: Watch.h:34
float * currentState
Definition: Watch.h:12
bool sendEmail
[environmental] sendEmails for watch
Definition: Watch.h:22
Nullable< float > below
below this threshold will trigger this condition
Definition: Watch.h:32
Definition: Watch.h:6
Nullable< SYSTEMTIME > quietStart
[environmental] on or after this time we will not send onClear emails
Definition: Watch.h:18
std::string onClear
[environmental] sent via email when all conditions clear
Definition: Watch.h:16
Nullable< SYSTEMTIME > quietEnd
[environmental] before this time we will not send onClear emails
Definition: Watch.h:20
MessageLevel
Definition: Message.h:5
float secondsSinceLast
keeps track of time since last repeat trigger
Definition: Watch.h:44