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