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