$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-pr2_controllers/doc_stacks/2013-03-01_16-45-23.561928/pr2_controllers/ethercat_trigger_controllers/msg/MultiWaveform.msg */ 00002 #ifndef ETHERCAT_TRIGGER_CONTROLLERS_MESSAGE_MULTIWAVEFORM_H 00003 #define ETHERCAT_TRIGGER_CONTROLLERS_MESSAGE_MULTIWAVEFORM_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 #include "ethercat_trigger_controllers/MultiWaveformTransition.h" 00018 00019 namespace ethercat_trigger_controllers 00020 { 00021 template <class ContainerAllocator> 00022 struct MultiWaveform_ { 00023 typedef MultiWaveform_<ContainerAllocator> Type; 00024 00025 MultiWaveform_() 00026 : period(0.0) 00027 , zero_offset(0.0) 00028 , transitions() 00029 { 00030 } 00031 00032 MultiWaveform_(const ContainerAllocator& _alloc) 00033 : period(0.0) 00034 , zero_offset(0.0) 00035 , transitions(_alloc) 00036 { 00037 } 00038 00039 typedef double _period_type; 00040 double period; 00041 00042 typedef double _zero_offset_type; 00043 double zero_offset; 00044 00045 typedef std::vector< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> >::other > _transitions_type; 00046 std::vector< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> >::other > transitions; 00047 00048 00049 ROS_DEPRECATED uint32_t get_transitions_size() const { return (uint32_t)transitions.size(); } 00050 ROS_DEPRECATED void set_transitions_size(uint32_t size) { transitions.resize((size_t)size); } 00051 ROS_DEPRECATED void get_transitions_vec(std::vector< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> >::other > & vec) const { vec = this->transitions; } 00052 ROS_DEPRECATED void set_transitions_vec(const std::vector< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> >::other > & vec) { this->transitions = vec; } 00053 private: 00054 static const char* __s_getDataType_() { return "ethercat_trigger_controllers/MultiWaveform"; } 00055 public: 00056 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00057 00058 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00059 00060 private: 00061 static const char* __s_getMD5Sum_() { return "6a8e166563c159e73f391a302e7b37f6"; } 00062 public: 00063 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00064 00065 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00066 00067 private: 00068 static const char* __s_getMessageDefinition_() { return "# Transitions will occur at k * period + zero_offset + transitions[j].time, where j and\n\ 00069 # k are integers.\n\ 00070 \n\ 00071 float64 period # Period of the waveform in seconds.\n\ 00072 float64 zero_offset # Time corresponding to a time of 0 in times[] in seconds\n\ 00073 MultiWaveformTransition[] transitions # Transitions in the waveform. Transition times should be in increasing order, and be between 0 (inclusive) and period (exclusive)\n\ 00074 \n\ 00075 ================================================================================\n\ 00076 MSG: ethercat_trigger_controllers/MultiWaveformTransition\n\ 00077 # Used to specify a transition in the SetMultiWaveform service.\n\ 00078 \n\ 00079 float64 time # Transition time after start of period.\n\ 00080 uint32 value # Value of the digital output after the transition time.\n\ 00081 string topic # Topic to publish the transition timestamp to, or empty string if the transition should not be published.\n\ 00082 \n\ 00083 "; } 00084 public: 00085 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00086 00087 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00088 00089 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00090 { 00091 ros::serialization::OStream stream(write_ptr, 1000000000); 00092 ros::serialization::serialize(stream, period); 00093 ros::serialization::serialize(stream, zero_offset); 00094 ros::serialization::serialize(stream, transitions); 00095 return stream.getData(); 00096 } 00097 00098 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00099 { 00100 ros::serialization::IStream stream(read_ptr, 1000000000); 00101 ros::serialization::deserialize(stream, period); 00102 ros::serialization::deserialize(stream, zero_offset); 00103 ros::serialization::deserialize(stream, transitions); 00104 return stream.getData(); 00105 } 00106 00107 ROS_DEPRECATED virtual uint32_t serializationLength() const 00108 { 00109 uint32_t size = 0; 00110 size += ros::serialization::serializationLength(period); 00111 size += ros::serialization::serializationLength(zero_offset); 00112 size += ros::serialization::serializationLength(transitions); 00113 return size; 00114 } 00115 00116 typedef boost::shared_ptr< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > Ptr; 00117 typedef boost::shared_ptr< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> const> ConstPtr; 00118 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00119 }; // struct MultiWaveform 00120 typedef ::ethercat_trigger_controllers::MultiWaveform_<std::allocator<void> > MultiWaveform; 00121 00122 typedef boost::shared_ptr< ::ethercat_trigger_controllers::MultiWaveform> MultiWaveformPtr; 00123 typedef boost::shared_ptr< ::ethercat_trigger_controllers::MultiWaveform const> MultiWaveformConstPtr; 00124 00125 00126 template<typename ContainerAllocator> 00127 std::ostream& operator<<(std::ostream& s, const ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> & v) 00128 { 00129 ros::message_operations::Printer< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> >::stream(s, "", v); 00130 return s;} 00131 00132 } // namespace ethercat_trigger_controllers 00133 00134 namespace ros 00135 { 00136 namespace message_traits 00137 { 00138 template<class ContainerAllocator> struct IsMessage< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > : public TrueType {}; 00139 template<class ContainerAllocator> struct IsMessage< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> const> : public TrueType {}; 00140 template<class ContainerAllocator> 00141 struct MD5Sum< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > { 00142 static const char* value() 00143 { 00144 return "6a8e166563c159e73f391a302e7b37f6"; 00145 } 00146 00147 static const char* value(const ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> &) { return value(); } 00148 static const uint64_t static_value1 = 0x6a8e166563c159e7ULL; 00149 static const uint64_t static_value2 = 0x3f391a302e7b37f6ULL; 00150 }; 00151 00152 template<class ContainerAllocator> 00153 struct DataType< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > { 00154 static const char* value() 00155 { 00156 return "ethercat_trigger_controllers/MultiWaveform"; 00157 } 00158 00159 static const char* value(const ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> &) { return value(); } 00160 }; 00161 00162 template<class ContainerAllocator> 00163 struct Definition< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > { 00164 static const char* value() 00165 { 00166 return "# Transitions will occur at k * period + zero_offset + transitions[j].time, where j and\n\ 00167 # k are integers.\n\ 00168 \n\ 00169 float64 period # Period of the waveform in seconds.\n\ 00170 float64 zero_offset # Time corresponding to a time of 0 in times[] in seconds\n\ 00171 MultiWaveformTransition[] transitions # Transitions in the waveform. Transition times should be in increasing order, and be between 0 (inclusive) and period (exclusive)\n\ 00172 \n\ 00173 ================================================================================\n\ 00174 MSG: ethercat_trigger_controllers/MultiWaveformTransition\n\ 00175 # Used to specify a transition in the SetMultiWaveform service.\n\ 00176 \n\ 00177 float64 time # Transition time after start of period.\n\ 00178 uint32 value # Value of the digital output after the transition time.\n\ 00179 string topic # Topic to publish the transition timestamp to, or empty string if the transition should not be published.\n\ 00180 \n\ 00181 "; 00182 } 00183 00184 static const char* value(const ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> &) { return value(); } 00185 }; 00186 00187 } // namespace message_traits 00188 } // namespace ros 00189 00190 namespace ros 00191 { 00192 namespace serialization 00193 { 00194 00195 template<class ContainerAllocator> struct Serializer< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > 00196 { 00197 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00198 { 00199 stream.next(m.period); 00200 stream.next(m.zero_offset); 00201 stream.next(m.transitions); 00202 } 00203 00204 ROS_DECLARE_ALLINONE_SERIALIZER; 00205 }; // struct MultiWaveform_ 00206 } // namespace serialization 00207 } // namespace ros 00208 00209 namespace ros 00210 { 00211 namespace message_operations 00212 { 00213 00214 template<class ContainerAllocator> 00215 struct Printer< ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> > 00216 { 00217 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_trigger_controllers::MultiWaveform_<ContainerAllocator> & v) 00218 { 00219 s << indent << "period: "; 00220 Printer<double>::stream(s, indent + " ", v.period); 00221 s << indent << "zero_offset: "; 00222 Printer<double>::stream(s, indent + " ", v.zero_offset); 00223 s << indent << "transitions[]" << std::endl; 00224 for (size_t i = 0; i < v.transitions.size(); ++i) 00225 { 00226 s << indent << " transitions[" << i << "]: "; 00227 s << std::endl; 00228 s << indent; 00229 Printer< ::ethercat_trigger_controllers::MultiWaveformTransition_<ContainerAllocator> >::stream(s, indent + " ", v.transitions[i]); 00230 } 00231 } 00232 }; 00233 00234 00235 } // namespace message_operations 00236 } // namespace ros 00237 00238 #endif // ETHERCAT_TRIGGER_CONTROLLERS_MESSAGE_MULTIWAVEFORM_H 00239