29 #include <boost/foreach.hpp> 35 template<
class CommandType>
42 template<
class CommandType>
46 if (!this->
mutex->try_lock())
64 command->from_muscle_data_type =
68 ROS_DEBUG_STREAM(
"Updating initialization data type: " << command->from_muscle_data_type <<
" | [" <<
69 this->which_data_to_request <<
"/" << this->initialization_configs_vector.size() <<
"] ");
78 command->from_muscle_data_type =
80 ROS_DEBUG_STREAM(
"Updating important data type: " << command->from_muscle_data_type <<
" | [" <<
81 this->which_data_to_request <<
"/" << this->important_update_configs_vector.size() <<
"] ");
84 this->
mutex->unlock();
89 template<
class CommandType>
92 if (!this->
mutex->try_lock())
112 ROS_DEBUG_STREAM(
"Updating unimportant data type: " << command->from_muscle_data_type <<
" | queue size: " <<
113 this->unimportant_data_queue.size());
118 command->from_muscle_data_type =
121 ROS_DEBUG_STREAM(
"Updating important data type: " << command->from_muscle_data_type <<
" | [" <<
122 this->which_data_to_request <<
"/" << this->important_update_configs_vector.size() <<
"] ");
125 this->
mutex->unlock();
std::queue< int32u, std::list< int32u > > unimportant_data_queue
int which_data_to_request
iterate through the important or initialization data types.
operation_mode::device_update_state::DeviceUpdateState update_state
boost::shared_ptr< boost::mutex > mutex
operation_mode::device_update_state::DeviceUpdateState build_init_command(CommandType *command)
std::vector< UpdateConfig > initialization_configs_vector
#define ROS_DEBUG_STREAM(args)
std::vector< UpdateConfig > important_update_configs_vector
Contains all the important data types.
MuscleUpdater(std::vector< UpdateConfig > update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state)
operation_mode::device_update_state::DeviceUpdateState build_command(CommandType *command)