GAMS  1.4.0
AlgorithmStatus.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_VARIABLES_ALGORITHM_H_
55 #define _GAMS_VARIABLES_ALGORITHM_H_
56 
57 #include <string>
58 #include <vector>
59 #include <map>
60 
61 #include "gams/GamsExport.h"
62 #include "madara/knowledge/containers/Integer.h"
63 #include "madara/knowledge/KnowledgeBase.h"
64 #include "Agent.h"
65 
66 
67 namespace gams
68 {
69  namespace variables
70  {
75  {
76  public:
81 
86 
91  void operator=(const AlgorithmStatus & rhs);
92 
99  void init_vars(madara::knowledge::KnowledgeBase & knowledge,
100  const std::string & new_name, const std::string & agent_prefix);
101 
108  void init_vars(madara::knowledge::Variables & knowledge,
109  const std::string & new_name, const std::string & agent_prefix);
110 
117  void init_vars(madara::knowledge::KnowledgeBase & knowledge,
118  const std::string & new_name, int i);
119 
126  void init_vars(madara::knowledge::Variables & knowledge,
127  const std::string & new_name, int i);
128 
133 
135  int id;
136 
138  std::string name;
139 
141  //Agent agent;
142 
144  madara::knowledge::containers::Integer deadlocked;
145 
147  madara::knowledge::containers::Integer failed;
148 
150  madara::knowledge::containers::Integer ok;
151 
153  madara::knowledge::containers::Integer paused;
154 
156  madara::knowledge::containers::Integer unknown;
157 
159  madara::knowledge::containers::Integer waiting;
160 
162  madara::knowledge::containers::Integer finished;
163 
164  protected:
168  std::string make_variable_prefix() const;
169  };
170 
173 
175  typedef std::map <std::string, AlgorithmStatus> Algorithms;
176 
179 
181  typedef std::vector <std::string> AlgorithmNames;
182  }
183 }
184 
185 #endif // _GAMS_VARIABLES_ALGORITHM_H_
Copyright(c) 2014-2018 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
A container for algorithm status information.
madara::knowledge::containers::Integer waiting
status flag for waiting
void init_vars(madara::knowledge::KnowledgeBase &knowledge, const std::string &new_name, const std::string &agent_prefix)
Initializes variable containers.
void operator=(const AlgorithmStatus &rhs)
Assignment operator.
std::string make_variable_prefix() const
Get prefix for variables.
void init_vars(madara::knowledge::Variables &knowledge, const std::string &new_name, int i)
Initializes variable containers(DEPRECATED)
madara::knowledge::containers::Integer ok
status flag for ok
madara::knowledge::containers::Integer unknown
status flag for unknown
madara::knowledge::containers::Integer failed
status flag for failed
madara::knowledge::containers::Integer deadlocked
the agent-specific variables
void init_variable_values()
Initialize variable values.
void init_vars(madara::knowledge::Variables &knowledge, const std::string &new_name, const std::string &agent_prefix)
Initializes variable containers.
madara::knowledge::containers::Integer paused
status flag for ok
void init_vars(madara::knowledge::KnowledgeBase &knowledge, const std::string &new_name, int i)
Initializes variable containers(DEPRECATED)
std::string name
the name of the algorithm
madara::knowledge::containers::Integer finished
status flag for finished
std::map< std::string, AlgorithmStatus > Algorithms
a map of sensor names to the sensor information
AlgorithmStatus Algorithm
deprecated typedef. Please use AlgorithmStatus instead.
std::vector< std::string > AlgorithmNames
a list of sensor names
Algorithms AlgorithmStatuses
a typedef for convenience and legibility
Contains all GAMS-related tools, classes and code.