00001 """autogenerated by genpy from ethercat_trigger_controllers/SetWaveformRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class SetWaveformRequest(genpy.Message):
00009 _md5sum = "988450e1ddd386f3967c381c19b2330c"
00010 _type = "ethercat_trigger_controllers/SetWaveformRequest"
00011 _has_header = False
00012 _full_text = """float64 rep_rate
00013 float64 phase
00014 float64 duty_cycle
00015 int32 running
00016 int32 active_low
00017 int32 pulsed
00018
00019 """
00020 __slots__ = ['rep_rate','phase','duty_cycle','running','active_low','pulsed']
00021 _slot_types = ['float64','float64','float64','int32','int32','int32']
00022
00023 def __init__(self, *args, **kwds):
00024 """
00025 Constructor. Any message fields that are implicitly/explicitly
00026 set to None will be assigned a default value. The recommend
00027 use is keyword arguments as this is more robust to future message
00028 changes. You cannot mix in-order arguments and keyword arguments.
00029
00030 The available fields are:
00031 rep_rate,phase,duty_cycle,running,active_low,pulsed
00032
00033 :param args: complete set of field values, in .msg order
00034 :param kwds: use keyword arguments corresponding to message field names
00035 to set specific fields.
00036 """
00037 if args or kwds:
00038 super(SetWaveformRequest, self).__init__(*args, **kwds)
00039
00040 if self.rep_rate is None:
00041 self.rep_rate = 0.
00042 if self.phase is None:
00043 self.phase = 0.
00044 if self.duty_cycle is None:
00045 self.duty_cycle = 0.
00046 if self.running is None:
00047 self.running = 0
00048 if self.active_low is None:
00049 self.active_low = 0
00050 if self.pulsed is None:
00051 self.pulsed = 0
00052 else:
00053 self.rep_rate = 0.
00054 self.phase = 0.
00055 self.duty_cycle = 0.
00056 self.running = 0
00057 self.active_low = 0
00058 self.pulsed = 0
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 :param buff: buffer, ``StringIO``
00070 """
00071 try:
00072 _x = self
00073 buff.write(_struct_3d3i.pack(_x.rep_rate, _x.phase, _x.duty_cycle, _x.running, _x.active_low, _x.pulsed))
00074 except struct.error as se: self._check_types(se)
00075 except TypeError as te: self._check_types(te)
00076
00077 def deserialize(self, str):
00078 """
00079 unpack serialized message in str into this message instance
00080 :param str: byte array of serialized message, ``str``
00081 """
00082 try:
00083 end = 0
00084 _x = self
00085 start = end
00086 end += 36
00087 (_x.rep_rate, _x.phase, _x.duty_cycle, _x.running, _x.active_low, _x.pulsed,) = _struct_3d3i.unpack(str[start:end])
00088 return self
00089 except struct.error as e:
00090 raise genpy.DeserializationError(e)
00091
00092
00093 def serialize_numpy(self, buff, numpy):
00094 """
00095 serialize message with numpy array types into buffer
00096 :param buff: buffer, ``StringIO``
00097 :param numpy: numpy python module
00098 """
00099 try:
00100 _x = self
00101 buff.write(_struct_3d3i.pack(_x.rep_rate, _x.phase, _x.duty_cycle, _x.running, _x.active_low, _x.pulsed))
00102 except struct.error as se: self._check_types(se)
00103 except TypeError as te: self._check_types(te)
00104
00105 def deserialize_numpy(self, str, numpy):
00106 """
00107 unpack serialized message in str into this message instance using numpy for array types
00108 :param str: byte array of serialized message, ``str``
00109 :param numpy: numpy python module
00110 """
00111 try:
00112 end = 0
00113 _x = self
00114 start = end
00115 end += 36
00116 (_x.rep_rate, _x.phase, _x.duty_cycle, _x.running, _x.active_low, _x.pulsed,) = _struct_3d3i.unpack(str[start:end])
00117 return self
00118 except struct.error as e:
00119 raise genpy.DeserializationError(e)
00120
00121 _struct_I = genpy.struct_I
00122 _struct_3d3i = struct.Struct("<3d3i")
00123 """autogenerated by genpy from ethercat_trigger_controllers/SetWaveformResponse.msg. Do not edit."""
00124 import sys
00125 python3 = True if sys.hexversion > 0x03000000 else False
00126 import genpy
00127 import struct
00128
00129
00130 class SetWaveformResponse(genpy.Message):
00131 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00132 _type = "ethercat_trigger_controllers/SetWaveformResponse"
00133 _has_header = False
00134 _full_text = """
00135
00136 """
00137 __slots__ = []
00138 _slot_types = []
00139
00140 def __init__(self, *args, **kwds):
00141 """
00142 Constructor. Any message fields that are implicitly/explicitly
00143 set to None will be assigned a default value. The recommend
00144 use is keyword arguments as this is more robust to future message
00145 changes. You cannot mix in-order arguments and keyword arguments.
00146
00147 The available fields are:
00148
00149
00150 :param args: complete set of field values, in .msg order
00151 :param kwds: use keyword arguments corresponding to message field names
00152 to set specific fields.
00153 """
00154 if args or kwds:
00155 super(SetWaveformResponse, self).__init__(*args, **kwds)
00156
00157 def _get_types(self):
00158 """
00159 internal API method
00160 """
00161 return self._slot_types
00162
00163 def serialize(self, buff):
00164 """
00165 serialize message into buffer
00166 :param buff: buffer, ``StringIO``
00167 """
00168 try:
00169 pass
00170 except struct.error as se: self._check_types(se)
00171 except TypeError as te: self._check_types(te)
00172
00173 def deserialize(self, str):
00174 """
00175 unpack serialized message in str into this message instance
00176 :param str: byte array of serialized message, ``str``
00177 """
00178 try:
00179 end = 0
00180 return self
00181 except struct.error as e:
00182 raise genpy.DeserializationError(e)
00183
00184
00185 def serialize_numpy(self, buff, numpy):
00186 """
00187 serialize message with numpy array types into buffer
00188 :param buff: buffer, ``StringIO``
00189 :param numpy: numpy python module
00190 """
00191 try:
00192 pass
00193 except struct.error as se: self._check_types(se)
00194 except TypeError as te: self._check_types(te)
00195
00196 def deserialize_numpy(self, str, numpy):
00197 """
00198 unpack serialized message in str into this message instance using numpy for array types
00199 :param str: byte array of serialized message, ``str``
00200 :param numpy: numpy python module
00201 """
00202 try:
00203 end = 0
00204 return self
00205 except struct.error as e:
00206 raise genpy.DeserializationError(e)
00207
00208 _struct_I = genpy.struct_I
00209 class SetWaveform(object):
00210 _type = 'ethercat_trigger_controllers/SetWaveform'
00211 _md5sum = '988450e1ddd386f3967c381c19b2330c'
00212 _request_class = SetWaveformRequest
00213 _response_class = SetWaveformResponse