28 #include <boost/foreach.hpp> 29 #include <boost/thread/mutex.hpp> 30 #include <boost/smart_ptr.hpp> 36 template<
class CommandType>
43 template<
class CommandType>
47 if (!this->
mutex->try_lock())
68 ROS_DEBUG_STREAM(
"Updating sensor initialization data type: " << command->tactile_data_type <<
" | [" <<
69 this->which_data_to_request <<
"/" << this->initialization_configs_vector.size() <<
"] ");
82 ROS_DEBUG_STREAM(
"Updating sensor initialization data type: " << command->tactile_data_type <<
" | [" <<
83 this->which_data_to_request <<
"/" << this->important_update_configs_vector.size() <<
"] ");
85 this->
mutex->unlock();
90 template<
class CommandType>
93 if (!this->
mutex->try_lock())
114 ROS_DEBUG_STREAM(
"Updating sensor unimportant data type: " << command->tactile_data_type <<
" | queue size: " <<
115 this->unimportant_data_queue.size());
121 ROS_DEBUG_STREAM(
"Updating sensor important data type: " << command->tactile_data_type <<
" | [" <<
122 this->which_data_to_request <<
"/" << this->important_update_configs_vector.size() <<
"] ");
125 this->
mutex->unlock();
130 template<
class CommandType>
135 boost::mutex::scoped_lock l(*(this->
mutex));
136 for (
unsigned int i = 0; i < 2; ++i)
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
TACTILE_SENSOR_TYPE_RESET_COMMAND
operation_mode::device_update_state::DeviceUpdateState build_init_command(CommandType *command)
std::vector< UpdateConfig > initialization_configs_vector
operation_mode::device_update_state::DeviceUpdateState build_command(CommandType *command)
#define ROS_DEBUG_STREAM(args)
std::vector< UpdateConfig > important_update_configs_vector
Contains all the important data types.
TACTILE_SENSOR_TYPE_WHICH_SENSORS
SensorUpdater(std::vector< UpdateConfig > update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state)