Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::Interface Class Reference

Base class for all Fawkes BlackBoard interfaces. More...

#include <>>

Inheritance diagram for fawkes::Interface:

List of all members.

Classes

struct  interface_data_ts_t
 Timestamp data, must be present and first entries for each interface data structs! This leans on timeval struct. More...
struct  interface_messageinfo_t
 Message info list. More...

Public Member Functions

virtual ~Interface ()
 Destructor.
bool oftype (const char *interface_type) const
 Check if interface is of given type.
const void * datachunk () const
 Get data chunk.
unsigned int datasize () const
 Get data size.
const char * type () const
 Get type of interface.
const char * id () const
 Get identifier of interface.
const char * uid () const
 Get unique identifier of interface.
unsigned short serial () const
 Get instance serial of interface.
unsigned int mem_serial () const
 Get memory serial of interface.
bool operator== (Interface &comp) const
 Check equality of two interfaces.
const unsigned char * hash () const
 Get interface hash.
size_t hash_size () const
 Get size of interface hash.
const char * hash_printable () const
 Get printable interface hash.
bool is_writer () const
 Check if this is a writing instance.
void set_validity (bool valid)
 Mark this interface invalid.
bool is_valid () const
 Check validity of interface.
void set_from_chunk (void *chunk)
 Set from a raw data chunk.
virtual Messagecreate_message (const char *type) const =0
 Create message based on type name.
virtual void copy_values (const Interface *interface)=0
 Copy values from another interface.
virtual const char * enum_tostring (const char *enumtype, int val) const =0
 Convert arbitrary enum value to string.
void resize_buffers (unsigned int num_buffers)
 Resize buffer array.
unsigned int num_buffers () const
 Get number of buffers.
void copy_shared_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer.
void copy_private_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer.
void read_from_buffer (unsigned int buffer)
 Copy data from buffer to private memory.
int compare_buffers (unsigned int buffer)
 Compare buffer to private memory.
void read ()
 Read from BlackBoard into local copy.
void write ()
 Write from local copy into BlackBoard memory.
bool has_writer () const
 Check if there is a writer for the interface.
unsigned int num_readers () const
 Get the number of readers.
bool changed () const
 Check if data has been changed.
const Timetimestamp () const
 Get timestamp of last write.
void set_auto_timestamping (bool enabled)
 Enable or disable automated timestamping.
void set_timestamp (const Time *t=NULL)
 Set timestamp.
void set_clock (Clock *clock)
 Set clock to use for timestamping.
std::list< const char * > get_message_types ()
 Obtain a list of textual representations of the message types available for this interface.
unsigned int msgq_enqueue (Message *message)
 Enqueue message at end of queue.
unsigned int msgq_enqueue_copy (Message *message)
 Enqueue copy of message at end of queue.
void msgq_remove (Message *message)
 Remove message from queue.
void msgq_remove (unsigned int message_id)
 Remove message from queue.
unsigned int msgq_size ()
 Get size of message queue.
void msgq_flush ()
 Flush all messages.
void msgq_lock ()
 Lock message queue.
bool msgq_try_lock ()
 Try to lock message queue.
void msgq_unlock ()
 Unlock message queue.
void msgq_pop ()
 Erase first message from queue.
Messagemsgq_first ()
 Get the first message from the message queue.
bool msgq_empty ()
 Check if queue is empty.
template<class MessageType >
bool msgq_first_is ()
 Check if first message has desired type.
template<class MessageType >
MessageType * msgq_first ()
 Get first message casted to the desired type.
template<class MessageType >
MessageType * msgq_first (MessageType *&msg)
 Get first message casted to the desired type.
template<class MessageType >
MessageType * msgq_first_safe (MessageType *&msg) throw ()
 Get first message casted to the desired type without exceptions.
MessageQueue::MessageIterator msgq_begin ()
 Get start iterator for message queue.
MessageQueue::MessageIterator msgq_end ()
 Get end iterator for message queue.
InterfaceFieldIterator fields ()
 Get iterator over all fields of this interface instance.
InterfaceFieldIterator fields_end ()
 Invalid iterator.
unsigned int num_fields ()
 Get the number of fields in the interface.

Static Public Member Functions

static void parse_uid (const char *uid, char **type, char **id)
 Parse UID to type and ID strings.

Protected Member Functions

 Interface ()
 Constructor.
virtual bool message_valid (const Message *message) const =0
 Check if the message is valid and can be enqueued.
void set_hash (unsigned char *ihash)
 Set hash.
void add_fieldinfo (interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0)
 Add an entry to the field info list.
void add_messageinfo (const char *name)
 Add an entry to the message info list.

Protected Attributes

void * data_ptr
 Pointer to local memory storage.
unsigned int data_size
 Minimal data size to hold data storage.
bool data_changed
 Indicator if data has changed.
interface_data_ts_tdata_ts
 Pointer to data casted to timestamp struct.

Friends

class BlackBoardInterfaceManager
class BlackBoardInstanceFactory
class BlackBoardMessageManager
class BlackBoardInterfaceProxy

Detailed Description

Base class for all Fawkes BlackBoard interfaces.

Interfaces are identified by a type and an ID. The type is just a textual representation of the class name. The ID identifies a specific instance of this interface type. Additionally each interface has a hash. The hash is an MD5 digest of the XML config file that was fed to the interface generator to create the interface. It is used to detect incompatible versions of the same interface type.

Interfaces have at least two sections of memory which contains a struct composed of the internal data of the interface. The first is shared with either the LocalBlackBoard instance (and hence all other instances of the interface) or with a transmission thread of a RemoteBlackBoard. The second is a private copy of the data. The data is copied between the shared and private section only upon request. Interfaces are either reading or writing, denoting their kind of access towards the shared memory section. At any point in time there may at most exist one writer for an interface, but any number of readers. The shared section is protected by a ReadWriteLock. For a writer, a call to write() will copy the data from the private to the shared section. For a reader, a call to read() will copy the data from the shared to the private section. Upon opening the interface, the private section is copied once from the shared section, even when opening a writer.

An interface has an internal timestamp. This timestamp indicates when the data in the interface has been modified last. The timestamp is usually automatically updated. But it some occasions the writer may choose to provide its own timestamp data. This can be useful for example for an interface providing hardware data to give the exact capture time. In the automatic case nothing has to be done manually. The timestamp is updated automatically by calling the write() method if and only if the data in the interface has actually been modified. The reader can call changed() to see if the data changed. In the non-automatic case the writer must first disable automatic timestamping using set_auto_timestamping(). Then it must provide a timestamp everytime before calling write(). Note that setting the timestamp already marks the interface as having changed. So set the timestamp only if the data has changed and the readers should see this.

An interface provides support for buffers. Like the shared and private memory sections described above, buffers are additional memory sections that can be used to save data from the shared section or save or restore from and to the private memory section. One example use case is to save the current shared memory content at one point in time at a specific main loop hook, and restore it only later at a suitable time in another continuous thread. Another useful application is to keep a history for hysteresis processing, or to observe the development of the values in an interface.

Interfaces are not created directly, but rather by using the interface generator.

Author:
Tim Niemueller

Definition at line 80 of file interface.h.


Constructor & Destructor Documentation

fawkes::Interface::~Interface ( )
virtual
fawkes::Interface::Interface ( )
protected

Constructor.

Definition at line 231 of file interface.cpp.

References data_changed, data_ptr, data_size, and fawkes::Clock::instance().


Member Function Documentation

void fawkes::Interface::add_fieldinfo ( interface_fieldtype_t  type,
const char *  name,
size_t  length,
void *  value,
const char *  enumtype = 0 
)
protected

Add an entry to the field info list.

Never use directly, use the interface generator instead. The info list is used for introspection purposes to allow for iterating over all fields of an interface.

Parameters:
typefield type
namename of the field, this is referenced, not copied
lengthlength of the field
valuepointer to the value in the data struct
enumtypename of the enum type, valid only if type == IFT_ENUM.

Definition at line 332 of file interface.cpp.

References fawkes::interface_fieldinfo_t::enumtype, fawkes::interface_fieldinfo_t::length, fawkes::interface_fieldinfo_t::name, fawkes::interface_fieldinfo_t::next, fawkes::interface_fieldinfo_t::type, type(), and fawkes::interface_fieldinfo_t::value.

void fawkes::Interface::add_messageinfo ( const char *  type)
protected

Add an entry to the message info list.

Never use directly, use the interface generator instead. The info list is used for introspection purposes to allow for iterating over all message types of an interface.

Parameters:
typethe type of the message

Definition at line 368 of file interface.cpp.

References fawkes::Interface::interface_messageinfo_t::next, type(), and fawkes::Interface::interface_messageinfo_t::type.

bool fawkes::Interface::changed ( ) const

Check if data has been changed.

Note that if the data has been modified this method will return true at least until the next call to read. From then on it will return false if the data has not been modified between the two read() calls and still true otherwise.

Returns:
true if data has been changed between the last call to read() and the one before.

Definition at line 748 of file interface.cpp.

Referenced by RobotinoJoystickThread::loop(), RobotinoRosJointsThread::loop(), RoombaJoystickThread::loop(), RobotinoIrPclThread::loop(), AmclThread::loop(), and WebviewBlackBoardRequestProcessor::process_request().

int fawkes::Interface::compare_buffers ( unsigned int  buffer)

Compare buffer to private memory.

Parameters:
bufferbuffer number of buffer to compare to private memory
Returns:
returns a number less than, equal to, or greater than zero if the shared buffer if less than, equal to, or greater than the private buffer respectively.

Definition at line 1273 of file interface.cpp.

References data_ptr, data_size, fawkes::Mutex::lock(), and fawkes::Mutex::unlock().

void fawkes::Interface::copy_private_to_buffer ( unsigned int  buffer)

Copy data from private memory to buffer.

Parameters:
bufferbuffer number to copy to

Definition at line 1232 of file interface.cpp.

References data_ptr, data_size, fawkes::Mutex::lock(), and fawkes::Mutex::unlock().

void fawkes::Interface::copy_shared_to_buffer ( unsigned int  buffer)

Copy data from private memory to buffer.

Parameters:
bufferbuffer number to copy to

Definition at line 1203 of file interface.cpp.

References data_size, fawkes::Mutex::lock(), fawkes::ReadWriteLock::lock_for_read(), fawkes::Mutex::unlock(), and fawkes::ReadWriteLock::unlock().

bool fawkes::Interface::create_message ( const char *  type) const
pure virtual
const void * fawkes::Interface::datachunk ( ) const

Get data chunk.

Use sparsely

Returns:
const pointer to the data chunk

Definition at line 425 of file interface.cpp.

References data_ptr.

Referenced by fawkes::BlackBoardInterfaceProxy::notify_of_data_change().

unsigned int fawkes::Interface::datasize ( ) const
const char * fawkes::Interface::enum_tostring ( const char *  enumtype,
int  val 
) const
pure virtual

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters:
enumtypeenum type as string
valvalue to convert
Returns:
string representation of value
Exceptions:
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implemented in fawkes::HumanSkeletonInterface, fawkes::KatanaInterface, fawkes::Roomba500Interface, fawkes::NaoJointPositionInterface, fawkes::MotorInterface, fawkes::NavigatorInterface, fawkes::HumanoidMotionInterface, fawkes::PanTiltInterface, fawkes::NaoJointStiffnessInterface, fawkes::OpenRaveInterface, fawkes::VisualDisplay2DInterface, fawkes::FacerInterface, fawkes::NaoSensorInterface, fawkes::ObjectPositionInterface, fawkes::SkillerInterface, fawkes::HumanSkeletonProjectionInterface, fawkes::GameStateInterface, fawkes::JoystickInterface, fawkes::FacialExpressionInterface, fawkes::SwitchInterface, fawkes::KickerInterface, fawkes::SkillerDebugInterface, fawkes::TestInterface, fawkes::LedInterface, fawkes::SpeechRecognitionInterface, fawkes::BatteryInterface, fawkes::SpeechSynthInterface, fawkes::RobotinoSensorInterface, fawkes::SoccerPenaltyInterface, fawkes::LocalizerControlInterface, fawkes::Position2DTrackInterface, fawkes::TransformInterface, fawkes::Position3DInterface, fawkes::Laser360Interface, and fawkes::Laser720Interface.

Referenced by fawkes::InterfaceFieldIterator::get_value_string().

InterfaceFieldIterator fawkes::Interface::fields ( )

Get iterator over all fields of this interface instance.

Returns:
field iterator pointing to the very first value

Definition at line 1133 of file interface.cpp.

Referenced by XabslEngineThread::init(), and WebviewBlackBoardRequestProcessor::process_request().

InterfaceFieldIterator fawkes::Interface::fields_end ( )

Invalid iterator.

Returns:
invalid iterator reprensenting the end.

Definition at line 1143 of file interface.cpp.

Referenced by XabslEngineThread::init(), and WebviewBlackBoardRequestProcessor::process_request().

std::list< const char * > fawkes::Interface::get_message_types ( )

Obtain a list of textual representations of the message types available for this interface.

Returns:
the message types

Definition at line 395 of file interface.cpp.

References fawkes::Interface::interface_messageinfo_t::next, and fawkes::Interface::interface_messageinfo_t::type.

bool fawkes::Interface::has_writer ( ) const

Check if there is a writer for the interface.

Use this method to determine if there is any open instance of the interface that is writing to the interface. This can also be the queried interface instance.

Returns:
true if a writer for the interface exists, false otherwise

Definition at line 782 of file interface.cpp.

References fawkes::InterfaceMediator::exists_writer().

Referenced by LaserDrawingArea::draw_persons_legs(), LaserDrawingArea::draw_segments(), LuaAgentPeriodicExecutionThread::finalize(), LuaAgentContinuousExecutionThread::finalize(), WorldModelObjPosAverageFuser::fuse(), WorldModelObjPosMajorityFuser::fuse(), NaoQiLedThread::init(), LaserHtSensorProcThread::loop(), WorldModelThread::loop(), RefBoxCommThread::loop(), LaserDrawingArea::on_expose_event(), and WebviewBlackBoardRequestProcessor::process_request().

const unsigned char * fawkes::Interface::hash ( ) const

Get interface hash.

The interface is a unique version identifier of an interface. It is the has of the input XML file during the generation of the interface. It is meant to be used to ensure that all sides are using the exact same version of an interface.

Returns:
constant byte string containing the hash value of hash_size() length

Definition at line 292 of file interface.cpp.

Referenced by fawkes::BlackBoardInterfaceProxy::BlackBoardInterfaceProxy(), fawkes::BlackBoardNetworkHandler::loop(), fawkes::BlackBoardInterfaceManager::open_for_reading(), fawkes::BlackBoardInterfaceManager::open_for_writing(), fawkes::BlackBoardInterfaceManager::open_multiple_for_reading(), and BBLogFile::set_interface().

const char * fawkes::Interface::hash_printable ( ) const

Get printable interface hash.

Returns:
printable version of hash()

Definition at line 302 of file interface.cpp.

Referenced by WebviewBlackBoardRequestProcessor::process_request().

size_t fawkes::Interface::hash_size ( ) const

Get size of interface hash.

Returns the size in bytes of the interface hash. This depends on the used hash.

Returns:
size of interface hash string

Definition at line 414 of file interface.cpp.

Referenced by fawkes::BlackBoardInterfaceManager::open_for_reading(), fawkes::BlackBoardInterfaceManager::open_for_writing(), and fawkes::BlackBoardInterfaceManager::open_multiple_for_reading().

bool fawkes::Interface::is_valid ( ) const

Check validity of interface.

Returns:
true if interface is valid, false otherwise

Reimplemented in fawkes::ObjectPositionInterface, and fawkes::Position2DTrackInterface.

Definition at line 461 of file interface.cpp.

Referenced by RemoteBlackBoardRefBoxProcessor::check_connection(), and RemoteBlackBoardRefBoxProcessor::refbox_process().

unsigned int fawkes::Interface::mem_serial ( ) const

Get memory serial of interface.

Returns:
memory serial of interface

Definition at line 680 of file interface.cpp.

MessageQueue::MessageIterator fawkes::Interface::msgq_begin ( )

Get start iterator for message queue.

Not that you must have locked the queue before this operation!

This can only be called on a writing interface instance.

Returns:
iterator to begin of message queue.
Exceptions:
NotLockedExceptionthrown if message queue is not locked during this operation.

Definition at line 1064 of file interface.cpp.

References fawkes::MessageQueue::begin().

MessageQueue::MessageIterator fawkes::Interface::msgq_end ( )

Get end iterator for message queue.

Not that you must have locked the queue before this operation!

This can only be called on a writing interface instance.

Returns:
iterator beyond end of message queue.
Exceptions:
NotLockedExceptionthrown if message queue is not locked during this operation.

Definition at line 1085 of file interface.cpp.

References fawkes::MessageQueue::end().

unsigned int fawkes::Interface::msgq_enqueue ( Message message)

Enqueue message at end of queue.

This appends the given message to the queue and transmits the message via the message mediator. The message is afterwards owned by the other side and will be unrefed and freed as soon as it has been processed. If you want to keep this message to read a feedback status you have to reference it before enqueuing it! This can only be called on a reading interface instance.

Parameters:
messageMessage to enqueue.
Returns:
message id after message has been queued
Exceptions:
MessageAlreadyQueuedExceptionthrown if the message has already been enqueued to an interface.

Definition at line 830 of file interface.cpp.

References fawkes::Message::id(), message_valid(), fawkes::Message::set_id(), fawkes::MessageMediator::transmit(), and fawkes::RefCount::unref().

Referenced by LuaAgentPeriodicExecutionThread::finalize(), LuaAgentContinuousExecutionThread::finalize(), LuaAgentPeriodicExecutionThread::init(), LuaAgentContinuousExecutionThread::init(), RoombaJoystickThread::loop(), LaserHtSensorProcThread::loop(), RefBoxCommThread::loop(), XabslEngineThread::loop(), and XabslEngineThread::once().

unsigned int fawkes::Interface::msgq_enqueue_copy ( Message message)

Enqueue copy of message at end of queue.

This method creates a copy of the message and enqueues it. Note that this way you cannot receive status message in the message, because the other side will not use your message instance but a copy instead.

This is particularly useful if you call from an environment with automatic garbage collection that does not honor the referencing feature of message but rather just deletes it.

This can only be called on a reading interface instance.

Parameters:
messageMessage to enqueue.
Returns:
message id after message has been queued
Exceptions:
MessageAlreadyQueuedExceptionthrown if the message has already been enqueued to an interface.

Definition at line 869 of file interface.cpp.

References fawkes::Message::clone(), fawkes::Message::id(), message_valid(), fawkes::Message::set_id(), fawkes::MessageMediator::transmit(), and fawkes::RefCount::unref().

template<class MessageType >
MessageType* fawkes::Interface::msgq_first ( )

Get first message casted to the desired type.

Returns:
message casted to desired type
Exceptions:
TypeMismatchExceptionthrown if message is not of desired type
template<class MessageType >
MessageType * fawkes::Interface::msgq_first ( MessageType *&  msg)

Get first message casted to the desired type.

Parameters:
msgreference to pointer to message of desired type, upon successful return points to the message.
Returns:
message casted to desired type (same as msg parameter)
Exceptions:
TypeMismatchExceptionthrown if message is not of desired type

Definition at line 284 of file interface.h.

template<class MessageType >
MessageType * fawkes::Interface::msgq_first_safe ( MessageType *&  msg) throw ()

Get first message casted to the desired type without exceptions.

This method allows to combine a call to msgq_first_is() and msgq_first() into a single call.

Parameters:
msgreference to pointer to message of desired type, upon successful return points to the message.
Returns:
pointer to message if it is of the desired type, 0 otherwise

Definition at line 293 of file interface.h.

Referenced by RosNavigatorThread::loop(), TabletopObjectsThread::loop(), and RobotinoActThread::loop().

void fawkes::Interface::msgq_flush ( )

Flush all messages.

Deletes all messages from the queue. This can only be called on a writing interface instance.

Definition at line 988 of file interface.cpp.

References fawkes::MessageQueue::flush().

Referenced by RobotinoActThread::loop(), and JoystickActThread::MessageProcessor::process().

void fawkes::Interface::msgq_lock ( )

Lock message queue.

Lock the message queue. You have to do this * before using the iterator safely.

This can only be called on a writing interface instance.

Definition at line 1006 of file interface.cpp.

References fawkes::MessageQueue::lock().

void fawkes::Interface::msgq_remove ( Message message)

Remove message from queue.

Removes the given message from the queue. Note that if you unref()ed the message after insertion this will most likely delete the object. It is not safe to use the message after removing it from the queue in general.

This can only be called on a writing interface instance.

Parameters:
messageMessage to remove.

Definition at line 923 of file interface.cpp.

References fawkes::MessageQueue::remove().

void fawkes::Interface::msgq_remove ( unsigned int  message_id)

Remove message from queue.

Removes message with the given ID from the queue.

Parameters:
message_idMessage ID to remove. This can only be called on a writing interface instance.

Definition at line 940 of file interface.cpp.

References fawkes::MessageQueue::remove().

unsigned int fawkes::Interface::msgq_size ( )

Get size of message queue.

This can only be called on a writing interface instance.

Returns:
number of messages in queue.

Definition at line 956 of file interface.cpp.

References fawkes::MessageQueue::size().

bool fawkes::Interface::msgq_try_lock ( )

Try to lock message queue.

Try to lock the message queue. Returns immediately and does not wait for lock.

This can only be called on a writing interface instance.

Returns:
true, if the lock has been aquired, false otherwise.
See also:
lock()

Definition at line 1026 of file interface.cpp.

References fawkes::MessageQueue::try_lock().

void fawkes::Interface::msgq_unlock ( )

Unlock message queue.

Give free the lock on the message queue. This can only be called on a writing interface instance.

Definition at line 1044 of file interface.cpp.

References fawkes::MessageQueue::unlock().

unsigned int fawkes::Interface::num_buffers ( ) const

Get number of buffers.

Returns:
number of buffers

Definition at line 1193 of file interface.cpp.

Referenced by resize_buffers().

unsigned int fawkes::Interface::num_fields ( )

Get the number of fields in the interface.

Returns:
the number of fields

Definition at line 1153 of file interface.cpp.

unsigned int fawkes::Interface::num_readers ( ) const

Get the number of readers.

Use this method to determine how many reading instances of the interface currently exist. If the current instance is a reading instance it will be included in the count number. To determine if you are the last man having this interface you can use the following code:

// for a writing instance:
if ( interface->num_readers == 0 ) {
// we are the last one to have this interface open
}
// for a reading instance:
if ( ! interface->has_writer() && (interface->num_readers() == 0) ) {
// we are the last one to have this interface open
}

Note that this can result in a race condition. You have to be registered as a BlackBoardEventListener to be sure that you are really the last.

Returns:
number of readers

Definition at line 811 of file interface.cpp.

References fawkes::InterfaceMediator::num_readers().

Referenced by WebviewBlackBoardRequestProcessor::process_request().

bool fawkes::Interface::oftype ( const char *  interface_type) const

Check if interface is of given type.

Parameters:
interface_typetype to query
Returns:
true, if current instance is of given type, false otherwise

Definition at line 625 of file interface.cpp.

bool fawkes::Interface::operator== ( Interface comp) const

Check equality of two interfaces.

Two interfaces are the same if their types and identifiers are equal. This does not mean that both interfaces are the very same instance for accessing the BlackBoard. Instead this just means that both instances will access the same chunk of memory in the BlackBoard and the instances MAY be the same. If you want to know if two instances are exactly the same compare the instance serials using the serial() method.

Parameters:
compinterface to compare current instance with
Returns:
true, if interfaces point to the same data, false otherwise

Definition at line 613 of file interface.cpp.

void fawkes::Interface::parse_uid ( const char *  uid,
char **  type,
char **  id 
)
static

Parse UID to type and ID strings.

Note that the returned values (type and id) must be freed once they are no longer used. Also verifies lengths of the type and id strings.

Parameters:
uidUID to parse
typeupon return contains the type part of the UID, must be freed
idupon return contains the ID part, must be freed

Definition at line 1297 of file interface.cpp.

void fawkes::Interface::read ( )

Read from BlackBoard into local copy.

Exceptions:
InterfaceInvalidExceptionthrown if the interface has been marked invalid

Definition at line 472 of file interface.cpp.

References data_ptr, data_size, data_ts, fawkes::Mutex::lock(), fawkes::ReadWriteLock::lock_for_read(), fawkes::Time::set_time(), fawkes::Interface::interface_data_ts_t::timestamp_sec, fawkes::Interface::interface_data_ts_t::timestamp_usec, fawkes::Mutex::unlock(), and fawkes::ReadWriteLock::unlock().

Referenced by RosLaserScanThread::bb_interface_data_changed(), RosTfThread::bb_interface_data_changed(), fawkes::tf::TransformListener::bb_interface_data_changed(), LaserDrawingArea::draw_persons_legs(), LaserDrawingArea::draw_segments(), WorldModelObjPosAverageFuser::fuse(), WorldModelObjPosMajorityFuser::fuse(), RobotinoRosJointsThread::init(), RobotinoIrPclThread::init(), NaoQiLedThread::init(), RosLaserScanThread::init(), LuaAgentPeriodicExecutionThread::init(), LuaAgentContinuousExecutionThread::init(), JoystickBlackBoardLogger::JoystickBlackBoardLogger(), BallPosLogThread::loop(), ROSOdometryThread::loop(), RobotinoJoystickThread::loop(), AgentControlThread::loop(), RobotinoRosJointsThread::loop(), RoombaJoystickThread::loop(), RobotinoIrPclThread::loop(), LaserHtSensorProcThread::loop(), WorldModelThread::loop(), NaoQiButtonThread::loop(), XabslEngineThread::loop(), LuaAgentPeriodicExecutionThread::loop(), LuaAgentContinuousExecutionThread::loop(), AmclThread::loop(), LaserDrawingArea::on_expose_event(), WebviewBlackBoardRequestProcessor::process_request(), RemoteBlackBoardRefBoxProcessor::refbox_process(), and WorldModelSingleCopyFuser::WorldModelSingleCopyFuser().

void fawkes::Interface::read_from_buffer ( unsigned int  buffer)

Copy data from buffer to private memory.

Parameters:
bufferbuffer number to copy to

Definition at line 1252 of file interface.cpp.

References data_ptr, data_size, fawkes::Mutex::lock(), and fawkes::Mutex::unlock().

void fawkes::Interface::resize_buffers ( unsigned int  num_buffers)

Resize buffer array.

This resizes the memory region used to store data buffers.

Parameters:
num_buffersnumber of buffers to resize to (memory is allocated as necessary, 0 frees the memory area).
Exceptions:
Exceptionthrown if resizing the memory section fails

Definition at line 1166 of file interface.cpp.

References data_size, fawkes::Mutex::lock(), num_buffers(), and fawkes::Mutex::unlock().

Referenced by NaoQiButtonThread::init().

void fawkes::Interface::set_auto_timestamping ( bool  enabled)

Enable or disable automated timestamping.

Parameters:
enabledtrue to enable automated timestamping, false to disable

Definition at line 733 of file interface.cpp.

Referenced by fawkes::tf::TransformPublisher::TransformPublisher().

void fawkes::Interface::set_clock ( Clock clock)

Set clock to use for timestamping.

Parameters:
clockclock to use from now on

Definition at line 722 of file interface.cpp.

References fawkes::Time::set_clock().

void fawkes::Interface::set_from_chunk ( void *  chunk)

Set from a raw data chunk.

This allows for setting the interface data from a raw chunk. This is not useful in general but only in rare situations like network transmission. Do not use it unless you really know what you are doing. The method expects the chunk to be exactly of the size returned by datasize(). No check is done, a segfault will most likely occur if you provide invalid data.

Parameters:
chunkdata chunk, must be exactly of the size that is returned by datasize()

Definition at line 765 of file interface.cpp.

References data_ptr, and data_size.

void fawkes::Interface::set_hash ( unsigned char *  ihash)
protected

Set hash.

Never use directly.

Parameters:
ihashinterface hash

Definition at line 312 of file interface.cpp.

void fawkes::Interface::set_timestamp ( const Time t = NULL)

Set timestamp.

Parameters:
ttime stamp to copy time from, if NULL current time is queried from clock.

Definition at line 702 of file interface.cpp.

References data_changed, and fawkes::Time::stamp().

Referenced by fawkes::tf::TransformPublisher::send_transform().

void fawkes::Interface::set_validity ( bool  valid)

Mark this interface invalid.

An interface can become invalid, for example if the connection of a RemoteBlackBoard dies. In this case the interface becomes invalid and successive read()/write() calls will throw an InterfaceInvalidException.

Parameters:
validtrue to mark the interface valid or false to mark it invalid

Definition at line 449 of file interface.cpp.

References fawkes::ReadWriteLock::lock_for_write(), and fawkes::ReadWriteLock::unlock().

const Time * fawkes::Interface::timestamp ( ) const
const char * fawkes::Interface::type ( ) const

Get type of interface.

Returns:
string with the type of the interface.

Definition at line 635 of file interface.cpp.

Referenced by add_fieldinfo(), add_messageinfo(), fawkes::BlackBoardInterfaceProxy::BlackBoardInterfaceProxy(), fawkes::Laser360Interface::copy_values(), fawkes::Laser720Interface::copy_values(), fawkes::Position3DInterface::copy_values(), fawkes::TransformInterface::copy_values(), fawkes::Position2DTrackInterface::copy_values(), fawkes::LocalizerControlInterface::copy_values(), fawkes::SoccerPenaltyInterface::copy_values(), fawkes::RobotinoSensorInterface::copy_values(), fawkes::SpeechSynthInterface::copy_values(), fawkes::BatteryInterface::copy_values(), fawkes::SpeechRecognitionInterface::copy_values(), fawkes::LedInterface::copy_values(), fawkes::TestInterface::copy_values(), fawkes::SkillerDebugInterface::copy_values(), fawkes::KickerInterface::copy_values(), fawkes::SwitchInterface::copy_values(), fawkes::FacialExpressionInterface::copy_values(), fawkes::GameStateInterface::copy_values(), fawkes::JoystickInterface::copy_values(), fawkes::HumanSkeletonProjectionInterface::copy_values(), fawkes::SkillerInterface::copy_values(), fawkes::ObjectPositionInterface::copy_values(), fawkes::NaoSensorInterface::copy_values(), fawkes::FacerInterface::copy_values(), fawkes::VisualDisplay2DInterface::copy_values(), fawkes::OpenRaveInterface::copy_values(), fawkes::NaoJointStiffnessInterface::copy_values(), fawkes::PanTiltInterface::copy_values(), fawkes::HumanoidMotionInterface::copy_values(), fawkes::NavigatorInterface::copy_values(), fawkes::MotorInterface::copy_values(), fawkes::NaoJointPositionInterface::copy_values(), fawkes::Roomba500Interface::copy_values(), fawkes::KatanaInterface::copy_values(), fawkes::HumanSkeletonInterface::copy_values(), PlayerMapperFactory::create_mapper(), WebviewBlackBoardRequestProcessor::process_request(), BBLogFile::set_interface(), and fawkes::BlackBoardMessageManager::transmit().

const char * fawkes::Interface::uid ( ) const

Get unique identifier of interface.

As the name suggests this ID denotes a unique memory instance of this interface in the blackboard. It is provided by the system and currently returns a string of the form "type::id", where type is replaced by the type returned by type() and id is the ID returned by id().

Returns:
string with the unique identifier of the interface.

Definition at line 660 of file interface.cpp.

Referenced by RosLaserScanThread::bb_interface_created(), fawkes::BlackBoardInterfaceListener::bbil_add_message_interface(), WorldModelObjPosAverageFuser::fuse(), BBLoggerThread::init(), fawkes::BlackBoardNotifier::notify_of_data_change(), fawkes::BlackBoardNotifier::notify_of_message_received(), LaserDrawingArea::on_expose_event(), and fawkes::BlackBoardInterfaceProxy::process_interface_message().

void fawkes::Interface::write ( )

Write from local copy into BlackBoard memory.

Exceptions:
InterfaceInvalidExceptionthrown if the interface has been marked invalid

Definition at line 495 of file interface.cpp.

References data_changed, data_ptr, data_size, data_ts, fawkes::Time::get_timestamp(), fawkes::Mutex::lock(), fawkes::ReadWriteLock::lock_for_write(), fawkes::InterfaceMediator::notify_of_data_change(), fawkes::Time::stamp(), fawkes::Interface::interface_data_ts_t::timestamp_sec, fawkes::Interface::interface_data_ts_t::timestamp_usec, fawkes::Mutex::unlock(), and fawkes::ReadWriteLock::unlock().

Referenced by WorldModelNetworkThread::ball_pos_rcvd(), LaserHtSensorProcThread::finalize(), WorldModelNetworkThread::gamestate_rcvd(), WorldModelNetworkThread::global_ball_pos_rcvd(), RefBoxCommThread::handle_refbox_state(), PanTiltDirectedPerceptionThread::init(), PanTiltSonyEviD100PThread::init(), LaserSensorThread::init(), PanTiltRX28Thread::init(), BBLoggerThread::init(), TabletopObjectsThread::init(), SkillerExecutionThread::init(), AmclThread::init(), JoystickRemoteBlackBoardPoster::joystick_changed(), JoystickRemoteBlackBoardPoster::joystick_plugged(), JoystickRemoteBlackBoardPoster::joystick_unplugged(), AgentControlThread::loop(), JoystickSensorThread::loop(), OpenRaveMessageHandlerThread::loop(), PanTiltDirectedPerceptionThread::loop(), PanTiltSonyEviD100PThread::loop(), LaserSensorThread::loop(), MapLaserGenThread::loop(), LaserHtSensorProcThread::loop(), NaoQiSpeechSynthThread::loop(), RefBoxCommThread::loop(), Roomba500Thread::loop(), RosNavigatorThread::loop(), NaoQiMotionThread::loop(), RosLaserScanThread::loop(), BBLogReplayThread::loop(), PanTiltRX28Thread::loop(), TabletopObjectsThread::loop(), RobotinoActThread::loop(), RobotinoSensorThread::loop(), SkillerExecutionThread::loop(), KatanaActThread::loop(), AmclThread::loop(), BBLogReplayThread::once(), KatanaActThread::once(), WorldModelNetworkThread::opponent_pose_rcvd(), WorldModelNetworkThread::pose_rcvd(), JoystickActThread::MessageProcessor::process(), JoystickActThread::MessageProcessor::process_message(), FliteSynthThread::say(), FestivalSynthThread::say(), RefBoxStateBBWriter::send(), fawkes::tf::TransformPublisher::send_transform(), PlayerLaserMapper::sync_player_to_fawkes(), PlayerPositionMapper::sync_player_to_fawkes(), PlayerMotorPositionMapper::sync_player_to_fawkes(), PanTiltSonyEviD100PThread::update_sensor_values(), PanTiltDirectedPerceptionThread::update_sensor_values(), PanTiltRX28Thread::update_sensor_values(), and Roomba500Thread::write_blackboard().


Member Data Documentation

fawkes::Interface::data_changed
protected

Indicator if data has changed.

This must be set by all methods that manipulate internal data or the timestamp. Only if set to true a call to write() will update data_ts.

Definition at line 208 of file interface.h.

Referenced by Interface(), fawkes::BatteryInterface::set_absolute_soc(), fawkes::NaoSensorInterface::set_accel_x(), fawkes::NaoSensorInterface::set_accel_y(), fawkes::NaoSensorInterface::set_accel_z(), fawkes::SwitchInterface::set_activation_count(), fawkes::NaoSensorInterface::set_angle_x(), fawkes::NaoSensorInterface::set_angle_y(), fawkes::JoystickInterface::set_axis(), fawkes::NaoSensorInterface::set_battery_charge(), fawkes::ObjectPositionInterface::set_bearing(), fawkes::FacerInterface::set_bearing(), fawkes::FacialExpressionInterface::set_brows_action(), fawkes::NaoSensorInterface::set_chest_button(), fawkes::TransformInterface::set_child_frame(), fawkes::Laser360Interface::set_clockwise_angle(), fawkes::Laser720Interface::set_clockwise_angle(), fawkes::HumanSkeletonInterface::set_com(), fawkes::SkillerInterface::set_continuous(), fawkes::MotorInterface::set_controller(), fawkes::MotorInterface::set_controller_thread_name(), fawkes::SpeechRecognitionInterface::set_counter(), fawkes::VisualDisplay2DInterface::set_counter(), fawkes::BatteryInterface::set_current(), fawkes::KickerInterface::set_current_intensity(), fawkes::ObjectPositionInterface::set_dbs_covariance(), fawkes::NavigatorInterface::set_dest_dist(), fawkes::NavigatorInterface::set_dest_ori(), fawkes::NavigatorInterface::set_dest_x(), fawkes::NavigatorInterface::set_dest_y(), fawkes::ObjectPositionInterface::set_distance(), fawkes::Laser360Interface::set_distances(), fawkes::Laser720Interface::set_distances(), fawkes::MotorInterface::set_drive_mode(), fawkes::SpeechSynthInterface::set_duration(), fawkes::SpeechRecognitionInterface::set_enabled(), fawkes::SwitchInterface::set_enabled(), fawkes::SkillerInterface::set_error(), fawkes::OpenRaveInterface::set_error_code(), fawkes::NavigatorInterface::set_error_code(), fawkes::NavigatorInterface::set_escaping_enabled(), fawkes::SkillerInterface::set_exclusive_controller(), fawkes::ObjectPositionInterface::set_extent_x(), fawkes::ObjectPositionInterface::set_extent_y(), fawkes::ObjectPositionInterface::set_extent_z(), fawkes::FacialExpressionInterface::set_eyes_action(), fawkes::JoystickInterface::set_ff_effects(), fawkes::SpeechSynthInterface::set_final(), fawkes::OpenRaveInterface::set_final(), fawkes::NavigatorInterface::set_final(), fawkes::TestInterface::set_flags(), fawkes::ObjectPositionInterface::set_flags(), fawkes::NavigatorInterface::set_flags(), fawkes::Laser360Interface::set_frame(), fawkes::Laser720Interface::set_frame(), fawkes::Position3DInterface::set_frame(), fawkes::TransformInterface::set_frame(), fawkes::GameStateInterface::set_game_state(), fawkes::KickerInterface::set_guide_ball_side(), fawkes::NaoSensorInterface::set_gyro_ref(), fawkes::NaoSensorInterface::set_gyro_x(), fawkes::NaoSensorInterface::set_gyro_y(), fawkes::GameStateInterface::set_half(), fawkes::NaoJointStiffnessInterface::set_head_pitch(), fawkes::NaoSensorInterface::set_head_touch_front(), fawkes::NaoSensorInterface::set_head_touch_middle(), fawkes::NaoSensorInterface::set_head_touch_rear(), fawkes::NaoJointStiffnessInterface::set_head_yaw(), fawkes::SwitchInterface::set_history(), fawkes::FacerInterface::set_history_ratio(), fawkes::LedInterface::set_intensity(), fawkes::FacialExpressionInterface::set_jowl_action(), fawkes::GameStateInterface::set_kickoff(), fawkes::NaoJointStiffnessInterface::set_l_ankle_pitch(), fawkes::NaoJointStiffnessInterface::set_l_ankle_roll(), fawkes::NaoSensorInterface::set_l_cop_x(), fawkes::NaoSensorInterface::set_l_cop_y(), fawkes::NaoJointStiffnessInterface::set_l_elbow_roll(), fawkes::NaoJointStiffnessInterface::set_l_elbow_yaw(), fawkes::NaoSensorInterface::set_l_foot_bumper_l(), fawkes::NaoSensorInterface::set_l_foot_bumper_r(), fawkes::NaoSensorInterface::set_l_fsr_fl(), fawkes::NaoSensorInterface::set_l_fsr_fr(), fawkes::NaoSensorInterface::set_l_fsr_rl(), fawkes::NaoSensorInterface::set_l_fsr_rr(), fawkes::NaoJointStiffnessInterface::set_l_hand(), fawkes::NaoJointStiffnessInterface::set_l_hip_pitch(), fawkes::NaoJointStiffnessInterface::set_l_hip_roll(), fawkes::NaoJointStiffnessInterface::set_l_hip_yaw_pitch(), fawkes::NaoJointStiffnessInterface::set_l_knee_pitch(), fawkes::NaoJointStiffnessInterface::set_l_shoulder_pitch(), fawkes::NaoJointStiffnessInterface::set_l_shoulder_roll(), fawkes::NaoSensorInterface::set_l_total_weight(), fawkes::NaoJointStiffnessInterface::set_l_wrist_yaw(), fawkes::FacerInterface::set_learning_in_progress(), fawkes::MotorInterface::set_left_rpm(), fawkes::Position2DTrackInterface::set_length(), fawkes::SwitchInterface::set_long_activations(), fawkes::LocalizerControlInterface::set_map_name(), fawkes::NavigatorInterface::set_max_velocity(), fawkes::NaoJointStiffnessInterface::set_minimum(), fawkes::FacerInterface::set_most_likely_identity(), fawkes::MotorInterface::set_motor_state(), fawkes::FacialExpressionInterface::set_mouth_action(), fawkes::SpeechSynthInterface::set_msgid(), fawkes::OpenRaveInterface::set_msgid(), fawkes::NavigatorInterface::set_msgid(), fawkes::JoystickInterface::set_num_axes(), fawkes::JoystickInterface::set_num_buttons(), fawkes::FacerInterface::set_num_detections(), fawkes::FacerInterface::set_num_identities(), fawkes::KickerInterface::set_num_kicks_center(), fawkes::KickerInterface::set_num_kicks_left(), fawkes::KickerInterface::set_num_kicks_right(), fawkes::FacerInterface::set_num_recognitions(), fawkes::ObjectPositionInterface::set_object_type(), fawkes::MotorInterface::set_odometry_orientation(), fawkes::MotorInterface::set_odometry_path_length(), fawkes::MotorInterface::set_odometry_position_x(), fawkes::MotorInterface::set_odometry_position_y(), fawkes::MotorInterface::set_omega(), fawkes::FacerInterface::set_opmode(), fawkes::HumanSkeletonInterface::set_ori_head(), fawkes::HumanSkeletonInterface::set_ori_head_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_ankle(), fawkes::HumanSkeletonInterface::set_ori_left_ankle_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_collar(), fawkes::HumanSkeletonInterface::set_ori_left_collar_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_elbow(), fawkes::HumanSkeletonInterface::set_ori_left_elbow_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_fingertip(), fawkes::HumanSkeletonInterface::set_ori_left_fingertip_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_foot(), fawkes::HumanSkeletonInterface::set_ori_left_foot_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_hand(), fawkes::HumanSkeletonInterface::set_ori_left_hand_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_hip(), fawkes::HumanSkeletonInterface::set_ori_left_hip_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_knee(), fawkes::HumanSkeletonInterface::set_ori_left_knee_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_shoulder(), fawkes::HumanSkeletonInterface::set_ori_left_shoulder_confidence(), fawkes::HumanSkeletonInterface::set_ori_left_wrist(), fawkes::HumanSkeletonInterface::set_ori_left_wrist_confidence(), fawkes::HumanSkeletonInterface::set_ori_neck(), fawkes::HumanSkeletonInterface::set_ori_neck_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_ankle(), fawkes::HumanSkeletonInterface::set_ori_right_ankle_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_collar(), fawkes::HumanSkeletonInterface::set_ori_right_collar_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_elbow(), fawkes::HumanSkeletonInterface::set_ori_right_elbow_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_fingertip(), fawkes::HumanSkeletonInterface::set_ori_right_fingertip_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_foot(), fawkes::HumanSkeletonInterface::set_ori_right_foot_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_hand(), fawkes::HumanSkeletonInterface::set_ori_right_hand_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_hip(), fawkes::HumanSkeletonInterface::set_ori_right_hip_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_knee(), fawkes::HumanSkeletonInterface::set_ori_right_knee_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_shoulder(), fawkes::HumanSkeletonInterface::set_ori_right_shoulder_confidence(), fawkes::HumanSkeletonInterface::set_ori_right_wrist(), fawkes::HumanSkeletonInterface::set_ori_right_wrist_confidence(), fawkes::HumanSkeletonInterface::set_ori_torso(), fawkes::HumanSkeletonInterface::set_ori_torso_confidence(), fawkes::HumanSkeletonInterface::set_ori_waist(), fawkes::HumanSkeletonInterface::set_ori_waist_confidence(), fawkes::GameStateInterface::set_our_goal_color(), fawkes::GameStateInterface::set_our_team(), fawkes::SoccerPenaltyInterface::set_penalty(), fawkes::ObjectPositionInterface::set_pitch(), fawkes::HumanSkeletonInterface::set_pos_head(), fawkes::HumanSkeletonInterface::set_pos_head_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_ankle(), fawkes::HumanSkeletonInterface::set_pos_left_ankle_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_collar(), fawkes::HumanSkeletonInterface::set_pos_left_collar_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_elbow(), fawkes::HumanSkeletonInterface::set_pos_left_elbow_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_fingertip(), fawkes::HumanSkeletonInterface::set_pos_left_fingertip_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_foot(), fawkes::HumanSkeletonInterface::set_pos_left_foot_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_hand(), fawkes::HumanSkeletonInterface::set_pos_left_hand_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_hip(), fawkes::HumanSkeletonInterface::set_pos_left_hip_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_knee(), fawkes::HumanSkeletonInterface::set_pos_left_knee_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_shoulder(), fawkes::HumanSkeletonInterface::set_pos_left_shoulder_confidence(), fawkes::HumanSkeletonInterface::set_pos_left_wrist(), fawkes::HumanSkeletonInterface::set_pos_left_wrist_confidence(), fawkes::HumanSkeletonInterface::set_pos_neck(), fawkes::HumanSkeletonInterface::set_pos_neck_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_ankle(), fawkes::HumanSkeletonInterface::set_pos_right_ankle_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_collar(), fawkes::HumanSkeletonInterface::set_pos_right_collar_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_elbow(), fawkes::HumanSkeletonInterface::set_pos_right_elbow_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_fingertip(), fawkes::HumanSkeletonInterface::set_pos_right_fingertip_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_foot(), fawkes::HumanSkeletonInterface::set_pos_right_foot_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_hand(), fawkes::HumanSkeletonInterface::set_pos_right_hand_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_hip(), fawkes::HumanSkeletonInterface::set_pos_right_hip_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_knee(), fawkes::HumanSkeletonInterface::set_pos_right_knee_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_shoulder(), fawkes::HumanSkeletonInterface::set_pos_right_shoulder_confidence(), fawkes::HumanSkeletonInterface::set_pos_right_wrist(), fawkes::HumanSkeletonInterface::set_pos_right_wrist_confidence(), fawkes::HumanSkeletonInterface::set_pos_torso(), fawkes::HumanSkeletonInterface::set_pos_torso_confidence(), fawkes::HumanSkeletonInterface::set_pos_waist(), fawkes::HumanSkeletonInterface::set_pos_waist_confidence(), fawkes::HumanSkeletonInterface::set_pose(), fawkes::JoystickInterface::set_pressed_buttons(), fawkes::SpeechRecognitionInterface::set_processing(), fawkes::NaoJointStiffnessInterface::set_r_ankle_pitch(), fawkes::NaoJointStiffnessInterface::set_r_ankle_roll(), fawkes::NaoSensorInterface::set_r_cop_x(), fawkes::NaoSensorInterface::set_r_cop_y(), fawkes::NaoJointStiffnessInterface::set_r_elbow_roll(), fawkes::NaoJointStiffnessInterface::set_r_elbow_yaw(), fawkes::NaoSensorInterface::set_r_foot_bumper_l(), fawkes::NaoSensorInterface::set_r_foot_bumper_r(), fawkes::NaoSensorInterface::set_r_fsr_fl(), fawkes::NaoSensorInterface::set_r_fsr_fr(), fawkes::NaoSensorInterface::set_r_fsr_rl(), fawkes::NaoSensorInterface::set_r_fsr_rr(), fawkes::NaoJointStiffnessInterface::set_r_hand(), fawkes::NaoJointStiffnessInterface::set_r_hip_pitch(), fawkes::NaoJointStiffnessInterface::set_r_hip_roll(), fawkes::NaoJointStiffnessInterface::set_r_hip_yaw_pitch(), fawkes::NaoJointStiffnessInterface::set_r_knee_pitch(), fawkes::NaoJointStiffnessInterface::set_r_shoulder_pitch(), fawkes::NaoJointStiffnessInterface::set_r_shoulder_roll(), fawkes::NaoSensorInterface::set_r_total_weight(), fawkes::NaoJointStiffnessInterface::set_r_wrist_yaw(), fawkes::MotorInterface::set_rear_rpm(), fawkes::FacerInterface::set_recognized_identity(), fawkes::FacerInterface::set_recognized_name(), fawkes::FacerInterface::set_recording_progress(), fawkes::BatteryInterface::set_relative_soc(), fawkes::ObjectPositionInterface::set_relative_x(), fawkes::ObjectPositionInterface::set_relative_x_velocity(), fawkes::ObjectPositionInterface::set_relative_xyz_covariance(), fawkes::ObjectPositionInterface::set_relative_xyz_velocity_covariance(), fawkes::ObjectPositionInterface::set_relative_y(), fawkes::ObjectPositionInterface::set_relative_y_velocity(), fawkes::ObjectPositionInterface::set_relative_z(), fawkes::ObjectPositionInterface::set_relative_z_velocity(), fawkes::SoccerPenaltyInterface::set_remaining(), fawkes::FacerInterface::set_requested_index(), fawkes::FacerInterface::set_requested_name(), fawkes::TestInterface::set_result(), fawkes::MotorInterface::set_right_rpm(), fawkes::GameStateInterface::set_role(), fawkes::ObjectPositionInterface::set_roll(), fawkes::Position3DInterface::set_rotation(), fawkes::TransformInterface::set_rotation(), fawkes::GameStateInterface::set_score_cyan(), fawkes::GameStateInterface::set_score_magenta(), fawkes::FacerInterface::set_sec_since_detection(), fawkes::NavigatorInterface::set_security_distance(), fawkes::SwitchInterface::set_short_activations(), fawkes::SkillerInterface::set_skill_string(), fawkes::ObjectPositionInterface::set_slope(), fawkes::FacerInterface::set_slope(), fawkes::HumanSkeletonInterface::set_state(), fawkes::GameStateInterface::set_state_team(), fawkes::SkillerInterface::set_status(), fawkes::OpenRaveInterface::set_success(), fawkes::JoystickInterface::set_supported_ff_effects(), fawkes::BatteryInterface::set_temperature(), fawkes::TestInterface::set_test_bool(), fawkes::TestInterface::set_test_int(), fawkes::TestInterface::set_test_string(), fawkes::TestInterface::set_test_uint(), fawkes::SpeechSynthInterface::set_text(), fawkes::SpeechRecognitionInterface::set_text(), set_timestamp(), fawkes::Position2DTrackInterface::set_track_id(), fawkes::Position2DTrackInterface::set_track_timestamps(), fawkes::Position2DTrackInterface::set_track_x_positions(), fawkes::Position2DTrackInterface::set_track_y_positions(), fawkes::TransformInterface::set_translation(), fawkes::Position3DInterface::set_translation(), fawkes::NaoSensorInterface::set_ultrasonic_direction(), fawkes::NaoSensorInterface::set_ultrasonic_distance_left(), fawkes::NaoSensorInterface::set_ultrasonic_distance_right(), fawkes::HumanSkeletonInterface::set_user_id(), fawkes::Position2DTrackInterface::set_valid(), fawkes::ObjectPositionInterface::set_valid(), fawkes::SwitchInterface::set_value(), fawkes::Position3DInterface::set_visibility_history(), fawkes::ObjectPositionInterface::set_visibility_history(), fawkes::HumanSkeletonInterface::set_visibility_history(), fawkes::FacerInterface::set_visibility_history(), fawkes::ObjectPositionInterface::set_visible(), fawkes::BatteryInterface::set_voltage(), fawkes::MotorInterface::set_vx(), fawkes::MotorInterface::set_vy(), fawkes::ObjectPositionInterface::set_world_x(), fawkes::ObjectPositionInterface::set_world_x_velocity(), fawkes::ObjectPositionInterface::set_world_xyz_covariance(), fawkes::ObjectPositionInterface::set_world_xyz_velocity_covariance(), fawkes::ObjectPositionInterface::set_world_y(), fawkes::ObjectPositionInterface::set_world_y_velocity(), fawkes::ObjectPositionInterface::set_world_z(), fawkes::ObjectPositionInterface::set_world_z_velocity(), fawkes::NavigatorInterface::set_x(), fawkes::NavigatorInterface::set_y(), fawkes::ObjectPositionInterface::set_yaw(), and write().

fawkes::Interface::data_ptr
protected

Pointer to local memory storage.

Definition at line 206 of file interface.h.

Referenced by compare_buffers(), copy_private_to_buffer(), datachunk(), Interface(), read(), read_from_buffer(), set_from_chunk(), write(), fawkes::MotorInterface::AcquireControlMessage::~AcquireControlMessage(), fawkes::SkillerInterface::AcquireControlMessage::~AcquireControlMessage(), fawkes::VisualDisplay2DInterface::AddCartCircleMessage::~AddCartCircleMessage(), fawkes::VisualDisplay2DInterface::AddCartLineMessage::~AddCartLineMessage(), fawkes::VisualDisplay2DInterface::AddCartRectMessage::~AddCartRectMessage(), fawkes::VisualDisplay2DInterface::AddCartTextMessage::~AddCartTextMessage(), fawkes::OpenRaveInterface::AddObjectMessage::~AddObjectMessage(), fawkes::OpenRaveInterface::AttachObjectMessage::~AttachObjectMessage(), fawkes::TestInterface::CalculateMessage::~CalculateMessage(), fawkes::PanTiltInterface::CalibrateMessage::~CalibrateMessage(), fawkes::KatanaInterface::CalibrateMessage::~CalibrateMessage(), fawkes::NavigatorInterface::CartesianGotoMessage::~CartesianGotoMessage(), fawkes::KatanaInterface::CloseGripperMessage::~CloseGripperMessage(), fawkes::VisualDisplay2DInterface::DeleteAllMessage::~DeleteAllMessage(), fawkes::OpenRaveInterface::DeleteObjectMessage::~DeleteObjectMessage(), fawkes::VisualDisplay2DInterface::DeleteObjectMessage::~DeleteObjectMessage(), fawkes::SwitchInterface::DisableSwitchMessage::~DisableSwitchMessage(), fawkes::Roomba500Interface::DockMessage::~DockMessage(), fawkes::Roomba500Interface::DriveMessage::~DriveMessage(), fawkes::MotorInterface::DriveRPMMessage::~DriveRPMMessage(), fawkes::Roomba500Interface::DriveStraightMessage::~DriveStraightMessage(), fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::~EmitUltrasonicWaveMessage(), fawkes::SwitchInterface::EnableDurationMessage::~EnableDurationMessage(), fawkes::FacerInterface::EnableIdentityMessage::~EnableIdentityMessage(), fawkes::SwitchInterface::EnableSwitchMessage::~EnableSwitchMessage(), fawkes::SkillerInterface::ExecSkillContinuousMessage::~ExecSkillContinuousMessage(), fawkes::SkillerInterface::ExecSkillMessage::~ExecSkillMessage(), fawkes::PanTiltInterface::FlushMessage::~FlushMessage(), fawkes::KatanaInterface::FlushMessage::~FlushMessage(), fawkes::FacerInterface::GetNameMessage::~GetNameMessage(), fawkes::HumanoidMotionInterface::GetUpMessage::~GetUpMessage(), fawkes::PanTiltInterface::GotoMessage::~GotoMessage(), fawkes::MotorInterface::GotoMessage::~GotoMessage(), fawkes::KickerInterface::GuideBallMessage::~GuideBallMessage(), fawkes::KickerInterface::KickMessage::~KickMessage(), fawkes::HumanoidMotionInterface::KickMessage::~KickMessage(), fawkes::FacerInterface::LearnFaceMessage::~LearnFaceMessage(), fawkes::KatanaInterface::LinearGotoKniMessage::~LinearGotoKniMessage(), fawkes::KatanaInterface::LinearGotoMessage::~LinearGotoMessage(), fawkes::MotorInterface::LinTransRotMessage::~LinTransRotMessage(), fawkes::FacialExpressionInterface::MoveBrowsMessage::~MoveBrowsMessage(), fawkes::FacialExpressionInterface::MoveEyesMessage::~MoveEyesMessage(), fawkes::HumanoidMotionInterface::MoveHeadMessage::~MoveHeadMessage(), fawkes::FacialExpressionInterface::MoveJowlMessage::~MoveJowlMessage(), fawkes::KatanaInterface::MoveMotorAngleMessage::~MoveMotorAngleMessage(), fawkes::KatanaInterface::MoveMotorEncoderMessage::~MoveMotorEncoderMessage(), fawkes::FacialExpressionInterface::MoveMouthMessage::~MoveMouthMessage(), fawkes::OpenRaveInterface::MoveObjectMessage::~MoveObjectMessage(), fawkes::NaoJointPositionInterface::MoveServoMessage::~MoveServoMessage(), fawkes::NaoJointPositionInterface::MoveServosMessage::~MoveServosMessage(), fawkes::KatanaInterface::ObjectGotoMessage::~ObjectGotoMessage(), fawkes::NavigatorInterface::ObstacleMessage::~ObstacleMessage(), fawkes::KatanaInterface::OpenGripperMessage::~OpenGripperMessage(), fawkes::MotorInterface::OrbitMessage::~OrbitMessage(), fawkes::KatanaInterface::ParkMessage::~ParkMessage(), fawkes::PanTiltInterface::ParkMessage::~ParkMessage(), fawkes::HumanoidMotionInterface::ParkMessage::~ParkMessage(), fawkes::NavigatorInterface::PlaceGotoMessage::~PlaceGotoMessage(), fawkes::NavigatorInterface::PolarGotoMessage::~PolarGotoMessage(), fawkes::BatteryInterface::PushButtonMessage::~PushButtonMessage(), fawkes::OpenRaveInterface::ReleaseAllObjectsMessage::~ReleaseAllObjectsMessage(), fawkes::SkillerInterface::ReleaseControlMessage::~ReleaseControlMessage(), fawkes::OpenRaveInterface::ReleaseObjectMessage::~ReleaseObjectMessage(), fawkes::OpenRaveInterface::RenameObjectMessage::~RenameObjectMessage(), fawkes::KickerInterface::ResetCounterMessage::~ResetCounterMessage(), fawkes::LocalizerControlInterface::ResetMessage::~ResetMessage(), fawkes::SpeechRecognitionInterface::ResetMessage::~ResetMessage(), fawkes::MotorInterface::ResetOdometryMessage::~ResetOdometryMessage(), fawkes::NavigatorInterface::ResetOdometryMessage::~ResetOdometryMessage(), fawkes::SkillerInterface::RestartInterpreterMessage::~RestartInterpreterMessage(), fawkes::OpenRaveInterface::RotateObjectMessage::~RotateObjectMessage(), fawkes::OpenRaveInterface::RotateObjectQuatMessage::~RotateObjectQuatMessage(), fawkes::MotorInterface::RotMessage::~RotMessage(), fawkes::SpeechSynthInterface::SayMessage::~SayMessage(), fawkes::NaoJointStiffnessInterface::SetBodyStiffnessMessage::~SetBodyStiffnessMessage(), fawkes::SpeechRecognitionInterface::SetEnabledMessage::~SetEnabledMessage(), fawkes::PanTiltInterface::SetEnabledMessage::~SetEnabledMessage(), fawkes::KatanaInterface::SetEnabledMessage::~SetEnabledMessage(), fawkes::NavigatorInterface::SetEscapingMessage::~SetEscapingMessage(), fawkes::SkillerDebugInterface::SetGraphColoredMessage::~SetGraphColoredMessage(), fawkes::SkillerDebugInterface::SetGraphDirectionMessage::~SetGraphDirectionMessage(), fawkes::SkillerDebugInterface::SetGraphMessage::~SetGraphMessage(), fawkes::LedInterface::SetIntensityMessage::~SetIntensityMessage(), fawkes::GameStateInterface::SetKickoffMessage::~SetKickoffMessage(), fawkes::PanTiltInterface::SetMarginMessage::~SetMarginMessage(), fawkes::NavigatorInterface::SetMaxVelocityMessage::~SetMaxVelocityMessage(), fawkes::KatanaInterface::SetMaxVelocityMessage::~SetMaxVelocityMessage(), fawkes::SwitchInterface::SetMessage::~SetMessage(), fawkes::Roomba500Interface::SetModeMessage::~SetModeMessage(), fawkes::KatanaInterface::SetMotorAngleMessage::~SetMotorAngleMessage(), fawkes::KatanaInterface::SetMotorEncoderMessage::~SetMotorEncoderMessage(), fawkes::Roomba500Interface::SetMotorsMessage::~SetMotorsMessage(), fawkes::MotorInterface::SetMotorStateMessage::~SetMotorStateMessage(), fawkes::FacerInterface::SetNameMessage::~SetNameMessage(), fawkes::FacerInterface::SetOpmodeMessage::~SetOpmodeMessage(), fawkes::SoccerPenaltyInterface::SetPenaltyMessage::~SetPenaltyMessage(), fawkes::KatanaInterface::SetPlannerParamsMessage::~SetPlannerParamsMessage(), fawkes::NavigatorInterface::SetSecurityDistanceMessage::~SetSecurityDistanceMessage(), fawkes::NaoJointPositionInterface::SetServoMessage::~SetServoMessage(), fawkes::NaoJointPositionInterface::SetServosMessage::~SetServosMessage(), fawkes::GameStateInterface::SetStateTeamMessage::~SetStateTeamMessage(), fawkes::NaoJointStiffnessInterface::SetStiffnessesMessage::~SetStiffnessesMessage(), fawkes::NaoJointStiffnessInterface::SetStiffnessMessage::~SetStiffnessMessage(), fawkes::GameStateInterface::SetTeamColorMessage::~SetTeamColorMessage(), fawkes::TestInterface::SetTestIntMessage::~SetTestIntMessage(), fawkes::TestInterface::SetTestStringMessage::~SetTestStringMessage(), fawkes::PanTiltInterface::SetVelocityMessage::~SetVelocityMessage(), fawkes::BatteryInterface::SleepMessage::~SleepMessage(), fawkes::HumanoidMotionInterface::StandupMessage::~StandupMessage(), fawkes::JoystickInterface::StartRumbleMessage::~StartRumbleMessage(), fawkes::NaoSensorInterface::StartUltrasonicMessage::~StartUltrasonicMessage(), fawkes::JoystickInterface::StopAllMessage::~StopAllMessage(), fawkes::SkillerInterface::StopExecMessage::~StopExecMessage(), fawkes::HumanoidMotionInterface::StopMessage::~StopMessage(), fawkes::PanTiltInterface::StopMessage::~StopMessage(), fawkes::NavigatorInterface::StopMessage::~StopMessage(), fawkes::KatanaInterface::StopMessage::~StopMessage(), fawkes::Roomba500Interface::StopMessage::~StopMessage(), fawkes::JoystickInterface::StopRumbleMessage::~StopRumbleMessage(), fawkes::NaoSensorInterface::StopUltrasonicMessage::~StopUltrasonicMessage(), fawkes::PanTiltInterface::TimedGotoMessage::~TimedGotoMessage(), fawkes::MotorInterface::TransMessage::~TransMessage(), fawkes::MotorInterface::TransRotMessage::~TransRotMessage(), fawkes::NavigatorInterface::TurnMessage::~TurnMessage(), fawkes::HumanoidMotionInterface::TurnMessage::~TurnMessage(), fawkes::LedInterface::TurnOffMessage::~TurnOffMessage(), fawkes::LedInterface::TurnOnMessage::~TurnOnMessage(), fawkes::HumanoidMotionInterface::WalkArcMessage::~WalkArcMessage(), fawkes::HumanoidMotionInterface::WalkSidewaysMessage::~WalkSidewaysMessage(), fawkes::HumanoidMotionInterface::WalkStraightMessage::~WalkStraightMessage(), and fawkes::HumanoidMotionInterface::WalkVelocityMessage::~WalkVelocityMessage().

fawkes::Interface::data_size
protected

Minimal data size to hold data storage.

Definition at line 207 of file interface.h.

Referenced by compare_buffers(), copy_private_to_buffer(), copy_shared_to_buffer(), datasize(), Interface(), read(), read_from_buffer(), resize_buffers(), set_from_chunk(), and write().

fawkes::Interface::data_ts
protected

Pointer to data casted to timestamp struct.

This assumes that the very first two entries are 64 bit wide signed integers containing seconds and microseconds since the Unix epoch.

Definition at line 216 of file interface.h.

Referenced by read(), and write().


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