00001 00028 #ifndef _BIOTAC_HPP_ 00029 #define _BIOTAC_HPP_ 00030 00031 #include <vector> 00032 #include <sr_robot_msgs/BiotacAll.h> 00033 #include <sr_robot_msgs/Biotac.h> 00034 #include <realtime_tools/realtime_publisher.h> 00035 00036 #include "sr_robot_lib/generic_tactiles.hpp" 00037 #include "sr_robot_lib/generic_updater.hpp" 00038 00039 namespace tactiles 00040 { 00041 template <class StatusType, class CommandType> 00042 class Biotac : 00043 public GenericTactiles<StatusType, CommandType> 00044 { 00045 public: 00046 Biotac(std::vector<generic_updater::UpdateConfig> update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state); 00047 Biotac(std::vector<generic_updater::UpdateConfig> update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state, boost::shared_ptr< std::vector<GenericTactileData> > init_tactiles_vector); 00048 ~Biotac() {}; 00049 00053 void init(std::vector<generic_updater::UpdateConfig> update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state); 00054 00062 virtual void update(StatusType* status_data); 00063 00068 virtual void publish(); 00069 00074 virtual void add_diagnostics(std::vector<diagnostic_msgs::DiagnosticStatus> &vec, 00075 diagnostic_updater::DiagnosticStatusWrapper &d); 00076 00077 00078 virtual std::vector<AllTactileData>* get_tactile_data(); 00079 00080 protected: 00082 boost::shared_ptr< std::vector<BiotacData> > tactiles_vector; 00083 00084 // Tactile sensor real time publisher 00085 boost::shared_ptr<realtime_tools::RealtimePublisher<sr_robot_msgs::BiotacAll> > tactile_publisher; 00086 };//end class 00087 }//end namespace 00088 00089 /* For the emacs weenies in the crowd. 00090 Local Variables: 00091 c-basic-offset: 2 00092 End: 00093 */ 00094 00095 #endif /* _SHADOW_PSTS_HPP_ */