GAMS  1.4.0
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:
80 
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 
170  };
171 
174 
176  typedef std::map <std::string, PlatformStatus> Platforms;
177 
180 
182  typedef std::vector <std::string> PlatformNames;
183  }
184 }
185 
186 #endif // _GAMS_VARIABLES_PLATFORM_H_
Copyright(c) 2014-2018 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
A container for platform status information.
std::string name
the id of this agent
madara::knowledge::containers::Integer gps_spoofed
status flag for the detection of active spoofing of GPS
madara::knowledge::containers::Integer rotating
status flag for rotating to an angle
void init_vars(madara::knowledge::KnowledgeBase &knowledge, const std::string &new_name="")
Initializes variable containers.
madara::knowledge::containers::Integer reduced_sensing
status flag for reduced sensing available
std::string prefix
the prefix of the platform status variables in the knowledge base
madara::knowledge::containers::Integer reduced_movement
status flag for reduced movement available
madara::knowledge::containers::Integer ok
status flag for ok
madara::knowledge::containers::Integer waiting
status flag for waiting
madara::knowledge::containers::Integer paused_moving
status flag for paused while moving to a location
madara::knowledge::containers::Integer paused_rotating
status flag for paused while rotating to anangle
void init_variable_values()
Initialize variable values.
void init_vars(madara::knowledge::Variables &knowledge, const std::string &new_name="")
Initializes variable containers.
madara::knowledge::containers::Integer deadlocked
status flag for deadlocked
madara::knowledge::containers::Integer communication_available
the agent-specific variables
madara::knowledge::containers::Integer sensors_available
status flag for full sensor availability
madara::knowledge::containers::Integer movement_available
status flag for full movement availability
madara::knowledge::containers::Integer moving
status flag for moving to a location
madara::knowledge::containers::Integer failed
status flag for failed
std::string make_variable_prefix() const
Get variable prefix.
void operator=(const PlatformStatus &rhs)
Assignment operator.
std::vector< std::string > PlatformNames
a list of sensor names
std::map< std::string, PlatformStatus > Platforms
a map of sensor names to the sensor information
PlatformStatus Platform
deprecated typedef. Please use PlatformStatus instead.
Platforms PlatformStatuses
a typedef for convenience and legibility
Contains all GAMS-related tools, classes and code.