Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

State Class Reference

#include <state.h>

Inheritance diagram for State:

List of all members.

Public Member Functions

void castEvent (Event event)
bool compareAdditional (std::vector< std::string > additional, std::string compare)
ActorgetActor ()
const char * getName ()
Event received (std::string topic, ros::Message *message)
 State (std::string name, std::string actor, EventSink *sink)
 State ()
virtual ~State ()

Protected Attributes

std::string actor_
std::string name_

Private Member Functions

virtual Event received (std::string topic, engagement_msgs::Speech *message)
virtual Event received (std::string topic, engagement_srvs::RobotMutualFacialGaze::Request *message)
virtual Event received (std::string topic, engagement_srvs::RobotDirectedGaze::Request *message)
virtual Event received (std::string topic, engagement_srvs::RobotAdjacencyPair::Request *message)
virtual Event received (std::string topic, engagement_srvs::ActorStatistics::Request *message)
virtual Event received (std::string topic, engagement_msgs::Performance *message)
virtual Event received (std::string topic, engagement_msgs::HumanMutualFacialGaze *message)
virtual Event received (std::string topic, engagement_msgs::HumanDirectedGaze *message)
virtual Event received (std::string topic, engagement_msgs::HumanBackchannel *message)
virtual Event received (std::string topic, engagement_msgs::HumanAdjacencyPair *message)
virtual Event received (std::string topic, bml_msgs::Flag *message)
virtual Event received (std::string topic, bml_msgs::Entity *message)
virtual Event received (std::string topic, engagement_msgs::Empty *message)
virtual Event received (std::string topic, engagement_msgs::ActorIDStatus *message)
virtual Event received (std::string topic, engagement_msgs::ActorID *message)

Detailed Description

The State class encapsulates the concept of a single state. Each state is expected to perform the logic that is required to determine when it should transition to another state and cast an Event up the parent tree of EventSinks.

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 60 of file state.h.


Constructor & Destructor Documentation

State::State (  ) 

Default constructor for the State class.

Definition at line 39 of file state.cpp.

State::State ( std::string  name,
std::string  actor,
EventSink sink 
)

Constructor that takes the name and pointer to the EventSink.

Parameters:
name The name of the State
actor The Actor object
sink The EventSink

Definition at line 47 of file state.cpp.

State::~State (  )  [virtual]

Deconstructor for the State class.

Definition at line 55 of file state.cpp.


Member Function Documentation

void State::castEvent ( Event  event  )  [virtual]

This function provides the concrete implementation of the castEvent method which will be called when an event has been issued.

Parameters:
event The event that has been cast.

Implements EventSink.

Definition at line 59 of file state.cpp.

bool State::compareAdditional ( std::vector< std::string >  additional,
std::string  compare 
) [virtual]

Compare the additional data as specified.

Parameters:
additional The additional data
compare How to compare the data
Returns:
Success of the comparison

Implements EventSink.

Definition at line 65 of file state.cpp.

Actor * State::getActor (  ) 

Return the Actor for this State.

Returns:
The Actor

Definition at line 223 of file state.cpp.

const char * State::getName (  ) 

Return the name for this State.

Returns:
The name of this State

Definition at line 228 of file state.cpp.

Event State::received ( std::string  topic,
ros::Message *  message 
)

A message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 76 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::Speech *  message 
) [private, virtual]

A Speech message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in APHumanResponseState, APHumanWaitingState, APRobotResponseState, APRobotWaitingState, APStartState, BCHumanFloorState, BCRobotFloorState, and BCStartState.

Definition at line 217 of file state.cpp.

Event State::received ( std::string  topic,
engagement_srvs::RobotMutualFacialGaze::Request *  message 
) [private, virtual]

A RobotMutualFacialGaze::Request message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in DGRobotDirectingState, DGSharedGazeState, MFGHumanWaitingState, MFGMutualFacialGazeState, and MFGStartState.

Definition at line 210 of file state.cpp.

Event State::received ( std::string  topic,
engagement_srvs::RobotDirectedGaze::Request *  message 
) [private, virtual]

A RobotDirectedGaze::Request message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in DGHumanDirectingState, DGRobotDirectingState, DGSharedGazeState, DGStartState, MFGMutualFacialGazeState, and MFGRobotWaitingState.

Definition at line 203 of file state.cpp.

Event State::received ( std::string  topic,
engagement_srvs::RobotAdjacencyPair::Request *  message 
) [private, virtual]

A RobotAdjacencyPair::Request message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in APStartState.

Definition at line 196 of file state.cpp.

Event State::received ( std::string  topic,
engagement_srvs::ActorStatistics::Request *  message 
) [private, virtual]

An ActorStatistics::Request message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 189 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::Performance *  message 
) [private, virtual]

A Performance message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in APHumanWaitingState, APRobotWaitingState, APStartState, BCHumanFloorState, BCRobotFloorState, DGHumanDirectingState, DGRobotDirectingState, DGSharedGazeState, DGStartState, MFGHumanWaitingState, MFGMutualFacialGazeState, MFGRobotWaitingState, and MFGStartState.

Definition at line 183 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::HumanMutualFacialGaze *  message 
) [private, virtual]

A HumanAdjacencyPair message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 176 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::HumanDirectedGaze *  message 
) [private, virtual]

A HumanAdjacencyPair message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 169 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::HumanBackchannel *  message 
) [private, virtual]

A HumanBackchannel message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 162 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::HumanAdjacencyPair *  message 
) [private, virtual]

A HumanAdjacencyPair message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 155 of file state.cpp.

Event State::received ( std::string  topic,
bml_msgs::Flag *  message 
) [private, virtual]

A Flag message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 149 of file state.cpp.

Event State::received ( std::string  topic,
bml_msgs::Entity *  message 
) [private, virtual]

An Entity message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 143 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::Empty *  message 
) [private, virtual]

An Empty message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 137 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::ActorIDStatus *  message 
) [private, virtual]

An ActorIDStatus message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Reimplemented in APHumanWaitingState, APRobotWaitingState, DGHumanDirectingState, DGRobotDirectingState, DGSharedGazeState, MFGHumanWaitingState, MFGMutualFacialGazeState, and MFGRobotWaitingState.

Definition at line 131 of file state.cpp.

Event State::received ( std::string  topic,
engagement_msgs::ActorID *  message 
) [private, virtual]

An ActorID message was received.

Parameters:
topic The topic
message The message was received
Returns:
The Event created

Definition at line 125 of file state.cpp.


Member Data Documentation

std::string State::actor_ [protected]

Keep track of the Actor associated with this State.

Definition at line 67 of file state.h.

std::string State::name_ [protected]

The name of the State.

Definition at line 64 of file state.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/states/state.h
  • engagement_recognition/src/recognition/states/state.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011