GAMS  1.4.0
Wait.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_WAIT_H_
55 #define _GAMS_ALGORITHMS_WAIT_H_
56 
58 
59 #include <string>
60 
61 #include "gams/variables/Sensor.h"
64 #include "gams/variables/Self.h"
66 #include "madara/utility/EpochEnforcer.h"
67 
68 namespace gams
69 {
70  namespace algorithms
71  {
76  {
77  public:
87  const double& wait_time,
88  madara::knowledge::KnowledgeBase * knowledge = 0,
89  platforms::BasePlatform * platform = 0,
90  variables::Sensors * sensors = 0,
91  variables::Self * self = 0);
92 
96  ~Wait();
97 
102  void operator=(const Wait & rhs);
103 
108  virtual int analyze(void);
109 
114  virtual int execute(void);
115 
120  virtual int plan(void);
121 
122  protected:
124  madara::utility::EpochEnforcer<std::chrono::steady_clock> enforcer_;
125  };
126 
131  {
132  public:
133 
149  const madara::knowledge::KnowledgeMap & args,
150  madara::knowledge::KnowledgeBase * knowledge,
151  platforms::BasePlatform * platform,
152  variables::Sensors * sensors,
153  variables::Self * self,
154  variables::Agents * agents);
155  };
156  }
157 }
158 
159 #endif // _GAMS_ALGORITHMS_WAIT_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 Wait algorithms.
Definition: Wait.h:131
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 Wait Algorithm.
An algorithm for waiting.
Definition: Wait.h:76
void operator=(const Wait &rhs)
Assignment operator.
madara::utility::EpochEnforcer< std::chrono::steady_clock > enforcer_
an enforcer for max wait time
Definition: Wait.h:124
Wait(const double &wait_time, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0)
Constructor.
virtual int plan(void)
Plans the next execution of the algorithm.
virtual int analyze(void)
Analyzes environment, platform, or other information.
virtual int execute(void)
Plans the next execution of the algorithm.
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.