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