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


pr2_mechanism_msgs
Author(s): Stuart Glaser sglaser@willowgarage.com, Wim Meeussen
autogenerated on Mon Nov 19 2012 16:39:56