3 #ifndef __SYNC_PERIODIC_THREAD_HPP__
4 #define __SYNC_PERIODIC_THREAD_HPP__
9 #include <yarp/os/Bottle.h>
10 #include <yarp/os/PeriodicThread.h>
11 #include <yarp/os/Port.h>
12 #include <yarp/os/PortWriterBuffer.h>
14 #include "FutureTask.hpp"
15 #include "SingleBusBroker.hpp"
16 #include "StateObserver.hpp"
38 bool openPort(
const std::string & name);
42 { this->syncObserver = syncObserver; }
48 std::vector<SingleBusBroker *> & brokers;
51 yarp::os::Port syncPort;
52 yarp::os::PortWriterBuffer<yarp::os::Bottle> syncWriter;
Base class for an abstract factory of FutureTask.
Definition: FutureTask.hpp:56
Periodic SYNC signal emitter.
Definition: SyncPeriodicThread.hpp:29
SyncPeriodicThread(std::vector< SingleBusBroker * > &brokers, FutureTaskFactory *taskFactory)
Constructor, manages the lifetime of taskFactory.
Definition: SyncPeriodicThread.cpp:13
void run() override
Periodic task.
Definition: SyncPeriodicThread.cpp:44
void setObserver(TypedStateObserver< double > *syncObserver)
Set synchronization observer.
Definition: SyncPeriodicThread.hpp:41
bool openPort(const std::string &name)
Open synchronization port.
Definition: SyncPeriodicThread.cpp:35
~SyncPeriodicThread() override
Destructor.
Definition: SyncPeriodicThread.cpp:22
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6