GAMS  1.2.2
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:
80  AlgorithmStatus ();
81 
85  ~AlgorithmStatus ();
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 
132  void init_variable_values ();
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 
178  typedef Algorithms AlgorithmStatuses;
179 
181  typedef std::vector <std::string> AlgorithmNames;
182  }
183 }
184 
185 #endif // _GAMS_VARIABLES_ALGORITHM_H_
std::string name
the name of the algorithm
A container for algorithm status information.
madara::knowledge::containers::Integer deadlocked
the agent-specific variables
madara::knowledge::containers::Integer failed
status flag for failed
std::map< std::string, AlgorithmStatus > Algorithms
a map of sensor names to the sensor information
AlgorithmStatus Algorithm
deprecated typedef. Please use AlgorithmStatus instead.
GAMS_EXPORT void init_vars(AccentStatuses &variables, madara::knowledge::KnowledgeBase &knowledge, const std::string &prefix)
Initializes accent status containers.
madara::knowledge::containers::Integer ok
status flag for ok
std::vector< std::string > AlgorithmNames
a list of sensor names
madara::knowledge::containers::Integer finished
status flag for finished
Contains all GAMS-related tools, classes and code.
madara::knowledge::containers::Integer paused
status flag for ok
#define GAMS_EXPORT
Definition: GamsExport.h:20
madara::knowledge::containers::Integer waiting
status flag for waiting
Copyright (c) 2014-2018 Carnegie Mellon University.
madara::knowledge::containers::Integer unknown
status flag for unknown
Algorithms AlgorithmStatuses
a typedef for convenience and legibility