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

FacialExpressionInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::FacialExpressionInterface:

List of all members.

Classes

struct  FacialExpressionInterface_data_t
 Internal data storage, do NOT modify!
class  MoveBrowsMessage
 MoveBrowsMessage Fawkes BlackBoard Interface Message. More...
class  MoveEyesMessage
 MoveEyesMessage Fawkes BlackBoard Interface Message. More...
class  MoveJowlMessage
 MoveJowlMessage Fawkes BlackBoard Interface Message. More...
class  MoveMouthMessage
 MoveMouthMessage Fawkes BlackBoard Interface Message. More...

Public Types

enum  brows_t { BROWS_DEFAULT, BROWS_FROWN, BROWS_LIFT }
 Action types for moving brows. More...
enum  eyes_t {
  EYES_DEFAULT, EYES_UP, EYES_DOWN, EYES_LEFT,
  EYES_RIGHT, EYES_COOL, EYES_CROSS, EYES_HEART,
  EYES_DOLLAR
}
 Action types for moving eyes. More...
enum  jowl_t { JOWL_DEFAULT, JOWL_BLUSH, JOWL_TEARS }
 Action types for moving jowl. More...
enum  mouth_t {
  MOUTH_DEFAULT, MOUTH_OPEN, MOUTH_CLOSE, MOUTH_SMILE,
  MOUTH_SCOWL
}
 Action types for moving mouth. More...

Public Member Functions

const char * tostring_brows_t (brows_t value) const
 Convert brows_t constant to string.
const char * tostring_eyes_t (eyes_t value) const
 Convert eyes_t constant to string.
const char * tostring_jowl_t (jowl_t value) const
 Convert jowl_t constant to string.
const char * tostring_mouth_t (mouth_t value) const
 Convert mouth_t constant to string.
virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
brows_t brows_action () const
 Get brows_action value.
void set_brows_action (const brows_t new_brows_action)
 Set brows_action value.
size_t maxlenof_brows_action () const
 Get maximum length of brows_action value.
eyes_t eyes_action () const
 Get eyes_action value.
void set_eyes_action (const eyes_t new_eyes_action)
 Set eyes_action value.
size_t maxlenof_eyes_action () const
 Get maximum length of eyes_action value.
jowl_t jowl_action () const
 Get jowl_action value.
void set_jowl_action (const jowl_t new_jowl_action)
 Set jowl_action value.
size_t maxlenof_jowl_action () const
 Get maximum length of jowl_action value.
mouth_t mouth_action () const
 Get mouth_action value.
void set_mouth_action (const mouth_t new_mouth_action)
 Set mouth_action value.
size_t maxlenof_mouth_action () const
 Get maximum length of mouth_action value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.
- Public Member Functions inherited from fawkes::Interface
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.
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.

Additional Inherited Members

- Static Public Member Functions inherited from fawkes::Interface
static void parse_uid (const char *uid, char **type, char **id)
 Parse UID to type and ID strings.
- Protected Member Functions inherited from fawkes::Interface
 Interface ()
 Constructor.
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 inherited from fawkes::Interface
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.

Detailed Description

FacialExpressionInterface Fawkes BlackBoard Interface.

Interface to acces facial expressions on display (RCSoft)

Definition at line 33 of file FacialExpressionInterface.h.


Member Enumeration Documentation

Action types for moving brows.

Enumerator:
BROWS_DEFAULT 

Reset.

BROWS_FROWN 

Frown.

BROWS_LIFT 

Lift.

Definition at line 42 of file FacialExpressionInterface.h.

Action types for moving eyes.

Enumerator:
EYES_DEFAULT 

Reset.

EYES_UP 

Up.

EYES_DOWN 

Down.

EYES_LEFT 

Left.

EYES_RIGHT 

Right.

EYES_COOL 

Cool.

EYES_CROSS 

Cross.

EYES_HEART 

Heart.

EYES_DOLLAR 

Dollar.

Definition at line 50 of file FacialExpressionInterface.h.

Action types for moving jowl.

Enumerator:
JOWL_DEFAULT 

Reset.

JOWL_BLUSH 

Blush.

JOWL_TEARS 

Tears.

Definition at line 64 of file FacialExpressionInterface.h.

Action types for moving mouth.

Enumerator:
MOUTH_DEFAULT 

Reset.

MOUTH_OPEN 

Open.

MOUTH_CLOSE 

Close.

MOUTH_SMILE 

Smile.

MOUTH_SCOWL 

Scowl.

Definition at line 72 of file FacialExpressionInterface.h.


Member Function Documentation

FacialExpressionInterface::brows_t fawkes::FacialExpressionInterface::brows_action ( ) const

Get brows_action value.

Type of action of brows

Returns:
brows_action value

Definition at line 138 of file FacialExpressionInterface.cpp.

void fawkes::FacialExpressionInterface::copy_values ( const Interface other)
virtual

Copy values from other interface.

Parameters:
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 280 of file FacialExpressionInterface.cpp.

References fawkes::Interface::type().

Message * fawkes::FacialExpressionInterface::create_message ( const char *  type) const
virtual

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters:
typemessage type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 259 of file FacialExpressionInterface.cpp.

const char * fawkes::FacialExpressionInterface::enum_tostring ( const char *  enumtype,
int  val 
) const
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.

Implements fawkes::Interface.

Definition at line 291 of file FacialExpressionInterface.cpp.

FacialExpressionInterface::eyes_t fawkes::FacialExpressionInterface::eyes_action ( ) const

Get eyes_action value.

Type of action of eyes

Returns:
eyes_action value

Definition at line 169 of file FacialExpressionInterface.cpp.

FacialExpressionInterface::jowl_t fawkes::FacialExpressionInterface::jowl_action ( ) const

Get jowl_action value.

Type of action of jown

Returns:
jowl_action value

Definition at line 200 of file FacialExpressionInterface.cpp.

size_t fawkes::FacialExpressionInterface::maxlenof_brows_action ( ) const

Get maximum length of brows_action value.

Returns:
length of brows_action value, can be length of the array or number of maximum number of characters for a string

Definition at line 148 of file FacialExpressionInterface.cpp.

size_t fawkes::FacialExpressionInterface::maxlenof_eyes_action ( ) const

Get maximum length of eyes_action value.

Returns:
length of eyes_action value, can be length of the array or number of maximum number of characters for a string

Definition at line 179 of file FacialExpressionInterface.cpp.

size_t fawkes::FacialExpressionInterface::maxlenof_jowl_action ( ) const

Get maximum length of jowl_action value.

Returns:
length of jowl_action value, can be length of the array or number of maximum number of characters for a string

Definition at line 210 of file FacialExpressionInterface.cpp.

size_t fawkes::FacialExpressionInterface::maxlenof_mouth_action ( ) const

Get maximum length of mouth_action value.

Returns:
length of mouth_action value, can be length of the array or number of maximum number of characters for a string

Definition at line 241 of file FacialExpressionInterface.cpp.

bool fawkes::FacialExpressionInterface::message_valid ( const Message message) const
virtual

Check if message is valid and can be enqueued.

Parameters:
messageMessage to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 674 of file FacialExpressionInterface.cpp.

FacialExpressionInterface::mouth_t fawkes::FacialExpressionInterface::mouth_action ( ) const

Get mouth_action value.

Type of action of mouth

Returns:
mouth_action value

Definition at line 231 of file FacialExpressionInterface.cpp.

void fawkes::FacialExpressionInterface::set_brows_action ( const brows_t  new_brows_action)

Set brows_action value.

Type of action of brows

Parameters:
new_brows_actionnew brows_action value

Definition at line 158 of file FacialExpressionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacialExpressionInterface::set_eyes_action ( const eyes_t  new_eyes_action)

Set eyes_action value.

Type of action of eyes

Parameters:
new_eyes_actionnew eyes_action value

Definition at line 189 of file FacialExpressionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacialExpressionInterface::set_jowl_action ( const jowl_t  new_jowl_action)

Set jowl_action value.

Type of action of jown

Parameters:
new_jowl_actionnew jowl_action value

Definition at line 220 of file FacialExpressionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacialExpressionInterface::set_mouth_action ( const mouth_t  new_mouth_action)

Set mouth_action value.

Type of action of mouth

Parameters:
new_mouth_actionnew mouth_action value

Definition at line 251 of file FacialExpressionInterface.cpp.

References fawkes::Interface::data_changed.

const char * fawkes::FacialExpressionInterface::tostring_brows_t ( brows_t  value) const

Convert brows_t constant to string.

Parameters:
valuevalue to convert to string
Returns:
constant value as string.

Definition at line 73 of file FacialExpressionInterface.cpp.

const char * fawkes::FacialExpressionInterface::tostring_eyes_t ( eyes_t  value) const

Convert eyes_t constant to string.

Parameters:
valuevalue to convert to string
Returns:
constant value as string.

Definition at line 87 of file FacialExpressionInterface.cpp.

const char * fawkes::FacialExpressionInterface::tostring_jowl_t ( jowl_t  value) const

Convert jowl_t constant to string.

Parameters:
valuevalue to convert to string
Returns:
constant value as string.

Definition at line 107 of file FacialExpressionInterface.cpp.

const char * fawkes::FacialExpressionInterface::tostring_mouth_t ( mouth_t  value) const

Convert mouth_t constant to string.

Parameters:
valuevalue to convert to string
Returns:
constant value as string.

Definition at line 121 of file FacialExpressionInterface.cpp.


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