00001
00002 #ifndef ROSSERIAL_ARDUINO_DEMOS_MESSAGE_ADC_H
00003 #define ROSSERIAL_ARDUINO_DEMOS_MESSAGE_ADC_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013
00014 namespace rosserial_arduino_demos
00015 {
00016 template <class ContainerAllocator>
00017 struct Adc_ : public ros::Message
00018 {
00019 typedef Adc_<ContainerAllocator> Type;
00020
00021 Adc_()
00022 : adc0(0)
00023 , adc1(0)
00024 , adc2(0)
00025 , adc3(0)
00026 , adc4(0)
00027 , adc5(0)
00028 {
00029 }
00030
00031 Adc_(const ContainerAllocator& _alloc)
00032 : adc0(0)
00033 , adc1(0)
00034 , adc2(0)
00035 , adc3(0)
00036 , adc4(0)
00037 , adc5(0)
00038 {
00039 }
00040
00041 typedef uint16_t _adc0_type;
00042 uint16_t adc0;
00043
00044 typedef uint16_t _adc1_type;
00045 uint16_t adc1;
00046
00047 typedef uint16_t _adc2_type;
00048 uint16_t adc2;
00049
00050 typedef uint16_t _adc3_type;
00051 uint16_t adc3;
00052
00053 typedef uint16_t _adc4_type;
00054 uint16_t adc4;
00055
00056 typedef uint16_t _adc5_type;
00057 uint16_t adc5;
00058
00059
00060 private:
00061 static const char* __s_getDataType_() { return "rosserial_arduino_demos/Adc"; }
00062 public:
00063 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00064
00065 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00066
00067 private:
00068 static const char* __s_getMD5Sum_() { return "6d7853a614e2e821319068311f2af25b"; }
00069 public:
00070 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00071
00072 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00073
00074 private:
00075 static const char* __s_getMessageDefinition_() { return "uint16 adc0\n\
00076 uint16 adc1\n\
00077 uint16 adc2\n\
00078 uint16 adc3\n\
00079 uint16 adc4\n\
00080 uint16 adc5\n\
00081 \n\
00082 "; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00085
00086 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00087
00088 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00089 {
00090 ros::serialization::OStream stream(write_ptr, 1000000000);
00091 ros::serialization::serialize(stream, adc0);
00092 ros::serialization::serialize(stream, adc1);
00093 ros::serialization::serialize(stream, adc2);
00094 ros::serialization::serialize(stream, adc3);
00095 ros::serialization::serialize(stream, adc4);
00096 ros::serialization::serialize(stream, adc5);
00097 return stream.getData();
00098 }
00099
00100 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00101 {
00102 ros::serialization::IStream stream(read_ptr, 1000000000);
00103 ros::serialization::deserialize(stream, adc0);
00104 ros::serialization::deserialize(stream, adc1);
00105 ros::serialization::deserialize(stream, adc2);
00106 ros::serialization::deserialize(stream, adc3);
00107 ros::serialization::deserialize(stream, adc4);
00108 ros::serialization::deserialize(stream, adc5);
00109 return stream.getData();
00110 }
00111
00112 ROS_DEPRECATED virtual uint32_t serializationLength() const
00113 {
00114 uint32_t size = 0;
00115 size += ros::serialization::serializationLength(adc0);
00116 size += ros::serialization::serializationLength(adc1);
00117 size += ros::serialization::serializationLength(adc2);
00118 size += ros::serialization::serializationLength(adc3);
00119 size += ros::serialization::serializationLength(adc4);
00120 size += ros::serialization::serializationLength(adc5);
00121 return size;
00122 }
00123
00124 typedef boost::shared_ptr< ::rosserial_arduino_demos::Adc_<ContainerAllocator> > Ptr;
00125 typedef boost::shared_ptr< ::rosserial_arduino_demos::Adc_<ContainerAllocator> const> ConstPtr;
00126 };
00127 typedef ::rosserial_arduino_demos::Adc_<std::allocator<void> > Adc;
00128
00129 typedef boost::shared_ptr< ::rosserial_arduino_demos::Adc> AdcPtr;
00130 typedef boost::shared_ptr< ::rosserial_arduino_demos::Adc const> AdcConstPtr;
00131
00132
00133 template<typename ContainerAllocator>
00134 std::ostream& operator<<(std::ostream& s, const ::rosserial_arduino_demos::Adc_<ContainerAllocator> & v)
00135 {
00136 ros::message_operations::Printer< ::rosserial_arduino_demos::Adc_<ContainerAllocator> >::stream(s, "", v);
00137 return s;}
00138
00139 }
00140
00141 namespace ros
00142 {
00143 namespace message_traits
00144 {
00145 template<class ContainerAllocator>
00146 struct MD5Sum< ::rosserial_arduino_demos::Adc_<ContainerAllocator> > {
00147 static const char* value()
00148 {
00149 return "6d7853a614e2e821319068311f2af25b";
00150 }
00151
00152 static const char* value(const ::rosserial_arduino_demos::Adc_<ContainerAllocator> &) { return value(); }
00153 static const uint64_t static_value1 = 0x6d7853a614e2e821ULL;
00154 static const uint64_t static_value2 = 0x319068311f2af25bULL;
00155 };
00156
00157 template<class ContainerAllocator>
00158 struct DataType< ::rosserial_arduino_demos::Adc_<ContainerAllocator> > {
00159 static const char* value()
00160 {
00161 return "rosserial_arduino_demos/Adc";
00162 }
00163
00164 static const char* value(const ::rosserial_arduino_demos::Adc_<ContainerAllocator> &) { return value(); }
00165 };
00166
00167 template<class ContainerAllocator>
00168 struct Definition< ::rosserial_arduino_demos::Adc_<ContainerAllocator> > {
00169 static const char* value()
00170 {
00171 return "uint16 adc0\n\
00172 uint16 adc1\n\
00173 uint16 adc2\n\
00174 uint16 adc3\n\
00175 uint16 adc4\n\
00176 uint16 adc5\n\
00177 \n\
00178 ";
00179 }
00180
00181 static const char* value(const ::rosserial_arduino_demos::Adc_<ContainerAllocator> &) { return value(); }
00182 };
00183
00184 template<class ContainerAllocator> struct IsFixedSize< ::rosserial_arduino_demos::Adc_<ContainerAllocator> > : public TrueType {};
00185 }
00186 }
00187
00188 namespace ros
00189 {
00190 namespace serialization
00191 {
00192
00193 template<class ContainerAllocator> struct Serializer< ::rosserial_arduino_demos::Adc_<ContainerAllocator> >
00194 {
00195 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00196 {
00197 stream.next(m.adc0);
00198 stream.next(m.adc1);
00199 stream.next(m.adc2);
00200 stream.next(m.adc3);
00201 stream.next(m.adc4);
00202 stream.next(m.adc5);
00203 }
00204
00205 ROS_DECLARE_ALLINONE_SERIALIZER;
00206 };
00207 }
00208 }
00209
00210 namespace ros
00211 {
00212 namespace message_operations
00213 {
00214
00215 template<class ContainerAllocator>
00216 struct Printer< ::rosserial_arduino_demos::Adc_<ContainerAllocator> >
00217 {
00218 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::rosserial_arduino_demos::Adc_<ContainerAllocator> & v)
00219 {
00220 s << indent << "adc0: ";
00221 Printer<uint16_t>::stream(s, indent + " ", v.adc0);
00222 s << indent << "adc1: ";
00223 Printer<uint16_t>::stream(s, indent + " ", v.adc1);
00224 s << indent << "adc2: ";
00225 Printer<uint16_t>::stream(s, indent + " ", v.adc2);
00226 s << indent << "adc3: ";
00227 Printer<uint16_t>::stream(s, indent + " ", v.adc3);
00228 s << indent << "adc4: ";
00229 Printer<uint16_t>::stream(s, indent + " ", v.adc4);
00230 s << indent << "adc5: ";
00231 Printer<uint16_t>::stream(s, indent + " ", v.adc5);
00232 }
00233 };
00234
00235
00236 }
00237 }
00238
00239 #endif // ROSSERIAL_ARDUINO_DEMOS_MESSAGE_ADC_H
00240