Go to the documentation of this file.00001
00002 #ifndef KOBUKI_COMMS_MESSAGE_DIGITALOUTPUT_H
00003 #define KOBUKI_COMMS_MESSAGE_DIGITALOUTPUT_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace kobuki_comms
00019 {
00020 template <class ContainerAllocator>
00021 struct DigitalOutput_ {
00022 typedef DigitalOutput_<ContainerAllocator> Type;
00023
00024 DigitalOutput_()
00025 : values()
00026 , mask()
00027 {
00028 values.assign(false);
00029 mask.assign(false);
00030 }
00031
00032 DigitalOutput_(const ContainerAllocator& _alloc)
00033 : values()
00034 , mask()
00035 {
00036 values.assign(false);
00037 mask.assign(false);
00038 }
00039
00040 typedef boost::array<uint8_t, 4> _values_type;
00041 boost::array<uint8_t, 4> values;
00042
00043 typedef boost::array<uint8_t, 4> _mask_type;
00044 boost::array<uint8_t, 4> mask;
00045
00046
00047 typedef boost::shared_ptr< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > Ptr;
00048 typedef boost::shared_ptr< ::kobuki_comms::DigitalOutput_<ContainerAllocator> const> ConstPtr;
00049 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00050 };
00051 typedef ::kobuki_comms::DigitalOutput_<std::allocator<void> > DigitalOutput;
00052
00053 typedef boost::shared_ptr< ::kobuki_comms::DigitalOutput> DigitalOutputPtr;
00054 typedef boost::shared_ptr< ::kobuki_comms::DigitalOutput const> DigitalOutputConstPtr;
00055
00056
00057 template<typename ContainerAllocator>
00058 std::ostream& operator<<(std::ostream& s, const ::kobuki_comms::DigitalOutput_<ContainerAllocator> & v)
00059 {
00060 ros::message_operations::Printer< ::kobuki_comms::DigitalOutput_<ContainerAllocator> >::stream(s, "", v);
00061 return s;}
00062
00063 }
00064
00065 namespace ros
00066 {
00067 namespace message_traits
00068 {
00069 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > : public TrueType {};
00070 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::DigitalOutput_<ContainerAllocator> const> : public TrueType {};
00071 template<class ContainerAllocator>
00072 struct MD5Sum< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > {
00073 static const char* value()
00074 {
00075 return "1e97cd7f196a0270516b506e8bf29ca2";
00076 }
00077
00078 static const char* value(const ::kobuki_comms::DigitalOutput_<ContainerAllocator> &) { return value(); }
00079 static const uint64_t static_value1 = 0x1e97cd7f196a0270ULL;
00080 static const uint64_t static_value2 = 0x516b506e8bf29ca2ULL;
00081 };
00082
00083 template<class ContainerAllocator>
00084 struct DataType< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > {
00085 static const char* value()
00086 {
00087 return "kobuki_comms/DigitalOutput";
00088 }
00089
00090 static const char* value(const ::kobuki_comms::DigitalOutput_<ContainerAllocator> &) { return value(); }
00091 };
00092
00093 template<class ContainerAllocator>
00094 struct Definition< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > {
00095 static const char* value()
00096 {
00097 return "# Digital output - only four pins. \n\
00098 \n\
00099 # Array of values indices represent pins 0-3 respectively.\n\
00100 bool[4] values\n\
00101 \n\
00102 # Set indices to true to set a pin, false to ignore.\n\
00103 bool[4] mask\n\
00104 \n\
00105 ";
00106 }
00107
00108 static const char* value(const ::kobuki_comms::DigitalOutput_<ContainerAllocator> &) { return value(); }
00109 };
00110
00111 template<class ContainerAllocator> struct IsFixedSize< ::kobuki_comms::DigitalOutput_<ContainerAllocator> > : public TrueType {};
00112 }
00113 }
00114
00115 namespace ros
00116 {
00117 namespace serialization
00118 {
00119
00120 template<class ContainerAllocator> struct Serializer< ::kobuki_comms::DigitalOutput_<ContainerAllocator> >
00121 {
00122 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00123 {
00124 stream.next(m.values);
00125 stream.next(m.mask);
00126 }
00127
00128 ROS_DECLARE_ALLINONE_SERIALIZER;
00129 };
00130 }
00131 }
00132
00133 namespace ros
00134 {
00135 namespace message_operations
00136 {
00137
00138 template<class ContainerAllocator>
00139 struct Printer< ::kobuki_comms::DigitalOutput_<ContainerAllocator> >
00140 {
00141 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::kobuki_comms::DigitalOutput_<ContainerAllocator> & v)
00142 {
00143 s << indent << "values[]" << std::endl;
00144 for (size_t i = 0; i < v.values.size(); ++i)
00145 {
00146 s << indent << " values[" << i << "]: ";
00147 Printer<uint8_t>::stream(s, indent + " ", v.values[i]);
00148 }
00149 s << indent << "mask[]" << std::endl;
00150 for (size_t i = 0; i < v.mask.size(); ++i)
00151 {
00152 s << indent << " mask[" << i << "]: ";
00153 Printer<uint8_t>::stream(s, indent + " ", v.mask[i]);
00154 }
00155 }
00156 };
00157
00158
00159 }
00160 }
00161
00162 #endif // KOBUKI_COMMS_MESSAGE_DIGITALOUTPUT_H
00163