00001
00002 #ifndef ROS_ARDUINO_MSGS_MESSAGE_DIGITAL_H
00003 #define ROS_ARDUINO_MSGS_MESSAGE_DIGITAL_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 #include "std_msgs/Header.h"
00018
00019 namespace ros_arduino_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct Digital_ {
00023 typedef Digital_<ContainerAllocator> Type;
00024
00025 Digital_()
00026 : header()
00027 , value(0)
00028 {
00029 }
00030
00031 Digital_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , value(0)
00034 {
00035 }
00036
00037 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00038 ::std_msgs::Header_<ContainerAllocator> header;
00039
00040 typedef uint8_t _value_type;
00041 uint8_t value;
00042
00043
00044 private:
00045 static const char* __s_getDataType_() { return "ros_arduino_msgs/Digital"; }
00046 public:
00047 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00048
00049 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00050
00051 private:
00052 static const char* __s_getMD5Sum_() { return "90539346f3c3c8fc47f159ab9a6ff208"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00055
00056 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00057
00058 private:
00059 static const char* __s_getMessageDefinition_() { return "# Reading on a digital pin\n\
00060 Header header\n\
00061 uint8 value\n\
00062 \n\
00063 \n\
00064 ================================================================================\n\
00065 MSG: std_msgs/Header\n\
00066 # Standard metadata for higher-level stamped data types.\n\
00067 # This is generally used to communicate timestamped data \n\
00068 # in a particular coordinate frame.\n\
00069 # \n\
00070 # sequence ID: consecutively increasing ID \n\
00071 uint32 seq\n\
00072 #Two-integer timestamp that is expressed as:\n\
00073 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00074 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00075 # time-handling sugar is provided by the client library\n\
00076 time stamp\n\
00077 #Frame this data is associated with\n\
00078 # 0: no frame\n\
00079 # 1: global frame\n\
00080 string frame_id\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, header);
00092 ros::serialization::serialize(stream, value);
00093 return stream.getData();
00094 }
00095
00096 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00097 {
00098 ros::serialization::IStream stream(read_ptr, 1000000000);
00099 ros::serialization::deserialize(stream, header);
00100 ros::serialization::deserialize(stream, value);
00101 return stream.getData();
00102 }
00103
00104 ROS_DEPRECATED virtual uint32_t serializationLength() const
00105 {
00106 uint32_t size = 0;
00107 size += ros::serialization::serializationLength(header);
00108 size += ros::serialization::serializationLength(value);
00109 return size;
00110 }
00111
00112 typedef boost::shared_ptr< ::ros_arduino_msgs::Digital_<ContainerAllocator> > Ptr;
00113 typedef boost::shared_ptr< ::ros_arduino_msgs::Digital_<ContainerAllocator> const> ConstPtr;
00114 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00115 };
00116 typedef ::ros_arduino_msgs::Digital_<std::allocator<void> > Digital;
00117
00118 typedef boost::shared_ptr< ::ros_arduino_msgs::Digital> DigitalPtr;
00119 typedef boost::shared_ptr< ::ros_arduino_msgs::Digital const> DigitalConstPtr;
00120
00121
00122 template<typename ContainerAllocator>
00123 std::ostream& operator<<(std::ostream& s, const ::ros_arduino_msgs::Digital_<ContainerAllocator> & v)
00124 {
00125 ros::message_operations::Printer< ::ros_arduino_msgs::Digital_<ContainerAllocator> >::stream(s, "", v);
00126 return s;}
00127
00128 }
00129
00130 namespace ros
00131 {
00132 namespace message_traits
00133 {
00134 template<class ContainerAllocator> struct IsMessage< ::ros_arduino_msgs::Digital_<ContainerAllocator> > : public TrueType {};
00135 template<class ContainerAllocator> struct IsMessage< ::ros_arduino_msgs::Digital_<ContainerAllocator> const> : public TrueType {};
00136 template<class ContainerAllocator>
00137 struct MD5Sum< ::ros_arduino_msgs::Digital_<ContainerAllocator> > {
00138 static const char* value()
00139 {
00140 return "90539346f3c3c8fc47f159ab9a6ff208";
00141 }
00142
00143 static const char* value(const ::ros_arduino_msgs::Digital_<ContainerAllocator> &) { return value(); }
00144 static const uint64_t static_value1 = 0x90539346f3c3c8fcULL;
00145 static const uint64_t static_value2 = 0x47f159ab9a6ff208ULL;
00146 };
00147
00148 template<class ContainerAllocator>
00149 struct DataType< ::ros_arduino_msgs::Digital_<ContainerAllocator> > {
00150 static const char* value()
00151 {
00152 return "ros_arduino_msgs/Digital";
00153 }
00154
00155 static const char* value(const ::ros_arduino_msgs::Digital_<ContainerAllocator> &) { return value(); }
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct Definition< ::ros_arduino_msgs::Digital_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "# Reading on a digital pin\n\
00163 Header header\n\
00164 uint8 value\n\
00165 \n\
00166 \n\
00167 ================================================================================\n\
00168 MSG: std_msgs/Header\n\
00169 # Standard metadata for higher-level stamped data types.\n\
00170 # This is generally used to communicate timestamped data \n\
00171 # in a particular coordinate frame.\n\
00172 # \n\
00173 # sequence ID: consecutively increasing ID \n\
00174 uint32 seq\n\
00175 #Two-integer timestamp that is expressed as:\n\
00176 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00177 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00178 # time-handling sugar is provided by the client library\n\
00179 time stamp\n\
00180 #Frame this data is associated with\n\
00181 # 0: no frame\n\
00182 # 1: global frame\n\
00183 string frame_id\n\
00184 \n\
00185 ";
00186 }
00187
00188 static const char* value(const ::ros_arduino_msgs::Digital_<ContainerAllocator> &) { return value(); }
00189 };
00190
00191 template<class ContainerAllocator> struct HasHeader< ::ros_arduino_msgs::Digital_<ContainerAllocator> > : public TrueType {};
00192 template<class ContainerAllocator> struct HasHeader< const ::ros_arduino_msgs::Digital_<ContainerAllocator> > : public TrueType {};
00193 }
00194 }
00195
00196 namespace ros
00197 {
00198 namespace serialization
00199 {
00200
00201 template<class ContainerAllocator> struct Serializer< ::ros_arduino_msgs::Digital_<ContainerAllocator> >
00202 {
00203 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00204 {
00205 stream.next(m.header);
00206 stream.next(m.value);
00207 }
00208
00209 ROS_DECLARE_ALLINONE_SERIALIZER;
00210 };
00211 }
00212 }
00213
00214 namespace ros
00215 {
00216 namespace message_operations
00217 {
00218
00219 template<class ContainerAllocator>
00220 struct Printer< ::ros_arduino_msgs::Digital_<ContainerAllocator> >
00221 {
00222 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ros_arduino_msgs::Digital_<ContainerAllocator> & v)
00223 {
00224 s << indent << "header: ";
00225 s << std::endl;
00226 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00227 s << indent << "value: ";
00228 Printer<uint8_t>::stream(s, indent + " ", v.value);
00229 }
00230 };
00231
00232
00233 }
00234 }
00235
00236 #endif // ROS_ARDUINO_MSGS_MESSAGE_DIGITAL_H
00237