$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-pr2_ethercat_drivers/doc_stacks/2013-03-01_16-48-09.984649/pr2_ethercat_drivers/ethercat_hardware/msg/RawFTDataSample.msg */ 00002 #ifndef ETHERCAT_HARDWARE_MESSAGE_RAWFTDATASAMPLE_H 00003 #define ETHERCAT_HARDWARE_MESSAGE_RAWFTDATASAMPLE_H 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 #include <ostream> 00008 #include "ros/serialization.h" 00009 #include "ros/builtin_message_traits.h" 00010 #include "ros/message_operations.h" 00011 #include "ros/time.h" 00012 00013 #include "ros/macros.h" 00014 00015 #include "ros/assert.h" 00016 00017 00018 namespace ethercat_hardware 00019 { 00020 template <class ContainerAllocator> 00021 struct RawFTDataSample_ { 00022 typedef RawFTDataSample_<ContainerAllocator> Type; 00023 00024 RawFTDataSample_() 00025 : sample_count(0) 00026 , data() 00027 , vhalf(0) 00028 { 00029 } 00030 00031 RawFTDataSample_(const ContainerAllocator& _alloc) 00032 : sample_count(0) 00033 , data(_alloc) 00034 , vhalf(0) 00035 { 00036 } 00037 00038 typedef uint64_t _sample_count_type; 00039 uint64_t sample_count; 00040 00041 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _data_type; 00042 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > data; 00043 00044 typedef uint16_t _vhalf_type; 00045 uint16_t vhalf; 00046 00047 00048 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); } 00049 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); } 00050 ROS_DEPRECATED void get_data_vec(std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) const { vec = this->data; } 00051 ROS_DEPRECATED void set_data_vec(const std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) { this->data = vec; } 00052 private: 00053 static const char* __s_getDataType_() { return "ethercat_hardware/RawFTDataSample"; } 00054 public: 00055 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00056 00057 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00058 00059 private: 00060 static const char* __s_getMD5Sum_() { return "6c3b6e352fd24802b2d95b606df80de6"; } 00061 public: 00062 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00063 00064 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00065 00066 private: 00067 static const char* __s_getMessageDefinition_() { return "# One raw Data sample from WG035 F/T input via WG006 (gripper MCB).\n\ 00068 uint64 sample_count\n\ 00069 int16[] data\n\ 00070 uint16 vhalf\n\ 00071 "; } 00072 public: 00073 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00074 00075 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00076 00077 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00078 { 00079 ros::serialization::OStream stream(write_ptr, 1000000000); 00080 ros::serialization::serialize(stream, sample_count); 00081 ros::serialization::serialize(stream, data); 00082 ros::serialization::serialize(stream, vhalf); 00083 return stream.getData(); 00084 } 00085 00086 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00087 { 00088 ros::serialization::IStream stream(read_ptr, 1000000000); 00089 ros::serialization::deserialize(stream, sample_count); 00090 ros::serialization::deserialize(stream, data); 00091 ros::serialization::deserialize(stream, vhalf); 00092 return stream.getData(); 00093 } 00094 00095 ROS_DEPRECATED virtual uint32_t serializationLength() const 00096 { 00097 uint32_t size = 0; 00098 size += ros::serialization::serializationLength(sample_count); 00099 size += ros::serialization::serializationLength(data); 00100 size += ros::serialization::serializationLength(vhalf); 00101 return size; 00102 } 00103 00104 typedef boost::shared_ptr< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > Ptr; 00105 typedef boost::shared_ptr< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> const> ConstPtr; 00106 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00107 }; // struct RawFTDataSample 00108 typedef ::ethercat_hardware::RawFTDataSample_<std::allocator<void> > RawFTDataSample; 00109 00110 typedef boost::shared_ptr< ::ethercat_hardware::RawFTDataSample> RawFTDataSamplePtr; 00111 typedef boost::shared_ptr< ::ethercat_hardware::RawFTDataSample const> RawFTDataSampleConstPtr; 00112 00113 00114 template<typename ContainerAllocator> 00115 std::ostream& operator<<(std::ostream& s, const ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> & v) 00116 { 00117 ros::message_operations::Printer< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> >::stream(s, "", v); 00118 return s;} 00119 00120 } // namespace ethercat_hardware 00121 00122 namespace ros 00123 { 00124 namespace message_traits 00125 { 00126 template<class ContainerAllocator> struct IsMessage< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > : public TrueType {}; 00127 template<class ContainerAllocator> struct IsMessage< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> const> : public TrueType {}; 00128 template<class ContainerAllocator> 00129 struct MD5Sum< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > { 00130 static const char* value() 00131 { 00132 return "6c3b6e352fd24802b2d95b606df80de6"; 00133 } 00134 00135 static const char* value(const ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> &) { return value(); } 00136 static const uint64_t static_value1 = 0x6c3b6e352fd24802ULL; 00137 static const uint64_t static_value2 = 0xb2d95b606df80de6ULL; 00138 }; 00139 00140 template<class ContainerAllocator> 00141 struct DataType< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > { 00142 static const char* value() 00143 { 00144 return "ethercat_hardware/RawFTDataSample"; 00145 } 00146 00147 static const char* value(const ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> &) { return value(); } 00148 }; 00149 00150 template<class ContainerAllocator> 00151 struct Definition< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > { 00152 static const char* value() 00153 { 00154 return "# One raw Data sample from WG035 F/T input via WG006 (gripper MCB).\n\ 00155 uint64 sample_count\n\ 00156 int16[] data\n\ 00157 uint16 vhalf\n\ 00158 "; 00159 } 00160 00161 static const char* value(const ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> &) { return value(); } 00162 }; 00163 00164 } // namespace message_traits 00165 } // namespace ros 00166 00167 namespace ros 00168 { 00169 namespace serialization 00170 { 00171 00172 template<class ContainerAllocator> struct Serializer< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > 00173 { 00174 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00175 { 00176 stream.next(m.sample_count); 00177 stream.next(m.data); 00178 stream.next(m.vhalf); 00179 } 00180 00181 ROS_DECLARE_ALLINONE_SERIALIZER; 00182 }; // struct RawFTDataSample_ 00183 } // namespace serialization 00184 } // namespace ros 00185 00186 namespace ros 00187 { 00188 namespace message_operations 00189 { 00190 00191 template<class ContainerAllocator> 00192 struct Printer< ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> > 00193 { 00194 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_hardware::RawFTDataSample_<ContainerAllocator> & v) 00195 { 00196 s << indent << "sample_count: "; 00197 Printer<uint64_t>::stream(s, indent + " ", v.sample_count); 00198 s << indent << "data[]" << std::endl; 00199 for (size_t i = 0; i < v.data.size(); ++i) 00200 { 00201 s << indent << " data[" << i << "]: "; 00202 Printer<int16_t>::stream(s, indent + " ", v.data[i]); 00203 } 00204 s << indent << "vhalf: "; 00205 Printer<uint16_t>::stream(s, indent + " ", v.vhalf); 00206 } 00207 }; 00208 00209 00210 } // namespace message_operations 00211 } // namespace ros 00212 00213 #endif // ETHERCAT_HARDWARE_MESSAGE_RAWFTDATASAMPLE_H 00214