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