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