00001
00002 #ifndef ART_MSGS_MESSAGE_IOADRSTATE_H
00003 #define ART_MSGS_MESSAGE_IOADRSTATE_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 art_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct IOadrState_ : public ros::Message
00019 {
00020 typedef IOadrState_<ContainerAllocator> Type;
00021
00022 IOadrState_()
00023 : header()
00024 , relays(0)
00025 , digitalB(0)
00026 , voltages()
00027 {
00028 voltages.assign(0.0);
00029 }
00030
00031 IOadrState_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , relays(0)
00034 , digitalB(0)
00035 , voltages()
00036 {
00037 voltages.assign(0.0);
00038 }
00039
00040 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00041 ::std_msgs::Header_<ContainerAllocator> header;
00042
00043 typedef uint8_t _relays_type;
00044 uint8_t relays;
00045
00046 typedef uint8_t _digitalB_type;
00047 uint8_t digitalB;
00048
00049 typedef boost::array<float, 3> _voltages_type;
00050 boost::array<float, 3> voltages;
00051
00052 enum { ENABLED = 1 };
00053 enum { RUN = 2 };
00054 enum { FLASHER = 4 };
00055 enum { ALARM = 8 };
00056 enum { LASER_FRONT = 16 };
00057 enum { LASER_TOP = 32 };
00058 enum { TURN_LEFT = 64 };
00059 enum { TURN_RIGHT = 128 };
00060 enum { N_VOLTAGES = 3 };
00061
00062 ROS_DEPRECATED uint32_t get_voltages_size() const { return (uint32_t)voltages.size(); }
00063 private:
00064 static const char* __s_getDataType_() { return "art_msgs/IOadrState"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00067
00068 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00069
00070 private:
00071 static const char* __s_getMD5Sum_() { return "990cf1675736cc78e57b4a0463dd540e"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00074
00075 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00076
00077 private:
00078 static const char* __s_getMessageDefinition_() { return "# NCD IOADR8x controller state message for ART vehicle\n\
00079 \n\
00080 # $Id: IOadrState.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00081 \n\
00082 Header header\n\
00083 \n\
00084 # constant bit values for relays and digitalB inputs\n\
00085 uint8 ENABLED = 1\n\
00086 uint8 RUN = 2\n\
00087 uint8 FLASHER = 4\n\
00088 uint8 ALARM = 8\n\
00089 uint8 LASER_FRONT = 16\n\
00090 uint8 LASER_TOP = 32\n\
00091 uint8 TURN_LEFT = 64\n\
00092 uint8 TURN_RIGHT = 128\n\
00093 \n\
00094 uint8 relays # current relays settings\n\
00095 \n\
00096 uint8 digitalB # digital input B\n\
00097 \n\
00098 # generally, voltages[0] is the steering position sensor\n\
00099 int32 N_VOLTAGES = 3 # number of analog voltages\n\
00100 float32[3] voltages # analog voltages [A, B, C]\n\
00101 \n\
00102 ================================================================================\n\
00103 MSG: std_msgs/Header\n\
00104 # Standard metadata for higher-level stamped data types.\n\
00105 # This is generally used to communicate timestamped data \n\
00106 # in a particular coordinate frame.\n\
00107 # \n\
00108 # sequence ID: consecutively increasing ID \n\
00109 uint32 seq\n\
00110 #Two-integer timestamp that is expressed as:\n\
00111 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00112 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00113 # time-handling sugar is provided by the client library\n\
00114 time stamp\n\
00115 #Frame this data is associated with\n\
00116 # 0: no frame\n\
00117 # 1: global frame\n\
00118 string frame_id\n\
00119 \n\
00120 "; }
00121 public:
00122 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00123
00124 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00125
00126 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00127 {
00128 ros::serialization::OStream stream(write_ptr, 1000000000);
00129 ros::serialization::serialize(stream, header);
00130 ros::serialization::serialize(stream, relays);
00131 ros::serialization::serialize(stream, digitalB);
00132 ros::serialization::serialize(stream, voltages);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00137 {
00138 ros::serialization::IStream stream(read_ptr, 1000000000);
00139 ros::serialization::deserialize(stream, header);
00140 ros::serialization::deserialize(stream, relays);
00141 ros::serialization::deserialize(stream, digitalB);
00142 ros::serialization::deserialize(stream, voltages);
00143 return stream.getData();
00144 }
00145
00146 ROS_DEPRECATED virtual uint32_t serializationLength() const
00147 {
00148 uint32_t size = 0;
00149 size += ros::serialization::serializationLength(header);
00150 size += ros::serialization::serializationLength(relays);
00151 size += ros::serialization::serializationLength(digitalB);
00152 size += ros::serialization::serializationLength(voltages);
00153 return size;
00154 }
00155
00156 typedef boost::shared_ptr< ::art_msgs::IOadrState_<ContainerAllocator> > Ptr;
00157 typedef boost::shared_ptr< ::art_msgs::IOadrState_<ContainerAllocator> const> ConstPtr;
00158 };
00159 typedef ::art_msgs::IOadrState_<std::allocator<void> > IOadrState;
00160
00161 typedef boost::shared_ptr< ::art_msgs::IOadrState> IOadrStatePtr;
00162 typedef boost::shared_ptr< ::art_msgs::IOadrState const> IOadrStateConstPtr;
00163
00164
00165 template<typename ContainerAllocator>
00166 std::ostream& operator<<(std::ostream& s, const ::art_msgs::IOadrState_<ContainerAllocator> & v)
00167 {
00168 ros::message_operations::Printer< ::art_msgs::IOadrState_<ContainerAllocator> >::stream(s, "", v);
00169 return s;}
00170
00171 }
00172
00173 namespace ros
00174 {
00175 namespace message_traits
00176 {
00177 template<class ContainerAllocator>
00178 struct MD5Sum< ::art_msgs::IOadrState_<ContainerAllocator> > {
00179 static const char* value()
00180 {
00181 return "990cf1675736cc78e57b4a0463dd540e";
00182 }
00183
00184 static const char* value(const ::art_msgs::IOadrState_<ContainerAllocator> &) { return value(); }
00185 static const uint64_t static_value1 = 0x990cf1675736cc78ULL;
00186 static const uint64_t static_value2 = 0xe57b4a0463dd540eULL;
00187 };
00188
00189 template<class ContainerAllocator>
00190 struct DataType< ::art_msgs::IOadrState_<ContainerAllocator> > {
00191 static const char* value()
00192 {
00193 return "art_msgs/IOadrState";
00194 }
00195
00196 static const char* value(const ::art_msgs::IOadrState_<ContainerAllocator> &) { return value(); }
00197 };
00198
00199 template<class ContainerAllocator>
00200 struct Definition< ::art_msgs::IOadrState_<ContainerAllocator> > {
00201 static const char* value()
00202 {
00203 return "# NCD IOADR8x controller state message for ART vehicle\n\
00204 \n\
00205 # $Id: IOadrState.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00206 \n\
00207 Header header\n\
00208 \n\
00209 # constant bit values for relays and digitalB inputs\n\
00210 uint8 ENABLED = 1\n\
00211 uint8 RUN = 2\n\
00212 uint8 FLASHER = 4\n\
00213 uint8 ALARM = 8\n\
00214 uint8 LASER_FRONT = 16\n\
00215 uint8 LASER_TOP = 32\n\
00216 uint8 TURN_LEFT = 64\n\
00217 uint8 TURN_RIGHT = 128\n\
00218 \n\
00219 uint8 relays # current relays settings\n\
00220 \n\
00221 uint8 digitalB # digital input B\n\
00222 \n\
00223 # generally, voltages[0] is the steering position sensor\n\
00224 int32 N_VOLTAGES = 3 # number of analog voltages\n\
00225 float32[3] voltages # analog voltages [A, B, C]\n\
00226 \n\
00227 ================================================================================\n\
00228 MSG: std_msgs/Header\n\
00229 # Standard metadata for higher-level stamped data types.\n\
00230 # This is generally used to communicate timestamped data \n\
00231 # in a particular coordinate frame.\n\
00232 # \n\
00233 # sequence ID: consecutively increasing ID \n\
00234 uint32 seq\n\
00235 #Two-integer timestamp that is expressed as:\n\
00236 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00237 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00238 # time-handling sugar is provided by the client library\n\
00239 time stamp\n\
00240 #Frame this data is associated with\n\
00241 # 0: no frame\n\
00242 # 1: global frame\n\
00243 string frame_id\n\
00244 \n\
00245 ";
00246 }
00247
00248 static const char* value(const ::art_msgs::IOadrState_<ContainerAllocator> &) { return value(); }
00249 };
00250
00251 template<class ContainerAllocator> struct HasHeader< ::art_msgs::IOadrState_<ContainerAllocator> > : public TrueType {};
00252 template<class ContainerAllocator> struct HasHeader< const ::art_msgs::IOadrState_<ContainerAllocator> > : public TrueType {};
00253 }
00254 }
00255
00256 namespace ros
00257 {
00258 namespace serialization
00259 {
00260
00261 template<class ContainerAllocator> struct Serializer< ::art_msgs::IOadrState_<ContainerAllocator> >
00262 {
00263 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00264 {
00265 stream.next(m.header);
00266 stream.next(m.relays);
00267 stream.next(m.digitalB);
00268 stream.next(m.voltages);
00269 }
00270
00271 ROS_DECLARE_ALLINONE_SERIALIZER;
00272 };
00273 }
00274 }
00275
00276 namespace ros
00277 {
00278 namespace message_operations
00279 {
00280
00281 template<class ContainerAllocator>
00282 struct Printer< ::art_msgs::IOadrState_<ContainerAllocator> >
00283 {
00284 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::IOadrState_<ContainerAllocator> & v)
00285 {
00286 s << indent << "header: ";
00287 s << std::endl;
00288 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00289 s << indent << "relays: ";
00290 Printer<uint8_t>::stream(s, indent + " ", v.relays);
00291 s << indent << "digitalB: ";
00292 Printer<uint8_t>::stream(s, indent + " ", v.digitalB);
00293 s << indent << "voltages[]" << std::endl;
00294 for (size_t i = 0; i < v.voltages.size(); ++i)
00295 {
00296 s << indent << " voltages[" << i << "]: ";
00297 Printer<float>::stream(s, indent + " ", v.voltages[i]);
00298 }
00299 }
00300 };
00301
00302
00303 }
00304 }
00305
00306 #endif // ART_MSGS_MESSAGE_IOADRSTATE_H
00307