22 #include "gex_sender_thread.h" 23 #include <plugins/gossip/gossip/gossip_group.h> 25 #include "TestMessage.pb.h" 36 :
Thread(
"GossipExampleSenderThread",
Thread::OPMODE_WAITFORWAKEUP),
68 if (now - last_sent_ >= 2.0) {
73 gossip_example::TestMessage m;
74 m.set_counter(++counter_);
Fawkes library namespace.
A class for handling time.
Thread class encapsulation of pthreads.
Thread aspect to communicate with a group of robots.
Logger * logger
This is the Logger member used to access the logger.
Clock * clock
By means of this member access to the clock is given.
Thread aspect to use blocked timing.
RefPtr< GossipGroup > gossip_group
Gossip group to communicate with other robots.
long get_nsec() const
Get nanoseconds.
virtual void init()
Initialize the thread.
const char * name() const
Get name of thread.
long get_sec() const
Get seconds.
virtual ~GossipExampleSenderThread()
Destructor.
virtual void log_debug(const char *component, const char *format,...)=0
Log debug message.
virtual void loop()
Code to execute in the thread.
GossipExampleSenderThread()
Constructor.
virtual void finalize()
Finalize the thread.