00001
00002 #ifndef ART_MSGS_MESSAGE_SHIFTER_H
00003 #define ART_MSGS_MESSAGE_SHIFTER_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 Shifter_ : public ros::Message
00019 {
00020 typedef Shifter_<ContainerAllocator> Type;
00021
00022 Shifter_()
00023 : header()
00024 , gear(0)
00025 , relays(0)
00026 {
00027 }
00028
00029 Shifter_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , gear(0)
00032 , relays(0)
00033 {
00034 }
00035
00036 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00037 ::std_msgs::Header_<ContainerAllocator> header;
00038
00039 typedef uint8_t _gear_type;
00040 uint8_t gear;
00041
00042 typedef uint8_t _relays_type;
00043 uint8_t relays;
00044
00045 enum { Reset = 0 };
00046 enum { Park = 1 };
00047 enum { Reverse = 2 };
00048 enum { Neutral = 3 };
00049 enum { Drive = 4 };
00050
00051 private:
00052 static const char* __s_getDataType_() { return "art_msgs/Shifter"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00055
00056 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00057
00058 private:
00059 static const char* __s_getMD5Sum_() { return "dddb61d8575e01ea7857ef1b3a7b941c"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00062
00063 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00064
00065 private:
00066 static const char* __s_getMessageDefinition_() { return "# ART shifter message\n\
00067 #\n\
00068 # Used to both request and report gear shifts.\n\
00069 \n\
00070 # $Id: Shifter.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00071 \n\
00072 # Our Arens Controls hardware mechanism requires holding the shift\n\
00073 # relay on for one second before resetting it. A command node must\n\
00074 # request the desired gear, then wait a second before sending the\n\
00075 # Reset command. To be safe, it should check that the shift actually\n\
00076 # occurred before continuing.\n\
00077 \n\
00078 Header header # standard ROS message header\n\
00079 \n\
00080 # gear numbers\n\
00081 uint8 Reset = 0 # request reset of shifter relays\n\
00082 uint8 Park = 1\n\
00083 uint8 Reverse = 2\n\
00084 uint8 Neutral = 3\n\
00085 uint8 Drive = 4\n\
00086 \n\
00087 uint8 gear # requested or reported gear number\n\
00088 uint8 relays # current relay values\n\
00089 \n\
00090 ================================================================================\n\
00091 MSG: std_msgs/Header\n\
00092 # Standard metadata for higher-level stamped data types.\n\
00093 # This is generally used to communicate timestamped data \n\
00094 # in a particular coordinate frame.\n\
00095 # \n\
00096 # sequence ID: consecutively increasing ID \n\
00097 uint32 seq\n\
00098 #Two-integer timestamp that is expressed as:\n\
00099 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00100 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00101 # time-handling sugar is provided by the client library\n\
00102 time stamp\n\
00103 #Frame this data is associated with\n\
00104 # 0: no frame\n\
00105 # 1: global frame\n\
00106 string frame_id\n\
00107 \n\
00108 "; }
00109 public:
00110 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00111
00112 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00113
00114 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00115 {
00116 ros::serialization::OStream stream(write_ptr, 1000000000);
00117 ros::serialization::serialize(stream, header);
00118 ros::serialization::serialize(stream, gear);
00119 ros::serialization::serialize(stream, relays);
00120 return stream.getData();
00121 }
00122
00123 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00124 {
00125 ros::serialization::IStream stream(read_ptr, 1000000000);
00126 ros::serialization::deserialize(stream, header);
00127 ros::serialization::deserialize(stream, gear);
00128 ros::serialization::deserialize(stream, relays);
00129 return stream.getData();
00130 }
00131
00132 ROS_DEPRECATED virtual uint32_t serializationLength() const
00133 {
00134 uint32_t size = 0;
00135 size += ros::serialization::serializationLength(header);
00136 size += ros::serialization::serializationLength(gear);
00137 size += ros::serialization::serializationLength(relays);
00138 return size;
00139 }
00140
00141 typedef boost::shared_ptr< ::art_msgs::Shifter_<ContainerAllocator> > Ptr;
00142 typedef boost::shared_ptr< ::art_msgs::Shifter_<ContainerAllocator> const> ConstPtr;
00143 };
00144 typedef ::art_msgs::Shifter_<std::allocator<void> > Shifter;
00145
00146 typedef boost::shared_ptr< ::art_msgs::Shifter> ShifterPtr;
00147 typedef boost::shared_ptr< ::art_msgs::Shifter const> ShifterConstPtr;
00148
00149
00150 template<typename ContainerAllocator>
00151 std::ostream& operator<<(std::ostream& s, const ::art_msgs::Shifter_<ContainerAllocator> & v)
00152 {
00153 ros::message_operations::Printer< ::art_msgs::Shifter_<ContainerAllocator> >::stream(s, "", v);
00154 return s;}
00155
00156 }
00157
00158 namespace ros
00159 {
00160 namespace message_traits
00161 {
00162 template<class ContainerAllocator>
00163 struct MD5Sum< ::art_msgs::Shifter_<ContainerAllocator> > {
00164 static const char* value()
00165 {
00166 return "dddb61d8575e01ea7857ef1b3a7b941c";
00167 }
00168
00169 static const char* value(const ::art_msgs::Shifter_<ContainerAllocator> &) { return value(); }
00170 static const uint64_t static_value1 = 0xdddb61d8575e01eaULL;
00171 static const uint64_t static_value2 = 0x7857ef1b3a7b941cULL;
00172 };
00173
00174 template<class ContainerAllocator>
00175 struct DataType< ::art_msgs::Shifter_<ContainerAllocator> > {
00176 static const char* value()
00177 {
00178 return "art_msgs/Shifter";
00179 }
00180
00181 static const char* value(const ::art_msgs::Shifter_<ContainerAllocator> &) { return value(); }
00182 };
00183
00184 template<class ContainerAllocator>
00185 struct Definition< ::art_msgs::Shifter_<ContainerAllocator> > {
00186 static const char* value()
00187 {
00188 return "# ART shifter message\n\
00189 #\n\
00190 # Used to both request and report gear shifts.\n\
00191 \n\
00192 # $Id: Shifter.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00193 \n\
00194 # Our Arens Controls hardware mechanism requires holding the shift\n\
00195 # relay on for one second before resetting it. A command node must\n\
00196 # request the desired gear, then wait a second before sending the\n\
00197 # Reset command. To be safe, it should check that the shift actually\n\
00198 # occurred before continuing.\n\
00199 \n\
00200 Header header # standard ROS message header\n\
00201 \n\
00202 # gear numbers\n\
00203 uint8 Reset = 0 # request reset of shifter relays\n\
00204 uint8 Park = 1\n\
00205 uint8 Reverse = 2\n\
00206 uint8 Neutral = 3\n\
00207 uint8 Drive = 4\n\
00208 \n\
00209 uint8 gear # requested or reported gear number\n\
00210 uint8 relays # current relay values\n\
00211 \n\
00212 ================================================================================\n\
00213 MSG: std_msgs/Header\n\
00214 # Standard metadata for higher-level stamped data types.\n\
00215 # This is generally used to communicate timestamped data \n\
00216 # in a particular coordinate frame.\n\
00217 # \n\
00218 # sequence ID: consecutively increasing ID \n\
00219 uint32 seq\n\
00220 #Two-integer timestamp that is expressed as:\n\
00221 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00222 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00223 # time-handling sugar is provided by the client library\n\
00224 time stamp\n\
00225 #Frame this data is associated with\n\
00226 # 0: no frame\n\
00227 # 1: global frame\n\
00228 string frame_id\n\
00229 \n\
00230 ";
00231 }
00232
00233 static const char* value(const ::art_msgs::Shifter_<ContainerAllocator> &) { return value(); }
00234 };
00235
00236 template<class ContainerAllocator> struct HasHeader< ::art_msgs::Shifter_<ContainerAllocator> > : public TrueType {};
00237 template<class ContainerAllocator> struct HasHeader< const ::art_msgs::Shifter_<ContainerAllocator> > : public TrueType {};
00238 }
00239 }
00240
00241 namespace ros
00242 {
00243 namespace serialization
00244 {
00245
00246 template<class ContainerAllocator> struct Serializer< ::art_msgs::Shifter_<ContainerAllocator> >
00247 {
00248 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00249 {
00250 stream.next(m.header);
00251 stream.next(m.gear);
00252 stream.next(m.relays);
00253 }
00254
00255 ROS_DECLARE_ALLINONE_SERIALIZER;
00256 };
00257 }
00258 }
00259
00260 namespace ros
00261 {
00262 namespace message_operations
00263 {
00264
00265 template<class ContainerAllocator>
00266 struct Printer< ::art_msgs::Shifter_<ContainerAllocator> >
00267 {
00268 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::Shifter_<ContainerAllocator> & v)
00269 {
00270 s << indent << "header: ";
00271 s << std::endl;
00272 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00273 s << indent << "gear: ";
00274 Printer<uint8_t>::stream(s, indent + " ", v.gear);
00275 s << indent << "relays: ";
00276 Printer<uint8_t>::stream(s, indent + " ", v.relays);
00277 }
00278 };
00279
00280
00281 }
00282 }
00283
00284 #endif // ART_MSGS_MESSAGE_SHIFTER_H
00285