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