icub-client
behaviorManager.h
Go to the documentation of this file.
1 #ifndef BEHAVIORMANAGER_H
2 #define BEHAVIORMANAGER_H
3 
4 #include <iostream>
5 #include <yarp/os/all.h>
6 #include "behavior.h"
7 
8 
12 class BehaviorManager: public yarp::os::RFModule
13 {
14 private:
15  std::vector<Behavior*> behaviors;
16 
17  std::string moduleName;
18 
19  double period;
20 
21  yarp::os::Port rpc_in_port;
22 
24 
25  yarp::os::Mutex mut;
26 
27 public:
28  BehaviorManager() : period(1.0), iCub(nullptr) {
29  ;
30  }
31 
32  bool configure(yarp::os::ResourceFinder &rf);
33 
34  bool interruptModule();
35 
36  bool close();
37 
38  double getPeriod()
39  {
40  return period;
41  }
42 
43  bool updateModule();
44 
45  //RPC & scenarios
46  bool respond(const yarp::os::Bottle& cmd, yarp::os::Bottle& reply);
47 
48 };
49 
50 #endif
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &reply)
Grants access to high level motor commands (grasp, touch, look, goto, etc) of the robot as well as it...
Definition: icubClient.h:66
bool configure(yarp::os::ResourceFinder &rf)