$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-p2os/doc_stacks/2013-03-01_16-19-23.450784/p2os/p2os_driver/msg/AIO.msg */ 00002 #ifndef P2OS_DRIVER_MESSAGE_AIO_H 00003 #define P2OS_DRIVER_MESSAGE_AIO_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 p2os_driver 00019 { 00020 template <class ContainerAllocator> 00021 struct AIO_ { 00022 typedef AIO_<ContainerAllocator> Type; 00023 00024 AIO_() 00025 : voltages_count(0) 00026 , voltages() 00027 { 00028 } 00029 00030 AIO_(const ContainerAllocator& _alloc) 00031 : voltages_count(0) 00032 , voltages(_alloc) 00033 { 00034 } 00035 00036 typedef uint8_t _voltages_count_type; 00037 uint8_t voltages_count; 00038 00039 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _voltages_type; 00040 std::vector<float, typename ContainerAllocator::template rebind<float>::other > voltages; 00041 00042 00043 ROS_DEPRECATED uint32_t get_voltages_size() const { return (uint32_t)voltages.size(); } 00044 ROS_DEPRECATED void set_voltages_size(uint32_t size) { voltages.resize((size_t)size); } 00045 ROS_DEPRECATED void get_voltages_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->voltages; } 00046 ROS_DEPRECATED void set_voltages_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->voltages = vec; } 00047 private: 00048 static const char* __s_getDataType_() { return "p2os_driver/AIO"; } 00049 public: 00050 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00051 00052 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00053 00054 private: 00055 static const char* __s_getMD5Sum_() { return "80e4ca5770a3db29064af246946ff4fe"; } 00056 public: 00057 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00058 00059 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00060 00061 private: 00062 static const char* __s_getMessageDefinition_() { return "uint8 voltages_count\n\ 00063 float32[] voltages\n\ 00064 \n\ 00065 "; } 00066 public: 00067 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00068 00069 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00070 00071 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00072 { 00073 ros::serialization::OStream stream(write_ptr, 1000000000); 00074 ros::serialization::serialize(stream, voltages_count); 00075 ros::serialization::serialize(stream, voltages); 00076 return stream.getData(); 00077 } 00078 00079 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00080 { 00081 ros::serialization::IStream stream(read_ptr, 1000000000); 00082 ros::serialization::deserialize(stream, voltages_count); 00083 ros::serialization::deserialize(stream, voltages); 00084 return stream.getData(); 00085 } 00086 00087 ROS_DEPRECATED virtual uint32_t serializationLength() const 00088 { 00089 uint32_t size = 0; 00090 size += ros::serialization::serializationLength(voltages_count); 00091 size += ros::serialization::serializationLength(voltages); 00092 return size; 00093 } 00094 00095 typedef boost::shared_ptr< ::p2os_driver::AIO_<ContainerAllocator> > Ptr; 00096 typedef boost::shared_ptr< ::p2os_driver::AIO_<ContainerAllocator> const> ConstPtr; 00097 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00098 }; // struct AIO 00099 typedef ::p2os_driver::AIO_<std::allocator<void> > AIO; 00100 00101 typedef boost::shared_ptr< ::p2os_driver::AIO> AIOPtr; 00102 typedef boost::shared_ptr< ::p2os_driver::AIO const> AIOConstPtr; 00103 00104 00105 template<typename ContainerAllocator> 00106 std::ostream& operator<<(std::ostream& s, const ::p2os_driver::AIO_<ContainerAllocator> & v) 00107 { 00108 ros::message_operations::Printer< ::p2os_driver::AIO_<ContainerAllocator> >::stream(s, "", v); 00109 return s;} 00110 00111 } // namespace p2os_driver 00112 00113 namespace ros 00114 { 00115 namespace message_traits 00116 { 00117 template<class ContainerAllocator> struct IsMessage< ::p2os_driver::AIO_<ContainerAllocator> > : public TrueType {}; 00118 template<class ContainerAllocator> struct IsMessage< ::p2os_driver::AIO_<ContainerAllocator> const> : public TrueType {}; 00119 template<class ContainerAllocator> 00120 struct MD5Sum< ::p2os_driver::AIO_<ContainerAllocator> > { 00121 static const char* value() 00122 { 00123 return "80e4ca5770a3db29064af246946ff4fe"; 00124 } 00125 00126 static const char* value(const ::p2os_driver::AIO_<ContainerAllocator> &) { return value(); } 00127 static const uint64_t static_value1 = 0x80e4ca5770a3db29ULL; 00128 static const uint64_t static_value2 = 0x064af246946ff4feULL; 00129 }; 00130 00131 template<class ContainerAllocator> 00132 struct DataType< ::p2os_driver::AIO_<ContainerAllocator> > { 00133 static const char* value() 00134 { 00135 return "p2os_driver/AIO"; 00136 } 00137 00138 static const char* value(const ::p2os_driver::AIO_<ContainerAllocator> &) { return value(); } 00139 }; 00140 00141 template<class ContainerAllocator> 00142 struct Definition< ::p2os_driver::AIO_<ContainerAllocator> > { 00143 static const char* value() 00144 { 00145 return "uint8 voltages_count\n\ 00146 float32[] voltages\n\ 00147 \n\ 00148 "; 00149 } 00150 00151 static const char* value(const ::p2os_driver::AIO_<ContainerAllocator> &) { return value(); } 00152 }; 00153 00154 } // namespace message_traits 00155 } // namespace ros 00156 00157 namespace ros 00158 { 00159 namespace serialization 00160 { 00161 00162 template<class ContainerAllocator> struct Serializer< ::p2os_driver::AIO_<ContainerAllocator> > 00163 { 00164 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00165 { 00166 stream.next(m.voltages_count); 00167 stream.next(m.voltages); 00168 } 00169 00170 ROS_DECLARE_ALLINONE_SERIALIZER; 00171 }; // struct AIO_ 00172 } // namespace serialization 00173 } // namespace ros 00174 00175 namespace ros 00176 { 00177 namespace message_operations 00178 { 00179 00180 template<class ContainerAllocator> 00181 struct Printer< ::p2os_driver::AIO_<ContainerAllocator> > 00182 { 00183 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::p2os_driver::AIO_<ContainerAllocator> & v) 00184 { 00185 s << indent << "voltages_count: "; 00186 Printer<uint8_t>::stream(s, indent + " ", v.voltages_count); 00187 s << indent << "voltages[]" << std::endl; 00188 for (size_t i = 0; i < v.voltages.size(); ++i) 00189 { 00190 s << indent << " voltages[" << i << "]: "; 00191 Printer<float>::stream(s, indent + " ", v.voltages[i]); 00192 } 00193 } 00194 }; 00195 00196 00197 } // namespace message_operations 00198 } // namespace ros 00199 00200 #endif // P2OS_DRIVER_MESSAGE_AIO_H 00201