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