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