23 #include <plugins/examples/ballposlog/thread.h> 24 #include <interfaces/ObjectPositionInterface.h> 36 :
Thread(
"BallPosLogThread",
37 Thread::OPMODE_WAITFORWAKEUP),
53 wm_ball_interface = NULL;
58 get_uint(
"/ballposlog/log_level");
76 wm_ball_interface->
read();
79 "Ball is at global (x,y) = (%f,%f)",
ObjectPositionInterface Fawkes BlackBoard Interface.
Fawkes library namespace.
virtual void loop()
Code to execute in the thread.
Thread class encapsulation of pthreads.
virtual void finalize()
Finalize the thread.
Logger * logger
This is the Logger member used to access the logger.
BallPosLogThread()
Constructor.
float world_y() const
Get world_y value.
virtual void init()
Initialize the thread.
Thread aspect to use blocked timing.
Base class for exceptions in Fawkes.
void read()
Read from BlackBoard into local copy.
virtual ~BallPosLogThread()
Destructor.
virtual Interface * open_for_reading(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for reading.
float world_x() const
Get world_x value.
virtual void log(LogLevel level, const char *component, const char *format,...)
Log message of given log level.
Configuration * config
This is the Configuration member used to access the configuration.
BlackBoard * blackboard
This is the BlackBoard instance you can use to interact with the BlackBoard.
virtual void close(Interface *interface)=0
Close interface.