Fawkes API  Fawkes Development Version
fawkes::tf::TransformListener Class Reference

Receive transforms and answer queries. More...

#include <>>

Inheritance diagram for fawkes::tf::TransformListener:

Public Member Functions

 TransformListener (BlackBoard *bb, Transformer *tf_transformer, bool bb_is_remote=false)
 Constructor. More...
 
virtual ~TransformListener ()
 Destructor. More...
 
virtual void bb_interface_created (const char *type, const char *id) noexcept
 BlackBoard interface created notification. More...
 
virtual void bb_interface_data_refreshed (Interface *interface) noexcept
 BlackBoard data refreshed notification. More...
 
virtual void bb_interface_writer_removed (Interface *interface, Uuid instance_serial) noexcept
 A writing instance has been closed for a watched interface. More...
 
virtual void bb_interface_reader_removed (Interface *interface, Uuid instance_serial) noexcept
 A reading instance has been closed for a watched interface. More...
 
- Public Member Functions inherited from fawkes::BlackBoardInterfaceObserver
 BlackBoardInterfaceObserver ()
 Empty constructor. More...
 
virtual ~BlackBoardInterfaceObserver ()
 Destructor. More...
 
virtual void bb_interface_destroyed (const char *type, const char *id) noexcept
 BlackBoard interface destroyed notification. More...
 
- Public Member Functions inherited from fawkes::BlackBoardInterfaceListener
 BlackBoardInterfaceListener (const char *name_format,...)
 Constructor. More...
 
virtual ~BlackBoardInterfaceListener ()
 Destructor. More...
 
const char * bbil_name () const
 Get BBIL name. More...
 
virtual void bb_interface_data_changed (Interface *interface) noexcept
 BlackBoard data changed notification. More...
 
virtual bool bb_interface_message_received (Interface *interface, Message *message) noexcept
 BlackBoard message received notification. More...
 
virtual void bb_interface_writer_added (Interface *interface, Uuid instance_serial) noexcept
 A writing instance has been opened for a watched interface. More...
 
virtual void bb_interface_reader_added (Interface *interface, Uuid instance_serial) noexcept
 A reading instance has been opened for a watched interface. More...
 

Additional Inherited Members

- Public Types inherited from fawkes::BlackBoardInterfaceListener
enum  QueueEntryType { DATA = 0 , MESSAGES = 1 , READER = 2 , WRITER = 3 }
 Queue entry type. More...
 
typedef std::list< QueueEntryInterfaceQueue
 Queue of additions/removal of interfaces. More...
 
typedef std::map< std::string, Interface * > InterfaceMap
 Map of currently active event subscriptions. More...
 
- Protected Types inherited from fawkes::BlackBoardInterfaceObserver
typedef LockMap< std::string, std::list< std::string > > ObservedInterfaceLockMap
 Type for lockable interface type hash sets. More...
 
typedef ObservedInterfaceLockMap::iterator ObservedInterfaceLockMapIterator
 Type for iterator of lockable interface type hash sets. More...
 
- Protected Member Functions inherited from fawkes::BlackBoardInterfaceObserver
void bbio_add_observed_create (const char *type_pattern, const char *id_pattern="*") noexcept
 Add interface creation type to watch list. More...
 
void bbio_add_observed_destroy (const char *type_pattern, const char *id_pattern="*") noexcept
 Add interface destruction type to watch list. More...
 
ObservedInterfaceLockMapbbio_get_observed_create () noexcept
 Get interface creation type watch list. More...
 
ObservedInterfaceLockMapbbio_get_observed_destroy () noexcept
 Get interface destriction type watch list. More...
 
- Protected Member Functions inherited from fawkes::BlackBoardInterfaceListener
void bbil_add_data_interface (Interface *interface)
 Add an interface to the data modification watch list. More...
 
void bbil_add_message_interface (Interface *interface)
 Add an interface to the message received watch list. More...
 
void bbil_add_reader_interface (Interface *interface)
 Add an interface to the reader addition/removal watch list. More...
 
void bbil_add_writer_interface (Interface *interface)
 Add an interface to the writer addition/removal watch list. More...
 
void bbil_remove_data_interface (Interface *interface)
 Remove an interface to the data modification watch list. More...
 
void bbil_remove_message_interface (Interface *interface)
 Remove an interface to the message received watch list. More...
 
void bbil_remove_reader_interface (Interface *interface)
 Remove an interface to the reader addition/removal watch list. More...
 
void bbil_remove_writer_interface (Interface *interface)
 Remove an interface to the writer addition/removal watch list. More...
 
Interfacebbil_data_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_message_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_reader_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_writer_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 

Detailed Description

Receive transforms and answer queries.

This class connects to the blackboard and listens to all interfaces publishing transforms. It opens all interfaces of type TransformInterface with a TF prefix. The data is internally cached. Queries are then resolved based on the received information.

Author
Tim Niemueller

Definition at line 70 of file transform_listener.h.

Constructor & Destructor Documentation

◆ TransformListener()

fawkes::tf::TransformListener::TransformListener ( BlackBoard bb,
Transformer tf_transformer,
bool  bb_is_remote = false 
)

◆ ~TransformListener()

fawkes::tf::TransformListener::~TransformListener ( )
virtual

Member Function Documentation

◆ bb_interface_created()

void fawkes::tf::TransformListener::bb_interface_created ( const char *  type,
const char *  id 
)
virtualnoexcept

BlackBoard interface created notification.

This is called whenever an interface is created for a type that you registered for.

Parameters
typetype of the interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call
idID of the newly created interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call

Reimplemented from fawkes::BlackBoardInterfaceObserver.

Definition at line 118 of file transform_listener.cpp.

◆ bb_interface_data_refreshed()

void fawkes::tf::TransformListener::bb_interface_data_refreshed ( Interface interface)
virtualnoexcept

BlackBoard data refreshed notification.

This is called whenever the data in an interface that you registered for is refreshed. This happens when a writer calls the Interface::write(), regardless of whether any data have changed.

Parameters
interfaceinterface instance that you supplied to bbil_add_data_interface()
See also
bb_interface_data_changed

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 182 of file transform_listener.cpp.

References fawkes::TransformInterface::child_frame(), fawkes::TransformInterface::frame(), fawkes::TransformInterface::is_static_transform(), fawkes::Interface::read(), fawkes::TransformInterface::rotation(), fawkes::Interface::timestamp(), fawkes::TransformInterface::translation(), and fawkes::Interface::writer().

Referenced by TransformListener().

◆ bb_interface_reader_removed()

void fawkes::tf::TransformListener::bb_interface_reader_removed ( Interface interface,
Uuid  instance_serial 
)
virtualnoexcept

A reading instance has been closed for a watched interface.

This is called whenever a reading instance of an interface you are watching is closed.

Parameters
interfaceinterface instance that you supplied to bbil_add_reader_interface()
instance_serialthe instance serial of the reading instance that has just been removed.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 150 of file transform_listener.cpp.

◆ bb_interface_writer_removed()

void fawkes::tf::TransformListener::bb_interface_writer_removed ( Interface interface,
Uuid  instance_serial 
)
virtualnoexcept

A writing instance has been closed for a watched interface.

This is called whenever a writing instance of an interface you are watching is closed.

Parameters
interfaceinterface instance that you supplied to bbil_add_writer_interface()
instance_serialthe instance serial of the writing instance that has just been removed.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 144 of file transform_listener.cpp.


The documentation for this class was generated from the following files: