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 61 of file locked_robot_state.h.
typedef boost::function<void(robot_state::RobotState*) robot_interaction::LockedRobotState::ModifyStateFunction) |
Definition at line 82 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 47 of file locked_robot_state.cpp.
robot_interaction::LockedRobotState::~LockedRobotState | ( | ) | [virtual] |
Definition at line 54 of file locked_robot_state.cpp.
robot_state::RobotStateConstPtr robot_interaction::LockedRobotState::getState | ( | ) | const |
get read-only access to the state.
Definition at line 58 of file locked_robot_state.cpp.
void robot_interaction::LockedRobotState::modifyState | ( | const ModifyStateFunction & | modify | ) |
Definition at line 81 of file locked_robot_state.cpp.
void robot_interaction::LockedRobotState::robotStateChanged | ( | ) | [protected, virtual] |
Reimplemented in Super1.
Definition at line 97 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 64 of file locked_robot_state.cpp.
robot_state::RobotStatePtr robot_interaction::LockedRobotState::state_ [private] |
Definition at line 109 of file locked_robot_state.h.
boost::mutex robot_interaction::LockedRobotState::state_lock_ [mutable, protected] |
Definition at line 103 of file locked_robot_state.h.