icub-client
guiUpdater.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 WYSIWYD Consortium, European Commission FP7 Project ICT-612139
3  * Authors: Stéphane Lallée
4  * email: stephane.lallee@gmail.com
5  * Permission is granted to copy, distribute, and/or modify this program
6  * under the terms of the GNU General Public License, version 2 or any
7  * later version published by the Free Software Foundation.
8  *
9  * A copy of the license can be found at
10  * icub-client/license/gpl.txt
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15  * Public License for more details
16 */
17 
18 #ifndef __GUIUPV2_H__
19 #define __GUIUPV2_H__
20 
21 #include <string>
22 #include <yarp/os/all.h>
23 #include <yarp/sig/all.h>
25 
26 using namespace std;
27 using namespace yarp::os;
28 using namespace yarp::sig;
29 using namespace icubclient;
30 
34 class GuiUpdater: public RFModule
35 {
36 protected:
39  RpcServer handlerPort; //a port to handle messages
40  RpcClient toGui;
41  RpcClient toGuiBase;
42  list<shared_ptr<Entity>> oldEntities;
44 
45 public:
46  bool configure(yarp::os::ResourceFinder &rf); // configure all the module parameters and return true if successful
47  bool interruptModule(); // interrupt, e.g., the ports
48  bool close(); // close and shut down the module
49  bool respond(const yarp::os::Bottle& command, yarp::os::Bottle& reply);
50  double getPeriod();
51  bool updateModule();
52 
56  void resetGUI();
57 
63  void deleteObject(const string &opcTag, Object* o = nullptr);
64 
69  void addObject(Object* o);
70 
75  void addAgent(Agent* a);
76 
81  void addiCub(Agent* a);
82 
88  bool isDisplayable(Entity* entity);
89 };
90 
91 #endif
Represent any entity that can be stored within the OPC.
Definition: entity.h:40
Agent * iCub
Definition: guiUpdater.h:38
OPCClient * opc
Definition: guiUpdater.h:37
list< shared_ptr< Entity > > oldEntities
Definition: guiUpdater.h:42
RpcClient toGuiBase
Definition: guiUpdater.h:41
STL namespace.
Represent any physical entity (including objects and agents) that can be stored within the OPC...
Definition: object.h:35
Represent an agent.
Definition: agent.h:93
RpcClient toGui
Definition: guiUpdater.h:40
An OPC client using the datastructures defined within the icub-client library.
Definition: opcClient.h:35
bool displaySkeleton
Definition: guiUpdater.h:43
RpcServer handlerPort
Definition: guiUpdater.h:39