00001 """autogenerated by genpy from cob_base_drive_chain/ElmoRecorderReadoutRequest.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 ElmoRecorderReadoutRequest(genpy.Message):
00009 _md5sum = "dd88752641c6995eb674ed67be4e41d1"
00010 _type = "cob_base_drive_chain/ElmoRecorderReadoutRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016
00017
00018
00019
00020 int64 subindex
00021
00022
00023
00024 string fileprefix
00025
00026
00027 """
00028 __slots__ = ['subindex','fileprefix']
00029 _slot_types = ['int64','string']
00030
00031 def __init__(self, *args, **kwds):
00032 """
00033 Constructor. Any message fields that are implicitly/explicitly
00034 set to None will be assigned a default value. The recommend
00035 use is keyword arguments as this is more robust to future message
00036 changes. You cannot mix in-order arguments and keyword arguments.
00037
00038 The available fields are:
00039 subindex,fileprefix
00040
00041 :param args: complete set of field values, in .msg order
00042 :param kwds: use keyword arguments corresponding to message field names
00043 to set specific fields.
00044 """
00045 if args or kwds:
00046 super(ElmoRecorderReadoutRequest, self).__init__(*args, **kwds)
00047
00048 if self.subindex is None:
00049 self.subindex = 0
00050 if self.fileprefix is None:
00051 self.fileprefix = ''
00052 else:
00053 self.subindex = 0
00054 self.fileprefix = ''
00055
00056 def _get_types(self):
00057 """
00058 internal API method
00059 """
00060 return self._slot_types
00061
00062 def serialize(self, buff):
00063 """
00064 serialize message into buffer
00065 :param buff: buffer, ``StringIO``
00066 """
00067 try:
00068 buff.write(_struct_q.pack(self.subindex))
00069 _x = self.fileprefix
00070 length = len(_x)
00071 if python3 or type(_x) == unicode:
00072 _x = _x.encode('utf-8')
00073 length = len(_x)
00074 buff.write(struct.pack('<I%ss'%length, length, _x))
00075 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00076 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 :param str: byte array of serialized message, ``str``
00082 """
00083 try:
00084 end = 0
00085 start = end
00086 end += 8
00087 (self.subindex,) = _struct_q.unpack(str[start:end])
00088 start = end
00089 end += 4
00090 (length,) = _struct_I.unpack(str[start:end])
00091 start = end
00092 end += length
00093 if python3:
00094 self.fileprefix = str[start:end].decode('utf-8')
00095 else:
00096 self.fileprefix = str[start:end]
00097 return self
00098 except struct.error as e:
00099 raise genpy.DeserializationError(e)
00100
00101
00102 def serialize_numpy(self, buff, numpy):
00103 """
00104 serialize message with numpy array types into buffer
00105 :param buff: buffer, ``StringIO``
00106 :param numpy: numpy python module
00107 """
00108 try:
00109 buff.write(_struct_q.pack(self.subindex))
00110 _x = self.fileprefix
00111 length = len(_x)
00112 if python3 or type(_x) == unicode:
00113 _x = _x.encode('utf-8')
00114 length = len(_x)
00115 buff.write(struct.pack('<I%ss'%length, length, _x))
00116 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00117 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00118
00119 def deserialize_numpy(self, str, numpy):
00120 """
00121 unpack serialized message in str into this message instance using numpy for array types
00122 :param str: byte array of serialized message, ``str``
00123 :param numpy: numpy python module
00124 """
00125 try:
00126 end = 0
00127 start = end
00128 end += 8
00129 (self.subindex,) = _struct_q.unpack(str[start:end])
00130 start = end
00131 end += 4
00132 (length,) = _struct_I.unpack(str[start:end])
00133 start = end
00134 end += length
00135 if python3:
00136 self.fileprefix = str[start:end].decode('utf-8')
00137 else:
00138 self.fileprefix = str[start:end]
00139 return self
00140 except struct.error as e:
00141 raise genpy.DeserializationError(e)
00142
00143 _struct_I = genpy.struct_I
00144 _struct_q = struct.Struct("<q")
00145 """autogenerated by genpy from cob_base_drive_chain/ElmoRecorderReadoutResponse.msg. Do not edit."""
00146 import sys
00147 python3 = True if sys.hexversion > 0x03000000 else False
00148 import genpy
00149 import struct
00150
00151
00152 class ElmoRecorderReadoutResponse(genpy.Message):
00153 _md5sum = "a223a80848aece692f82aeb7f4a04f7f"
00154 _type = "cob_base_drive_chain/ElmoRecorderReadoutResponse"
00155 _has_header = False
00156 _full_text = """
00157
00158
00159
00160
00161
00162 int64 success
00163
00164 string message
00165
00166
00167 """
00168 __slots__ = ['success','message']
00169 _slot_types = ['int64','string']
00170
00171 def __init__(self, *args, **kwds):
00172 """
00173 Constructor. Any message fields that are implicitly/explicitly
00174 set to None will be assigned a default value. The recommend
00175 use is keyword arguments as this is more robust to future message
00176 changes. You cannot mix in-order arguments and keyword arguments.
00177
00178 The available fields are:
00179 success,message
00180
00181 :param args: complete set of field values, in .msg order
00182 :param kwds: use keyword arguments corresponding to message field names
00183 to set specific fields.
00184 """
00185 if args or kwds:
00186 super(ElmoRecorderReadoutResponse, self).__init__(*args, **kwds)
00187
00188 if self.success is None:
00189 self.success = 0
00190 if self.message is None:
00191 self.message = ''
00192 else:
00193 self.success = 0
00194 self.message = ''
00195
00196 def _get_types(self):
00197 """
00198 internal API method
00199 """
00200 return self._slot_types
00201
00202 def serialize(self, buff):
00203 """
00204 serialize message into buffer
00205 :param buff: buffer, ``StringIO``
00206 """
00207 try:
00208 buff.write(_struct_q.pack(self.success))
00209 _x = self.message
00210 length = len(_x)
00211 if python3 or type(_x) == unicode:
00212 _x = _x.encode('utf-8')
00213 length = len(_x)
00214 buff.write(struct.pack('<I%ss'%length, length, _x))
00215 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00216 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00217
00218 def deserialize(self, str):
00219 """
00220 unpack serialized message in str into this message instance
00221 :param str: byte array of serialized message, ``str``
00222 """
00223 try:
00224 end = 0
00225 start = end
00226 end += 8
00227 (self.success,) = _struct_q.unpack(str[start:end])
00228 start = end
00229 end += 4
00230 (length,) = _struct_I.unpack(str[start:end])
00231 start = end
00232 end += length
00233 if python3:
00234 self.message = str[start:end].decode('utf-8')
00235 else:
00236 self.message = str[start:end]
00237 return self
00238 except struct.error as e:
00239 raise genpy.DeserializationError(e)
00240
00241
00242 def serialize_numpy(self, buff, numpy):
00243 """
00244 serialize message with numpy array types into buffer
00245 :param buff: buffer, ``StringIO``
00246 :param numpy: numpy python module
00247 """
00248 try:
00249 buff.write(_struct_q.pack(self.success))
00250 _x = self.message
00251 length = len(_x)
00252 if python3 or type(_x) == unicode:
00253 _x = _x.encode('utf-8')
00254 length = len(_x)
00255 buff.write(struct.pack('<I%ss'%length, length, _x))
00256 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00257 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00258
00259 def deserialize_numpy(self, str, numpy):
00260 """
00261 unpack serialized message in str into this message instance using numpy for array types
00262 :param str: byte array of serialized message, ``str``
00263 :param numpy: numpy python module
00264 """
00265 try:
00266 end = 0
00267 start = end
00268 end += 8
00269 (self.success,) = _struct_q.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 if python3:
00276 self.message = str[start:end].decode('utf-8')
00277 else:
00278 self.message = str[start:end]
00279 return self
00280 except struct.error as e:
00281 raise genpy.DeserializationError(e)
00282
00283 _struct_I = genpy.struct_I
00284 _struct_q = struct.Struct("<q")
00285 class ElmoRecorderReadout(object):
00286 _type = 'cob_base_drive_chain/ElmoRecorderReadout'
00287 _md5sum = '58d03a96e0b56a380d625c18335fb081'
00288 _request_class = ElmoRecorderReadoutRequest
00289 _response_class = ElmoRecorderReadoutResponse