00001
00002 #ifndef ASCTEC_MSGS_MESSAGE_RCDATA_H
00003 #define ASCTEC_MSGS_MESSAGE_RCDATA_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 asctec_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct RCData_ : public ros::Message
00019 {
00020 typedef RCData_<ContainerAllocator> Type;
00021
00022 RCData_()
00023 : header()
00024 , channels_in()
00025 , channels_out()
00026 , lock(0)
00027 {
00028 channels_in.assign(0);
00029 channels_out.assign(0);
00030 }
00031
00032 RCData_(const ContainerAllocator& _alloc)
00033 : header(_alloc)
00034 , channels_in()
00035 , channels_out()
00036 , lock(0)
00037 {
00038 channels_in.assign(0);
00039 channels_out.assign(0);
00040 }
00041
00042 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00043 ::std_msgs::Header_<ContainerAllocator> header;
00044
00045 typedef boost::array<int16_t, 8> _channels_in_type;
00046 boost::array<int16_t, 8> channels_in;
00047
00048 typedef boost::array<int16_t, 8> _channels_out_type;
00049 boost::array<int16_t, 8> channels_out;
00050
00051 typedef int16_t _lock_type;
00052 int16_t lock;
00053
00054
00055 ROS_DEPRECATED uint32_t get_channels_in_size() const { return (uint32_t)channels_in.size(); }
00056 ROS_DEPRECATED uint32_t get_channels_out_size() const { return (uint32_t)channels_out.size(); }
00057 private:
00058 static const char* __s_getDataType_() { return "asctec_msgs/RCData"; }
00059 public:
00060 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00061
00062 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00063
00064 private:
00065 static const char* __s_getMD5Sum_() { return "d486363e6033911606202acafb1bc1a0"; }
00066 public:
00067 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00068
00069 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00070
00071 private:
00072 static const char* __s_getMessageDefinition_() { return "# Software License Agreement (BSD License)\n\
00073 #\n\
00074 # Copyright (c) 2010\n\
00075 # William Morris <morris@ee.ccny.cuny.edu>\n\
00076 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00077 # All rights reserved.\n\
00078 #\n\
00079 # Redistribution and use in source and binary forms, with or without\n\
00080 # modification, are permitted provided that the following conditions\n\
00081 # are met:\n\
00082 #\n\
00083 # * Redistributions of source code must retain the above copyright\n\
00084 # notice, this list of conditions and the following disclaimer.\n\
00085 # * Redistributions in binary form must reproduce the above\n\
00086 # copyright notice, this list of conditions and the following\n\
00087 # disclaimer in the documentation and/or other materials provided\n\
00088 # with the distribution.\n\
00089 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00090 # contributors may be used to endorse or promote products derived\n\
00091 # from this software without specific prior written permission.\n\
00092 #\n\
00093 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00094 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00095 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00096 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00097 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00098 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00099 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00100 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00101 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00102 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00103 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00104 # POSSIBILITY OF SUCH DAMAGE.\n\
00105 \n\
00106 # struct RC_DATA\n\
00107 # {\n\
00108 # //channels as read from R/C receiver\n\
00109 # unsigned short channels_in[8];\n\
00110 # //channels bias free, remapped and scaled to 0..4095\n\
00111 # unsigned short channels_out[8];\n\
00112 # //Indicator for valid R/C receiption\n\
00113 # unsigned char lock;\n\
00114 # };\n\
00115 Header header\n\
00116 # channels as read from R/C receiver\n\
00117 int16[8] channels_in\n\
00118 \n\
00119 #channels bias free, remapped and scaled to 0..4095\n\
00120 int16[8] channels_out\n\
00121 \n\
00122 #indicator for valid R/C receiption\n\
00123 int16 lock\n\
00124 \n\
00125 ================================================================================\n\
00126 MSG: std_msgs/Header\n\
00127 # Standard metadata for higher-level stamped data types.\n\
00128 # This is generally used to communicate timestamped data \n\
00129 # in a particular coordinate frame.\n\
00130 # \n\
00131 # sequence ID: consecutively increasing ID \n\
00132 uint32 seq\n\
00133 #Two-integer timestamp that is expressed as:\n\
00134 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00135 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00136 # time-handling sugar is provided by the client library\n\
00137 time stamp\n\
00138 #Frame this data is associated with\n\
00139 # 0: no frame\n\
00140 # 1: global frame\n\
00141 string frame_id\n\
00142 \n\
00143 "; }
00144 public:
00145 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00146
00147 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00148
00149 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00150 {
00151 ros::serialization::OStream stream(write_ptr, 1000000000);
00152 ros::serialization::serialize(stream, header);
00153 ros::serialization::serialize(stream, channels_in);
00154 ros::serialization::serialize(stream, channels_out);
00155 ros::serialization::serialize(stream, lock);
00156 return stream.getData();
00157 }
00158
00159 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00160 {
00161 ros::serialization::IStream stream(read_ptr, 1000000000);
00162 ros::serialization::deserialize(stream, header);
00163 ros::serialization::deserialize(stream, channels_in);
00164 ros::serialization::deserialize(stream, channels_out);
00165 ros::serialization::deserialize(stream, lock);
00166 return stream.getData();
00167 }
00168
00169 ROS_DEPRECATED virtual uint32_t serializationLength() const
00170 {
00171 uint32_t size = 0;
00172 size += ros::serialization::serializationLength(header);
00173 size += ros::serialization::serializationLength(channels_in);
00174 size += ros::serialization::serializationLength(channels_out);
00175 size += ros::serialization::serializationLength(lock);
00176 return size;
00177 }
00178
00179 typedef boost::shared_ptr< ::asctec_msgs::RCData_<ContainerAllocator> > Ptr;
00180 typedef boost::shared_ptr< ::asctec_msgs::RCData_<ContainerAllocator> const> ConstPtr;
00181 };
00182 typedef ::asctec_msgs::RCData_<std::allocator<void> > RCData;
00183
00184 typedef boost::shared_ptr< ::asctec_msgs::RCData> RCDataPtr;
00185 typedef boost::shared_ptr< ::asctec_msgs::RCData const> RCDataConstPtr;
00186
00187
00188 template<typename ContainerAllocator>
00189 std::ostream& operator<<(std::ostream& s, const ::asctec_msgs::RCData_<ContainerAllocator> & v)
00190 {
00191 ros::message_operations::Printer< ::asctec_msgs::RCData_<ContainerAllocator> >::stream(s, "", v);
00192 return s;}
00193
00194 }
00195
00196 namespace ros
00197 {
00198 namespace message_traits
00199 {
00200 template<class ContainerAllocator>
00201 struct MD5Sum< ::asctec_msgs::RCData_<ContainerAllocator> > {
00202 static const char* value()
00203 {
00204 return "d486363e6033911606202acafb1bc1a0";
00205 }
00206
00207 static const char* value(const ::asctec_msgs::RCData_<ContainerAllocator> &) { return value(); }
00208 static const uint64_t static_value1 = 0xd486363e60339116ULL;
00209 static const uint64_t static_value2 = 0x06202acafb1bc1a0ULL;
00210 };
00211
00212 template<class ContainerAllocator>
00213 struct DataType< ::asctec_msgs::RCData_<ContainerAllocator> > {
00214 static const char* value()
00215 {
00216 return "asctec_msgs/RCData";
00217 }
00218
00219 static const char* value(const ::asctec_msgs::RCData_<ContainerAllocator> &) { return value(); }
00220 };
00221
00222 template<class ContainerAllocator>
00223 struct Definition< ::asctec_msgs::RCData_<ContainerAllocator> > {
00224 static const char* value()
00225 {
00226 return "# Software License Agreement (BSD License)\n\
00227 #\n\
00228 # Copyright (c) 2010\n\
00229 # William Morris <morris@ee.ccny.cuny.edu>\n\
00230 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00231 # All rights reserved.\n\
00232 #\n\
00233 # Redistribution and use in source and binary forms, with or without\n\
00234 # modification, are permitted provided that the following conditions\n\
00235 # are met:\n\
00236 #\n\
00237 # * Redistributions of source code must retain the above copyright\n\
00238 # notice, this list of conditions and the following disclaimer.\n\
00239 # * Redistributions in binary form must reproduce the above\n\
00240 # copyright notice, this list of conditions and the following\n\
00241 # disclaimer in the documentation and/or other materials provided\n\
00242 # with the distribution.\n\
00243 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00244 # contributors may be used to endorse or promote products derived\n\
00245 # from this software without specific prior written permission.\n\
00246 #\n\
00247 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00248 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00249 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00250 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00251 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00252 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00253 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00254 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00255 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00256 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00257 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00258 # POSSIBILITY OF SUCH DAMAGE.\n\
00259 \n\
00260 # struct RC_DATA\n\
00261 # {\n\
00262 # //channels as read from R/C receiver\n\
00263 # unsigned short channels_in[8];\n\
00264 # //channels bias free, remapped and scaled to 0..4095\n\
00265 # unsigned short channels_out[8];\n\
00266 # //Indicator for valid R/C receiption\n\
00267 # unsigned char lock;\n\
00268 # };\n\
00269 Header header\n\
00270 # channels as read from R/C receiver\n\
00271 int16[8] channels_in\n\
00272 \n\
00273 #channels bias free, remapped and scaled to 0..4095\n\
00274 int16[8] channels_out\n\
00275 \n\
00276 #indicator for valid R/C receiption\n\
00277 int16 lock\n\
00278 \n\
00279 ================================================================================\n\
00280 MSG: std_msgs/Header\n\
00281 # Standard metadata for higher-level stamped data types.\n\
00282 # This is generally used to communicate timestamped data \n\
00283 # in a particular coordinate frame.\n\
00284 # \n\
00285 # sequence ID: consecutively increasing ID \n\
00286 uint32 seq\n\
00287 #Two-integer timestamp that is expressed as:\n\
00288 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00289 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00290 # time-handling sugar is provided by the client library\n\
00291 time stamp\n\
00292 #Frame this data is associated with\n\
00293 # 0: no frame\n\
00294 # 1: global frame\n\
00295 string frame_id\n\
00296 \n\
00297 ";
00298 }
00299
00300 static const char* value(const ::asctec_msgs::RCData_<ContainerAllocator> &) { return value(); }
00301 };
00302
00303 template<class ContainerAllocator> struct HasHeader< ::asctec_msgs::RCData_<ContainerAllocator> > : public TrueType {};
00304 template<class ContainerAllocator> struct HasHeader< const ::asctec_msgs::RCData_<ContainerAllocator> > : public TrueType {};
00305 }
00306 }
00307
00308 namespace ros
00309 {
00310 namespace serialization
00311 {
00312
00313 template<class ContainerAllocator> struct Serializer< ::asctec_msgs::RCData_<ContainerAllocator> >
00314 {
00315 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00316 {
00317 stream.next(m.header);
00318 stream.next(m.channels_in);
00319 stream.next(m.channels_out);
00320 stream.next(m.lock);
00321 }
00322
00323 ROS_DECLARE_ALLINONE_SERIALIZER;
00324 };
00325 }
00326 }
00327
00328 namespace ros
00329 {
00330 namespace message_operations
00331 {
00332
00333 template<class ContainerAllocator>
00334 struct Printer< ::asctec_msgs::RCData_<ContainerAllocator> >
00335 {
00336 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::asctec_msgs::RCData_<ContainerAllocator> & v)
00337 {
00338 s << indent << "header: ";
00339 s << std::endl;
00340 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00341 s << indent << "channels_in[]" << std::endl;
00342 for (size_t i = 0; i < v.channels_in.size(); ++i)
00343 {
00344 s << indent << " channels_in[" << i << "]: ";
00345 Printer<int16_t>::stream(s, indent + " ", v.channels_in[i]);
00346 }
00347 s << indent << "channels_out[]" << std::endl;
00348 for (size_t i = 0; i < v.channels_out.size(); ++i)
00349 {
00350 s << indent << " channels_out[" << i << "]: ";
00351 Printer<int16_t>::stream(s, indent + " ", v.channels_out[i]);
00352 }
00353 s << indent << "lock: ";
00354 Printer<int16_t>::stream(s, indent + " ", v.lock);
00355 }
00356 };
00357
00358
00359 }
00360 }
00361
00362 #endif // ASCTEC_MSGS_MESSAGE_RCDATA_H
00363