GAMS  1.2.2
PlatformStatus.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_VARIABLES_PLATFORM_H_
55 #define _GAMS_VARIABLES_PLATFORM_H_
56 
57 #include <vector>
58 #include <map>
59 #include <string>
60 
61 #include "gams/GamsExport.h"
62 #include "madara/knowledge/containers/Integer.h"
63 #include "madara/knowledge/KnowledgeBase.h"
64 #include "gams/variables/Agent.h"
65 
66 namespace gams
67 {
68  namespace variables
69  {
74  {
75  public:
79  PlatformStatus ();
80 
84  ~PlatformStatus ();
85 
90  void operator= (const PlatformStatus & rhs);
91 
97  void init_vars (madara::knowledge::KnowledgeBase & knowledge,
98  const std::string & new_name = "");
99 
105  void init_vars (madara::knowledge::Variables & knowledge,
106  const std::string & new_name = "");
107 
109  std::string name;
110 
112  std::string prefix;
113 
115  //Agent agent;
116 
118  madara::knowledge::containers::Integer communication_available;
119 
121  madara::knowledge::containers::Integer deadlocked;
122 
124  madara::knowledge::containers::Integer failed;
125 
127  madara::knowledge::containers::Integer gps_spoofed;
128 
130  madara::knowledge::containers::Integer movement_available;
131 
133  madara::knowledge::containers::Integer moving;
134 
136  madara::knowledge::containers::Integer rotating;
137 
139  madara::knowledge::containers::Integer ok;
140 
142  madara::knowledge::containers::Integer paused_moving;
143 
145  madara::knowledge::containers::Integer paused_rotating;
146 
148  madara::knowledge::containers::Integer reduced_sensing;
149 
151  madara::knowledge::containers::Integer reduced_movement;
152 
154  madara::knowledge::containers::Integer sensors_available;
155 
157  madara::knowledge::containers::Integer waiting;
158 
159  protected:
164  std::string make_variable_prefix () const;
165 
169  void init_variable_values ();
170  };
171 
174 
176  typedef std::map <std::string, PlatformStatus> Platforms;
177 
179  typedef Platforms PlatformStatuses;
180 
182  typedef std::vector <std::string> PlatformNames;
183  }
184 }
185 
186 #endif // _GAMS_VARIABLES_PLATFORM_H_
madara::knowledge::containers::Integer reduced_sensing
status flag for reduced sensing available
madara::knowledge::containers::Integer rotating
status flag for rotating to an angle
madara::knowledge::containers::Integer reduced_movement
status flag for reduced movement available
madara::knowledge::containers::Integer failed
status flag for failed
madara::knowledge::containers::Integer waiting
status flag for waiting
madara::knowledge::containers::Integer sensors_available
status flag for full sensor availability
std::vector< std::string > PlatformNames
a list of sensor names
madara::knowledge::containers::Integer ok
status flag for ok
madara::knowledge::containers::Integer moving
status flag for moving to a location
madara::knowledge::containers::Integer gps_spoofed
status flag for the detection of active spoofing of GPS
GAMS_EXPORT void init_vars(AccentStatuses &variables, madara::knowledge::KnowledgeBase &knowledge, const std::string &prefix)
Initializes accent status containers.
Contains all GAMS-related tools, classes and code.
std::map< std::string, PlatformStatus > Platforms
a map of sensor names to the sensor information
#define GAMS_EXPORT
Definition: GamsExport.h:20
Platforms PlatformStatuses
a typedef for convenience and legibility
std::string name
the id of this agent
PlatformStatus Platform
deprecated typedef. Please use PlatformStatus instead.
madara::knowledge::containers::Integer deadlocked
status flag for deadlocked
madara::knowledge::containers::Integer paused_moving
status flag for paused while moving to a location
Copyright (c) 2014-2018 Carnegie Mellon University.
madara::knowledge::containers::Integer movement_available
status flag for full movement availability
std::string prefix
the prefix of the platform status variables in the knowledge base
A container for platform status information.
madara::knowledge::containers::Integer communication_available
the agent-specific variables
madara::knowledge::containers::Integer paused_rotating
status flag for paused while rotating to anangle