20 #ifdef FARSA_USE_YARP_AND_ICUB
22 #ifndef WORLDCONTROLLER_H
23 #define WORLDCONTROLLER_H
25 #include "worldsimconfig.h"
27 #include "yarpobject.h"
31 #include <QStringList>
36 class WorldController;
37 class ServerWorldController;
39 typedef QHash<QString, yarp::os::Bottle (ServerWorldController::*)(const yarp::os::Bottle&)> cmdHandlerHash;
59 void applyQueuedCommands();
65 yarp::os::Bottle startCmd(
const yarp::os::Bottle& );
67 yarp::os::Bottle pauseCmd(
const yarp::os::Bottle& );
69 yarp::os::Bottle stopCmd(
const yarp::os::Bottle& );
71 yarp::os::Bottle advanceCmd(
const yarp::os::Bottle& );
73 yarp::os::Bottle makeCmd(
const yarp::os::Bottle& );
75 yarp::os::Bottle setCmd(
const yarp::os::Bottle& );
77 yarp::os::Bottle setWorldCmd(
const yarp::os::Bottle& cmd );
79 yarp::os::Bottle setObjectCmd(
const yarp::os::Bottle& cmd,
WObject*
object );
85 cmdHandlerHash asyn_cmds;
91 cmdHandlerHash syn_cmds;
93 QQueue<yarp::os::Bottle> queue_cmds;
114 virtual void update();
127 yarp::os::Port* inport;
129 yarp::os::Port* outport;
136 #endif // FARSA_USE_YARP_AND_ICUB