Fawkes API Fawkes Development Version
writer_listener.h
1
2/***************************************************************************
3 * writer_listener.h - Sync Writer Interface Listener
4 *
5 * Created: Fri Jun 05 16:14:37 2009
6 * Copyright 2006-2009 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _PLUGINS_BBSYNC_WRITER_LISTENER_H_
24#define _PLUGINS_BBSYNC_WRITER_LISTENER_H_
25
26#include <blackboard/interface_listener.h>
27
28namespace fawkes {
29class BlackBoard;
30class Logger;
31} // namespace fawkes
32
34
36{
37public:
39 fawkes::Logger * logger,
40 const char * desc);
41
42 void add_interface(fawkes::Interface *interface);
43 void remove_interface(fawkes::Interface *interface);
44
45 // BlackBoardInterfaceListener
46 virtual void bb_interface_writer_added(fawkes::Interface *interface,
47 fawkes::Uuid instance_serial) noexcept;
48 virtual void bb_interface_writer_removed(fawkes::Interface *interface,
49 fawkes::Uuid instance_serial) noexcept;
50
51private:
52 fawkes::Logger * logger_;
54};
55
56#endif
Thread to synchronize two BlackBoards.
Definition: sync_thread.h:49
Listener for writer events in bbsync plugin.
SyncWriterInterfaceListener(BlackBoardSynchronizationThread *sync_thread, fawkes::Logger *logger, const char *desc)
Constructor.
void add_interface(fawkes::Interface *interface)
Add an interface to listen to.
virtual void bb_interface_writer_removed(fawkes::Interface *interface, fawkes::Uuid instance_serial) noexcept
A writing instance has been closed for a watched interface.
virtual void bb_interface_writer_added(fawkes::Interface *interface, fawkes::Uuid instance_serial) noexcept
A writing instance has been opened for a watched interface.
void remove_interface(fawkes::Interface *interface)
Remove an interface to listen to.
BlackBoard interface listener.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
Interface for logging.
Definition: logger.h:42
A convenience class for universally unique identifiers (UUIDs).
Definition: uuid.h:29
Fawkes library namespace.