00001
00002 #ifndef WIIMOTE_MESSAGE_IRSOURCEINFO_H
00003 #define WIIMOTE_MESSAGE_IRSOURCEINFO_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 wiimote
00015 {
00016 template <class ContainerAllocator>
00017 struct IrSourceInfo_ : public ros::Message
00018 {
00019 typedef IrSourceInfo_<ContainerAllocator> Type;
00020
00021 IrSourceInfo_()
00022 : x(0.0)
00023 , y(0.0)
00024 , ir_size(0)
00025 {
00026 }
00027
00028 IrSourceInfo_(const ContainerAllocator& _alloc)
00029 : x(0.0)
00030 , y(0.0)
00031 , ir_size(0)
00032 {
00033 }
00034
00035 typedef double _x_type;
00036 double x;
00037
00038 typedef double _y_type;
00039 double y;
00040
00041 typedef int64_t _ir_size_type;
00042 int64_t ir_size;
00043
00044
00045 private:
00046 static const char* __s_getDataType_() { return "wiimote/IrSourceInfo"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00049
00050 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00051
00052 private:
00053 static const char* __s_getMD5Sum_() { return "95274ca88b9f008b99984b9a61d2772e"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00056
00057 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00058
00059 private:
00060 static const char* __s_getMessageDefinition_() { return "# Sensor data pertaining to the Wiimote infrared camera.\n\
00061 # This message contains data for one of the four infrared \n\
00062 # light sources that the camera detects.\n\
00063 #\n\
00064 # Each light is specified with a 2D position and \n\
00065 # a 'source magnitude' (ir_size). If the x dimension\n\
00066 # is set to INVALID_FLOAT, then no light was detected for \n\
00067 # the respective light. The Wiimote handles up to\n\
00068 # four light sources, and the wiimote_node.py software\n\
00069 # is written to that limit as well.\n\
00070 #\n\
00071 # I am unsure what the 'ir_size' values represent. \n\
00072 # They are described as 'source magnitude' in some places. I\n\
00073 # *assume* this is signal amplitude, but it's unclear. \n\
00074 # Note that current lowest level cwiid driver does not \n\
00075 # seem to pass the ir_size value to the cwiid Wiimote.c. \n\
00076 # For now this size will therefore be set INVALID\n\
00077 \n\
00078 float64 x \n\
00079 float64 y \n\
00080 int64 ir_size\n\
00081 \n\
00082 "; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00085
00086 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00087
00088 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00089 {
00090 ros::serialization::OStream stream(write_ptr, 1000000000);
00091 ros::serialization::serialize(stream, x);
00092 ros::serialization::serialize(stream, y);
00093 ros::serialization::serialize(stream, ir_size);
00094 return stream.getData();
00095 }
00096
00097 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00098 {
00099 ros::serialization::IStream stream(read_ptr, 1000000000);
00100 ros::serialization::deserialize(stream, x);
00101 ros::serialization::deserialize(stream, y);
00102 ros::serialization::deserialize(stream, ir_size);
00103 return stream.getData();
00104 }
00105
00106 ROS_DEPRECATED virtual uint32_t serializationLength() const
00107 {
00108 uint32_t size = 0;
00109 size += ros::serialization::serializationLength(x);
00110 size += ros::serialization::serializationLength(y);
00111 size += ros::serialization::serializationLength(ir_size);
00112 return size;
00113 }
00114
00115 typedef boost::shared_ptr< ::wiimote::IrSourceInfo_<ContainerAllocator> > Ptr;
00116 typedef boost::shared_ptr< ::wiimote::IrSourceInfo_<ContainerAllocator> const> ConstPtr;
00117 };
00118 typedef ::wiimote::IrSourceInfo_<std::allocator<void> > IrSourceInfo;
00119
00120 typedef boost::shared_ptr< ::wiimote::IrSourceInfo> IrSourceInfoPtr;
00121 typedef boost::shared_ptr< ::wiimote::IrSourceInfo const> IrSourceInfoConstPtr;
00122
00123
00124 template<typename ContainerAllocator>
00125 std::ostream& operator<<(std::ostream& s, const ::wiimote::IrSourceInfo_<ContainerAllocator> & v)
00126 {
00127 ros::message_operations::Printer< ::wiimote::IrSourceInfo_<ContainerAllocator> >::stream(s, "", v);
00128 return s;}
00129
00130 }
00131
00132 namespace ros
00133 {
00134 namespace message_traits
00135 {
00136 template<class ContainerAllocator>
00137 struct MD5Sum< ::wiimote::IrSourceInfo_<ContainerAllocator> > {
00138 static const char* value()
00139 {
00140 return "95274ca88b9f008b99984b9a61d2772e";
00141 }
00142
00143 static const char* value(const ::wiimote::IrSourceInfo_<ContainerAllocator> &) { return value(); }
00144 static const uint64_t static_value1 = 0x95274ca88b9f008bULL;
00145 static const uint64_t static_value2 = 0x99984b9a61d2772eULL;
00146 };
00147
00148 template<class ContainerAllocator>
00149 struct DataType< ::wiimote::IrSourceInfo_<ContainerAllocator> > {
00150 static const char* value()
00151 {
00152 return "wiimote/IrSourceInfo";
00153 }
00154
00155 static const char* value(const ::wiimote::IrSourceInfo_<ContainerAllocator> &) { return value(); }
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct Definition< ::wiimote::IrSourceInfo_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "# Sensor data pertaining to the Wiimote infrared camera.\n\
00163 # This message contains data for one of the four infrared \n\
00164 # light sources that the camera detects.\n\
00165 #\n\
00166 # Each light is specified with a 2D position and \n\
00167 # a 'source magnitude' (ir_size). If the x dimension\n\
00168 # is set to INVALID_FLOAT, then no light was detected for \n\
00169 # the respective light. The Wiimote handles up to\n\
00170 # four light sources, and the wiimote_node.py software\n\
00171 # is written to that limit as well.\n\
00172 #\n\
00173 # I am unsure what the 'ir_size' values represent. \n\
00174 # They are described as 'source magnitude' in some places. I\n\
00175 # *assume* this is signal amplitude, but it's unclear. \n\
00176 # Note that current lowest level cwiid driver does not \n\
00177 # seem to pass the ir_size value to the cwiid Wiimote.c. \n\
00178 # For now this size will therefore be set INVALID\n\
00179 \n\
00180 float64 x \n\
00181 float64 y \n\
00182 int64 ir_size\n\
00183 \n\
00184 ";
00185 }
00186
00187 static const char* value(const ::wiimote::IrSourceInfo_<ContainerAllocator> &) { return value(); }
00188 };
00189
00190 template<class ContainerAllocator> struct IsFixedSize< ::wiimote::IrSourceInfo_<ContainerAllocator> > : public TrueType {};
00191 }
00192 }
00193
00194 namespace ros
00195 {
00196 namespace serialization
00197 {
00198
00199 template<class ContainerAllocator> struct Serializer< ::wiimote::IrSourceInfo_<ContainerAllocator> >
00200 {
00201 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00202 {
00203 stream.next(m.x);
00204 stream.next(m.y);
00205 stream.next(m.ir_size);
00206 }
00207
00208 ROS_DECLARE_ALLINONE_SERIALIZER;
00209 };
00210 }
00211 }
00212
00213 namespace ros
00214 {
00215 namespace message_operations
00216 {
00217
00218 template<class ContainerAllocator>
00219 struct Printer< ::wiimote::IrSourceInfo_<ContainerAllocator> >
00220 {
00221 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::wiimote::IrSourceInfo_<ContainerAllocator> & v)
00222 {
00223 s << indent << "x: ";
00224 Printer<double>::stream(s, indent + " ", v.x);
00225 s << indent << "y: ";
00226 Printer<double>::stream(s, indent + " ", v.y);
00227 s << indent << "ir_size: ";
00228 Printer<int64_t>::stream(s, indent + " ", v.ir_size);
00229 }
00230 };
00231
00232
00233 }
00234 }
00235
00236 #endif // WIIMOTE_MESSAGE_IRSOURCEINFO_H
00237