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