23 #ifndef __PLUGINS_BBLOGGER_LOG_THREAD_H_
24 #define __PLUGINS_BBLOGGER_LOG_THREAD_H_
26 #include <core/threading/thread.h>
27 #include <aspect/logging.h>
28 #include <aspect/configurable.h>
29 #include <aspect/blackboard.h>
30 #include <aspect/clock.h>
31 #include <blackboard/interface_listener.h>
33 #include <core/utils/lock_queue.h>
34 #include <core/threading/thread_list.h>
43 class SwitchInterface;
56 const char *logdir,
bool buffering,
bool flushing,
71 unsigned int instance_serial)
throw();
73 unsigned int instance_serial)
throw();
76 protected:
virtual void run() { Thread::run(); }
81 void write_chunk(
const void *chunk);
87 unsigned int __num_data_items;
88 unsigned int __session_start;
111 unsigned int __act_queue;
virtual bool bb_interface_message_received(fawkes::Interface *interface, fawkes::Message *message)
BlackBoard message received notification.
Thread aspect to access to BlackBoard.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
Fawkes library namespace.
virtual void finalize()
Finalize the thread.
A class for handling time.
virtual void init()
Initialize the thread.
Thread class encapsulation of pthreads.
Base class for all Fawkes BlackBoard interfaces.
virtual ~BBLoggerThread()
Destructor.
BlackBoard logger thread.
virtual void bb_interface_writer_added(fawkes::Interface *interface, unsigned int instance_serial)
A writing instance has been opened for a watched interface.
virtual void bb_interface_data_changed(fawkes::Interface *interface)
BlackBoard data changed notification.
SwitchInterface Fawkes BlackBoard Interface.
virtual void bb_interface_writer_removed(fawkes::Interface *interface, unsigned int instance_serial)
A writing instance has been closed for a watched interface.
Thread aspect to log output.
void set_enabled(bool enabled)
Enable or disable logging.
virtual void loop()
Code to execute in the thread.
BBLoggerThread(const char *iface_uid, const char *logdir, bool buffering, bool flushing, const char *scenario, fawkes::Time *start_time)
Constructor.
void set_threadlist(fawkes::ThreadList &thread_list)
Set threadlist and master status.
Thread aspect to access configuration data.
virtual void run()
Stub to see name in backtrace for easier debugging.
const char * get_filename() const
Get filename.
Mutex mutual exclusion lock.
BlackBoard interface listener.