00001
00002 #ifndef ASEBAROS_MESSAGE_ASEBAEVENT_H
00003 #define ASEBAROS_MESSAGE_ASEBAEVENT_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 asebaros
00015 {
00016 template <class ContainerAllocator>
00017 struct AsebaEvent_ : public ros::Message
00018 {
00019 typedef AsebaEvent_<ContainerAllocator> Type;
00020
00021 AsebaEvent_()
00022 : stamp()
00023 , source(0)
00024 , data()
00025 {
00026 }
00027
00028 AsebaEvent_(const ContainerAllocator& _alloc)
00029 : stamp()
00030 , source(0)
00031 , data(_alloc)
00032 {
00033 }
00034
00035 typedef ros::Time _stamp_type;
00036 ros::Time stamp;
00037
00038 typedef uint16_t _source_type;
00039 uint16_t source;
00040
00041 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _data_type;
00042 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > data;
00043
00044
00045 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00046 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); }
00047 ROS_DEPRECATED void get_data_vec(std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) const { vec = this->data; }
00048 ROS_DEPRECATED void set_data_vec(const std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) { this->data = vec; }
00049 private:
00050 static const char* __s_getDataType_() { return "asebaros/AsebaEvent"; }
00051 public:
00052 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00053
00054 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00055
00056 private:
00057 static const char* __s_getMD5Sum_() { return "49995036bad52e061c5fd515a11fffd7"; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00060
00061 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00062
00063 private:
00064 static const char* __s_getMessageDefinition_() { return "time stamp\n\
00065 uint16 source\n\
00066 int16[] data\n\
00067 \n\
00068 "; }
00069 public:
00070 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00071
00072 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00073
00074 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00075 {
00076 ros::serialization::OStream stream(write_ptr, 1000000000);
00077 ros::serialization::serialize(stream, stamp);
00078 ros::serialization::serialize(stream, source);
00079 ros::serialization::serialize(stream, data);
00080 return stream.getData();
00081 }
00082
00083 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00084 {
00085 ros::serialization::IStream stream(read_ptr, 1000000000);
00086 ros::serialization::deserialize(stream, stamp);
00087 ros::serialization::deserialize(stream, source);
00088 ros::serialization::deserialize(stream, data);
00089 return stream.getData();
00090 }
00091
00092 ROS_DEPRECATED virtual uint32_t serializationLength() const
00093 {
00094 uint32_t size = 0;
00095 size += ros::serialization::serializationLength(stamp);
00096 size += ros::serialization::serializationLength(source);
00097 size += ros::serialization::serializationLength(data);
00098 return size;
00099 }
00100
00101 typedef boost::shared_ptr< ::asebaros::AsebaEvent_<ContainerAllocator> > Ptr;
00102 typedef boost::shared_ptr< ::asebaros::AsebaEvent_<ContainerAllocator> const> ConstPtr;
00103 };
00104 typedef ::asebaros::AsebaEvent_<std::allocator<void> > AsebaEvent;
00105
00106 typedef boost::shared_ptr< ::asebaros::AsebaEvent> AsebaEventPtr;
00107 typedef boost::shared_ptr< ::asebaros::AsebaEvent const> AsebaEventConstPtr;
00108
00109
00110 template<typename ContainerAllocator>
00111 std::ostream& operator<<(std::ostream& s, const ::asebaros::AsebaEvent_<ContainerAllocator> & v)
00112 {
00113 ros::message_operations::Printer< ::asebaros::AsebaEvent_<ContainerAllocator> >::stream(s, "", v);
00114 return s;}
00115
00116 }
00117
00118 namespace ros
00119 {
00120 namespace message_traits
00121 {
00122 template<class ContainerAllocator>
00123 struct MD5Sum< ::asebaros::AsebaEvent_<ContainerAllocator> > {
00124 static const char* value()
00125 {
00126 return "49995036bad52e061c5fd515a11fffd7";
00127 }
00128
00129 static const char* value(const ::asebaros::AsebaEvent_<ContainerAllocator> &) { return value(); }
00130 static const uint64_t static_value1 = 0x49995036bad52e06ULL;
00131 static const uint64_t static_value2 = 0x1c5fd515a11fffd7ULL;
00132 };
00133
00134 template<class ContainerAllocator>
00135 struct DataType< ::asebaros::AsebaEvent_<ContainerAllocator> > {
00136 static const char* value()
00137 {
00138 return "asebaros/AsebaEvent";
00139 }
00140
00141 static const char* value(const ::asebaros::AsebaEvent_<ContainerAllocator> &) { return value(); }
00142 };
00143
00144 template<class ContainerAllocator>
00145 struct Definition< ::asebaros::AsebaEvent_<ContainerAllocator> > {
00146 static const char* value()
00147 {
00148 return "time stamp\n\
00149 uint16 source\n\
00150 int16[] data\n\
00151 \n\
00152 ";
00153 }
00154
00155 static const char* value(const ::asebaros::AsebaEvent_<ContainerAllocator> &) { return value(); }
00156 };
00157
00158 }
00159 }
00160
00161 namespace ros
00162 {
00163 namespace serialization
00164 {
00165
00166 template<class ContainerAllocator> struct Serializer< ::asebaros::AsebaEvent_<ContainerAllocator> >
00167 {
00168 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00169 {
00170 stream.next(m.stamp);
00171 stream.next(m.source);
00172 stream.next(m.data);
00173 }
00174
00175 ROS_DECLARE_ALLINONE_SERIALIZER;
00176 };
00177 }
00178 }
00179
00180 namespace ros
00181 {
00182 namespace message_operations
00183 {
00184
00185 template<class ContainerAllocator>
00186 struct Printer< ::asebaros::AsebaEvent_<ContainerAllocator> >
00187 {
00188 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::asebaros::AsebaEvent_<ContainerAllocator> & v)
00189 {
00190 s << indent << "stamp: ";
00191 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00192 s << indent << "source: ";
00193 Printer<uint16_t>::stream(s, indent + " ", v.source);
00194 s << indent << "data[]" << std::endl;
00195 for (size_t i = 0; i < v.data.size(); ++i)
00196 {
00197 s << indent << " data[" << i << "]: ";
00198 Printer<int16_t>::stream(s, indent + " ", v.data[i]);
00199 }
00200 }
00201 };
00202
00203
00204 }
00205 }
00206
00207 #endif // ASEBAROS_MESSAGE_ASEBAEVENT_H
00208