GAMS  1.4.0
DebugAlgorithm.h
Go to the documentation of this file.
1 
55 #ifndef _GAMS_ALGORITHMS_DEBUG_H_
56 #define _GAMS_ALGORITHMS_DEBUG_H_
57 
58 #include <string>
59 
60 #include "madara/knowledge/containers/Integer.h"
61 
62 #include "gams/GamsExport.h"
63 #include "gams/variables/Sensor.h"
66 #include "gams/variables/Self.h"
69 
70 namespace gams
71 {
72  namespace algorithms
73  {
78  {
79  public:
91  madara::knowledge::KnowledgeBase * knowledge = 0,
92  platforms::BasePlatform * platform = 0,
93  variables::Sensors * sensors = 0,
94  variables::Self * self = 0,
95  const std::string & executions_location = ".executions");
96 
101 
106  void operator=(const DebugAlgorithm & rhs);
107 
112  virtual int analyze(void);
113 
118  virtual int execute(void);
119 
124  virtual int plan(void);
125 
126  protected:
134  madara::knowledge::containers::Integer k_executions_;
135  };
136 
141  {
142  public:
143 
161  const madara::knowledge::KnowledgeMap & args,
162  madara::knowledge::KnowledgeBase * knowledge,
163  platforms::BasePlatform * platform,
164  variables::Sensors * sensors,
165  variables::Self * self,
166  variables::Agents * agents);
167  };
168  }
169 }
170 
171 #endif // _GAMS_ALGORITHMS_DEBUG_H_
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Base class for algorithm factories that classes derived from.
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:95
A factory class for creating Debug Algorithms.
virtual BaseAlgorithm * create(const madara::knowledge::KnowledgeMap &args, madara::knowledge::KnowledgeBase *knowledge, platforms::BasePlatform *platform, variables::Sensors *sensors, variables::Self *self, variables::Agents *agents)
Creates a Debug Algorithm.
A debug algorithm that prints detailed status information.
madara::knowledge::containers::Integer k_executions_
Used to keep track of algorithm executions in a way that may be referenced from other platforms or al...
void operator=(const DebugAlgorithm &rhs)
Assignment operator.
virtual int analyze(void)
Analyzes environment, platform, or other information.
virtual int execute(void)
Plans the next execution of the algorithm.
virtual int plan(void)
Plans the next execution of the algorithm.
DebugAlgorithm(madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, const std::string &executions_location=".executions")
Constructor.
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A container for self referencing information.
Definition: Self.h:70
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
std::vector< Agent > Agents
An array of agent knowledge.
Definition: Agent.h:246
Contains all GAMS-related tools, classes and code.