Project: engagement_recognition
License: BSD
Dependencies:
Used by:
None
All Packages
|
State Class Reference
#include <state.h>
List of all members.
Public Member Functions |
void | castEvent (Event event) |
bool | compareAdditional (std::vector< std::string > additional, std::string compare) |
Actor * | getActor () |
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
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:
-
Definition at line 47 of file state.cpp.
State::~State |
( |
|
) |
[virtual] |
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 |
( |
|
) |
|
const char * State::getName |
( |
|
) |
|
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] |
Event State::received |
( |
std::string |
topic, |
|
|
engagement_srvs::RobotMutualFacialGaze::Request * |
message | |
|
) |
| | [private, virtual] |
Event State::received |
( |
std::string |
topic, |
|
|
engagement_srvs::RobotDirectedGaze::Request * |
message | |
|
) |
| | [private, virtual] |
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] |
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
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
|