Maintain a RobotState in a multithreaded environment. More...
#include <locked_robot_state.h>
Public Types | |
typedef boost::function< void(robot_state::RobotState *) | ModifyStateFunction ) |
Public Member Functions | |
robot_state::RobotStateConstPtr | getState () const |
get read-only access to the state. | |
LockedRobotState (const robot_state::RobotState &state) | |
LockedRobotState (const robot_model::RobotModelPtr &model) | |
void | modifyState (const ModifyStateFunction &modify) |
void | setState (const robot_state::RobotState &state) |
Set the state to the new value. | |
virtual | ~LockedRobotState () |
Protected Member Functions | |
virtual void | robotStateChanged () |
Protected Attributes | |
boost::mutex | state_lock_ |
Private Attributes | |
robot_state::RobotStatePtr | state_ |
Maintain a RobotState in a multithreaded environment.
Definition at line 59 of file locked_robot_state.h.
typedef boost::function<void (robot_state::RobotState*) robot_interaction::LockedRobotState::ModifyStateFunction) |
Definition at line 80 of file locked_robot_state.h.
robot_interaction::LockedRobotState::LockedRobotState | ( | const robot_state::RobotState & | state | ) |
Definition at line 41 of file locked_robot_state.cpp.
robot_interaction::LockedRobotState::LockedRobotState | ( | const robot_model::RobotModelPtr & | model | ) |
Definition at line 48 of file locked_robot_state.cpp.
robot_interaction::LockedRobotState::~LockedRobotState | ( | ) | [virtual] |
Definition at line 56 of file locked_robot_state.cpp.
robot_state::RobotStateConstPtr robot_interaction::LockedRobotState::getState | ( | ) | const |
get read-only access to the state.
Definition at line 61 of file locked_robot_state.cpp.
void robot_interaction::LockedRobotState::modifyState | ( | const ModifyStateFunction & | modify | ) |
Definition at line 85 of file locked_robot_state.cpp.
void robot_interaction::LockedRobotState::robotStateChanged | ( | ) | [protected, virtual] |
Reimplemented in Super1.
Definition at line 102 of file locked_robot_state.cpp.
void robot_interaction::LockedRobotState::setState | ( | const robot_state::RobotState & | state | ) |
Set the state to the new value.
Definition at line 67 of file locked_robot_state.cpp.
robot_state::RobotStatePtr robot_interaction::LockedRobotState::state_ [private] |
Definition at line 107 of file locked_robot_state.h.
boost::mutex robot_interaction::LockedRobotState::state_lock_ [mutable, protected] |
Definition at line 101 of file locked_robot_state.h.