00001
00002 #ifndef STD_MSGS_MESSAGE_BYTE_H
00003 #define STD_MSGS_MESSAGE_BYTE_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
00014 namespace std_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct Byte_ : public ros::Message
00018 {
00019 typedef Byte_<ContainerAllocator> Type;
00020
00021 Byte_()
00022 : data(0)
00023 {
00024 }
00025
00026 Byte_(const ContainerAllocator& _alloc)
00027 : data(0)
00028 {
00029 }
00030
00031 typedef int8_t _data_type;
00032 int8_t data;
00033
00034
00035 private:
00036 static const char* __s_getDataType_() { return "std_msgs/Byte"; }
00037 public:
00038 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00039
00040 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00041
00042 private:
00043 static const char* __s_getMD5Sum_() { return "ad736a2e8818154c487bb80fe42ce43b"; }
00044 public:
00045 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00046
00047 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00048
00049 private:
00050 static const char* __s_getMessageDefinition_() { return "byte data\n\
00051 \n\
00052 "; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00055
00056 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00057
00058 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00059 {
00060 ros::serialization::OStream stream(write_ptr, 1000000000);
00061 ros::serialization::serialize(stream, data);
00062 return stream.getData();
00063 }
00064
00065 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00066 {
00067 ros::serialization::IStream stream(read_ptr, 1000000000);
00068 ros::serialization::deserialize(stream, data);
00069 return stream.getData();
00070 }
00071
00072 ROS_DEPRECATED virtual uint32_t serializationLength() const
00073 {
00074 uint32_t size = 0;
00075 size += ros::serialization::serializationLength(data);
00076 return size;
00077 }
00078
00079 typedef boost::shared_ptr< ::std_msgs::Byte_<ContainerAllocator> > Ptr;
00080 typedef boost::shared_ptr< ::std_msgs::Byte_<ContainerAllocator> const> ConstPtr;
00081 };
00082 typedef ::std_msgs::Byte_<std::allocator<void> > Byte;
00083
00084 typedef boost::shared_ptr< ::std_msgs::Byte> BytePtr;
00085 typedef boost::shared_ptr< ::std_msgs::Byte const> ByteConstPtr;
00086
00087
00088 template<typename ContainerAllocator>
00089 std::ostream& operator<<(std::ostream& s, const ::std_msgs::Byte_<ContainerAllocator> & v)
00090 {
00091 ros::message_operations::Printer< ::std_msgs::Byte_<ContainerAllocator> >::stream(s, "", v);
00092 return s;}
00093
00094 }
00095
00096 namespace ros
00097 {
00098 namespace message_traits
00099 {
00100 template<class ContainerAllocator>
00101 struct MD5Sum< ::std_msgs::Byte_<ContainerAllocator> > {
00102 static const char* value()
00103 {
00104 return "ad736a2e8818154c487bb80fe42ce43b";
00105 }
00106
00107 static const char* value(const ::std_msgs::Byte_<ContainerAllocator> &) { return value(); }
00108 static const uint64_t static_value1 = 0xad736a2e8818154cULL;
00109 static const uint64_t static_value2 = 0x487bb80fe42ce43bULL;
00110 };
00111
00112 template<class ContainerAllocator>
00113 struct DataType< ::std_msgs::Byte_<ContainerAllocator> > {
00114 static const char* value()
00115 {
00116 return "std_msgs/Byte";
00117 }
00118
00119 static const char* value(const ::std_msgs::Byte_<ContainerAllocator> &) { return value(); }
00120 };
00121
00122 template<class ContainerAllocator>
00123 struct Definition< ::std_msgs::Byte_<ContainerAllocator> > {
00124 static const char* value()
00125 {
00126 return "byte data\n\
00127 \n\
00128 ";
00129 }
00130
00131 static const char* value(const ::std_msgs::Byte_<ContainerAllocator> &) { return value(); }
00132 };
00133
00134 template<class ContainerAllocator> struct IsFixedSize< ::std_msgs::Byte_<ContainerAllocator> > : public TrueType {};
00135 }
00136 }
00137
00138 namespace ros
00139 {
00140 namespace serialization
00141 {
00142
00143 template<class ContainerAllocator> struct Serializer< ::std_msgs::Byte_<ContainerAllocator> >
00144 {
00145 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00146 {
00147 stream.next(m.data);
00148 }
00149
00150 ROS_DECLARE_ALLINONE_SERIALIZER;
00151 };
00152 }
00153 }
00154
00155 namespace ros
00156 {
00157 namespace message_operations
00158 {
00159
00160 template<class ContainerAllocator>
00161 struct Printer< ::std_msgs::Byte_<ContainerAllocator> >
00162 {
00163 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::std_msgs::Byte_<ContainerAllocator> & v)
00164 {
00165 s << indent << "data: ";
00166 Printer<int8_t>::stream(s, indent + " ", v.data);
00167 }
00168 };
00169
00170
00171 }
00172 }
00173
00174 #endif // STD_MSGS_MESSAGE_BYTE_H
00175