Fawkes API Fawkes Development Version

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 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.
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.

Never use directly. Use interface generator to create 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.

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.

Author:
Tim Niemueller

Definition at line 79 of file interface.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 196 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 289 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, type(), fawkes::interface_fieldinfo_t::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 324 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 687 of file interface.cpp.

Referenced by WebviewBlackBoardRequestProcessor::process_request().

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 380 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::BatteryInterface, fawkes::FacerInterface, fawkes::FacialExpressionInterface, fawkes::GameStateInterface, fawkes::HumanoidMotionInterface, fawkes::JoystickInterface, fawkes::KatanaInterface, fawkes::KickerInterface, fawkes::Laser360Interface, fawkes::Laser720Interface, fawkes::LedInterface, fawkes::LocalizerControlInterface, fawkes::MotorInterface, fawkes::NavigatorInterface, fawkes::ObjectPositionInterface, fawkes::PanTiltInterface, fawkes::Position2DTrackInterface, fawkes::SkillerDebugInterface, fawkes::SkillerInterface, fawkes::SoccerPenaltyInterface, fawkes::SpeechRecognitionInterface, fawkes::SpeechSynthInterface, fawkes::SwitchInterface, fawkes::TestInterface, and fawkes::VisualDisplay2DInterface.

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 1043 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 1053 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 350 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 717 of file interface.cpp.

References fawkes::InterfaceMediator::exists_writer().

Referenced by LaserDrawingArea::draw_persons_legs(), LaserDrawingArea::draw_segments(), LuaAgentExecutionThread::finalize(), WorldModelObjPosMajorityFuser::fuse(), WorldModelObjPosAverageFuser::fuse(), WorldModelThread::loop(), RefBoxCommThread::loop(), LaserHtSensorProcThread::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 249 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 259 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 369 of file interface.cpp.

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

const char * fawkes::Interface::id ( ) const
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 415 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 620 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 980 of file interface.cpp.

References fawkes::MessageQueue::begin().

bool fawkes::Interface::msgq_empty ( )
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 998 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 763 of file interface.cpp.

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

Referenced by LuaAgentExecutionThread::finalize(), LuaAgentExecutionThread::init(), XabslEngineThread::loop(), RefBoxCommThread::loop(), LaserHtSensorProcThread::loop(), LaserDrawingArea::on_expose_event(), 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 798 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 ( 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 262 of file interface.h.

MessageType * fawkes::Interface::msgq_first ( )

Get the first message from the message queue.

This can only be called on a writing interface instance.

Returns:
first message in queue or NULL if there is none

Definition at line 1014 of file interface.cpp.

References fawkes::MessageQueue::first().

Referenced by RefBoxCommThread::loop(), AgentControlThread::loop(), PanTiltSonyEviD100PThread::loop(), PanTiltRX28Thread::loop(), PanTiltDirectedPerceptionThread::loop(), SkillerExecutionThread::loop(), KatanaActThread::loop(), FliteSynthThread::loop(), FestivalSynthThread::loop(), and PlayerMotorPositionMapper::sync_fawkes_to_player().

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 >
bool fawkes::Interface::msgq_first_is ( )
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 913 of file interface.cpp.

References fawkes::MessageQueue::flush().

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 929 of file interface.cpp.

References fawkes::MessageQueue::lock().

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 865 of file interface.cpp.

References fawkes::MessageQueue::remove().

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. Know what you are doing if you want to use it. This can only be called on a writing interface instance.

Parameters:
messageMessage to remove.

Definition at line 848 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 881 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.

Returns:
true, if the lock has been aquired, false otherwise.
See also:
lock() This can only be called on a writing interface instance.

Definition at line 947 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 963 of file interface.cpp.

References fawkes::MessageQueue::unlock().

unsigned int fawkes::Interface::num_fields ( )

Get the number of fields in the interface.

Returns:
the number of fields

Definition at line 1063 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 744 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 566 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 554 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 1077 of file interface.cpp.

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 673 of file interface.cpp.

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

Set clock to use for timestamping.

Parameters:
clockclock to use from now on

Definition at line 662 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 702 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 269 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 642 of file interface.cpp.

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

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 403 of file interface.cpp.

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

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

Get timestamp of last write.

Note that you need to call read() before this provides useful information.

Returns:
timestamp of last write.

Definition at line 631 of file interface.cpp.

Referenced by WebviewBlackBoardRequestProcessor::process_request().

const char * fawkes::Interface::type ( ) const
void fawkes::Interface::write ( )

Write from local copy into BlackBoard memory.

Exceptions:
InterfaceInvalidExceptionthrown if the interface has been marked invalid

Definition at line 444 of file interface.cpp.

References data_changed, data_ptr, data_size, data_ts, fawkes::Time::get_timestamp(), 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, and fawkes::ReadWriteLock::unlock().

Referenced by WorldModelNetworkThread::ball_pos_rcvd(), LaserHtSensorProcThread::finalize(), WorldModelNetworkThread::gamestate_rcvd(), WorldModelNetworkThread::global_ball_pos_rcvd(), RefBoxCommThread::handle_refbox_state(), PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), PanTiltDirectedPerceptionThread::init(), SkillerExecutionThread::init(), LaserSensorThread::init(), BBLoggerThread::init(), RefBoxCommThread::loop(), AgentControlThread::loop(), PanTiltSonyEviD100PThread::loop(), PanTiltRX28Thread::loop(), PanTiltDirectedPerceptionThread::loop(), SkillerExecutionThread::loop(), LaserHtSensorProcThread::loop(), KatanaActThread::loop(), LaserSensorThread::loop(), JoystickSensorThread::loop(), BBLogReplayThread::loop(), BBLogReplayThread::once(), WorldModelNetworkThread::opponent_pose_rcvd(), WorldModelNetworkThread::pose_rcvd(), FliteSynthThread::say(), FestivalSynthThread::say(), RefBoxStateBBWriter::send(), PlayerPositionMapper::sync_player_to_fawkes(), PlayerMotorPositionMapper::sync_player_to_fawkes(), PlayerLaserMapper::sync_player_to_fawkes(), PanTiltSonyEviD100PThread::update_sensor_values(), PanTiltRX28Thread::update_sensor_values(), and PanTiltDirectedPerceptionThread::update_sensor_values().


Member Data Documentation

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 190 of file interface.h.

Referenced by Interface(), fawkes::SwitchInterface::set_activation_count(), fawkes::JoystickInterface::set_axis_x(), fawkes::JoystickInterface::set_axis_y(), fawkes::ObjectPositionInterface::set_bearing(), fawkes::FacerInterface::set_bearing(), fawkes::FacialExpressionInterface::set_brows_action(), fawkes::Laser720Interface::set_clockwise_angle(), fawkes::Laser360Interface::set_clockwise_angle(), fawkes::SkillerInterface::set_continuous(), fawkes::MotorInterface::set_controller(), fawkes::MotorInterface::set_controller_thread_name(), fawkes::VisualDisplay2DInterface::set_counter(), fawkes::SpeechRecognitionInterface::set_counter(), 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::Laser720Interface::set_distances(), fawkes::Laser360Interface::set_distances(), fawkes::MotorInterface::set_drive_mode(), fawkes::SpeechSynthInterface::set_duration(), fawkes::SwitchInterface::set_enabled(), fawkes::SpeechRecognitionInterface::set_enabled(), fawkes::SkillerInterface::set_error(), 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::SpeechSynthInterface::set_final(), fawkes::NavigatorInterface::set_final(), fawkes::TestInterface::set_flags(), fawkes::ObjectPositionInterface::set_flags(), fawkes::NavigatorInterface::set_flags(), fawkes::GameStateInterface::set_game_state(), fawkes::KickerInterface::set_guide_ball_side(), fawkes::GameStateInterface::set_half(), fawkes::SwitchInterface::set_history(), fawkes::FacerInterface::set_history_ratio(), fawkes::LedInterface::set_intensity(), fawkes::FacialExpressionInterface::set_jowl_action(), fawkes::GameStateInterface::set_kickoff(), 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::FacerInterface::set_most_likely_identity(), fawkes::MotorInterface::set_motor_state(), fawkes::FacialExpressionInterface::set_mouth_action(), fawkes::SpeechSynthInterface::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::GameStateInterface::set_our_goal_color(), fawkes::GameStateInterface::set_our_team(), fawkes::SoccerPenaltyInterface::set_penalty(), fawkes::ObjectPositionInterface::set_pitch(), fawkes::JoystickInterface::set_pressed_buttons(), fawkes::SpeechRecognitionInterface::set_processing(), fawkes::MotorInterface::set_rear_rpm(), fawkes::FacerInterface::set_recognized_identity(), fawkes::FacerInterface::set_recognized_name(), fawkes::FacerInterface::set_recording_progress(), 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::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::GameStateInterface::set_state_team(), fawkes::SkillerInterface::set_status(), fawkes::TestInterface::set_test_bool(), fawkes::TestInterface::set_test_int(), fawkes::TestInterface::set_test_lint(), fawkes::TestInterface::set_test_string(), fawkes::TestInterface::set_test_uint(), fawkes::TestInterface::set_test_ulint(), 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::Position2DTrackInterface::set_valid(), fawkes::ObjectPositionInterface::set_valid(), fawkes::SwitchInterface::set_value(), fawkes::ObjectPositionInterface::set_visibility_history(), fawkes::FacerInterface::set_visibility_history(), fawkes::ObjectPositionInterface::set_visible(), 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().

Pointer to local memory storage.

Definition at line 188 of file interface.h.

Referenced by datachunk(), Interface(), read(), set_from_chunk(), write(), fawkes::SkillerInterface::AcquireControlMessage::~AcquireControlMessage(), fawkes::MotorInterface::AcquireControlMessage::~AcquireControlMessage(), fawkes::VisualDisplay2DInterface::AddCartCircleMessage::~AddCartCircleMessage(), fawkes::VisualDisplay2DInterface::AddCartLineMessage::~AddCartLineMessage(), fawkes::VisualDisplay2DInterface::AddCartRectMessage::~AddCartRectMessage(), fawkes::VisualDisplay2DInterface::AddCartTextMessage::~AddCartTextMessage(), 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::VisualDisplay2DInterface::DeleteObjectMessage::~DeleteObjectMessage(), fawkes::SwitchInterface::DisableSwitchMessage::~DisableSwitchMessage(), fawkes::MotorInterface::DriveRPMMessage::~DriveRPMMessage(), 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::LinearGotoMessage::~LinearGotoMessage(), fawkes::MotorInterface::LinTransRotMessage::~LinTransRotMessage(), fawkes::FacialExpressionInterface::MoveBrowsMessage::~MoveBrowsMessage(), fawkes::FacialExpressionInterface::MoveEyesMessage::~MoveEyesMessage(), fawkes::FacialExpressionInterface::MoveJowlMessage::~MoveJowlMessage(), fawkes::FacialExpressionInterface::MoveMouthMessage::~MoveMouthMessage(), fawkes::NavigatorInterface::ObstacleMessage::~ObstacleMessage(), fawkes::KatanaInterface::OpenGripperMessage::~OpenGripperMessage(), fawkes::MotorInterface::OrbitMessage::~OrbitMessage(), fawkes::PanTiltInterface::ParkMessage::~ParkMessage(), fawkes::KatanaInterface::ParkMessage::~ParkMessage(), fawkes::HumanoidMotionInterface::ParkMessage::~ParkMessage(), fawkes::NavigatorInterface::PlaceGotoMessage::~PlaceGotoMessage(), fawkes::NavigatorInterface::PolarGotoMessage::~PolarGotoMessage(), fawkes::BatteryInterface::PushButtonMessage::~PushButtonMessage(), fawkes::SkillerInterface::ReleaseControlMessage::~ReleaseControlMessage(), fawkes::KickerInterface::ResetCounterMessage::~ResetCounterMessage(), fawkes::SpeechRecognitionInterface::ResetMessage::~ResetMessage(), fawkes::LocalizerControlInterface::ResetMessage::~ResetMessage(), fawkes::NavigatorInterface::ResetOdometryMessage::~ResetOdometryMessage(), fawkes::MotorInterface::ResetOdometryMessage::~ResetOdometryMessage(), fawkes::SkillerInterface::RestartInterpreterMessage::~RestartInterpreterMessage(), fawkes::MotorInterface::RotMessage::~RotMessage(), fawkes::SpeechSynthInterface::SayMessage::~SayMessage(), fawkes::PanTiltInterface::SetEnabledMessage::~SetEnabledMessage(), fawkes::KatanaInterface::SetEnabledMessage::~SetEnabledMessage(), fawkes::SpeechRecognitionInterface::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::KatanaInterface::SetMaxVelocityMessage::~SetMaxVelocityMessage(), fawkes::NavigatorInterface::SetMaxVelocityMessage::~SetMaxVelocityMessage(), fawkes::SwitchInterface::SetMessage::~SetMessage(), fawkes::MotorInterface::SetMotorStateMessage::~SetMotorStateMessage(), fawkes::FacerInterface::SetNameMessage::~SetNameMessage(), fawkes::FacerInterface::SetOpmodeMessage::~SetOpmodeMessage(), fawkes::SoccerPenaltyInterface::SetPenaltyMessage::~SetPenaltyMessage(), fawkes::NavigatorInterface::SetSecurityDistanceMessage::~SetSecurityDistanceMessage(), fawkes::GameStateInterface::SetStateTeamMessage::~SetStateTeamMessage(), fawkes::HumanoidMotionInterface::SetStiffnessParamsMessage::~SetStiffnessParamsMessage(), fawkes::GameStateInterface::SetTeamColorMessage::~SetTeamColorMessage(), fawkes::TestInterface::SetTestIntMessage::~SetTestIntMessage(), fawkes::TestInterface::SetTestStringMessage::~SetTestStringMessage(), fawkes::PanTiltInterface::SetVelocityMessage::~SetVelocityMessage(), fawkes::HumanoidMotionInterface::SetWalkArmsParamsMessage::~SetWalkArmsParamsMessage(), fawkes::HumanoidMotionInterface::SetWalkParamsMessage::~SetWalkParamsMessage(), fawkes::BatteryInterface::SleepMessage::~SleepMessage(), fawkes::HumanoidMotionInterface::StandupMessage::~StandupMessage(), fawkes::SkillerInterface::StopExecMessage::~StopExecMessage(), fawkes::PanTiltInterface::StopMessage::~StopMessage(), fawkes::KatanaInterface::StopMessage::~StopMessage(), fawkes::NavigatorInterface::StopMessage::~StopMessage(), fawkes::HumanoidMotionInterface::StopMessage::~StopMessage(), 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::WalkMessage::~WalkMessage(), fawkes::HumanoidMotionInterface::WalkSidewaysMessage::~WalkSidewaysMessage(), fawkes::HumanoidMotionInterface::WalkStraightMessage::~WalkStraightMessage(), and fawkes::HumanoidMotionInterface::YawPitchHeadMessage::~YawPitchHeadMessage().

Minimal data size to hold data storage.

Definition at line 189 of file interface.h.

Referenced by datasize(), Interface(), read(), set_from_chunk(), and write().

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 198 of file interface.h.

Referenced by read(), and write().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends