_UnloadController.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_mechanism_msgs/UnloadControllerRequest.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 UnloadControllerRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "pr2_mechanism_msgs/UnloadControllerRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 string name
00023 
00024 """
00025   __slots__ = ['name']
00026   _slot_types = ['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        name
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(UnloadControllerRequest, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.name is None:
00046         self.name = ''
00047     else:
00048       self.name = ''
00049 
00050   def _get_types(self):
00051     """
00052     internal API method
00053     """
00054     return self._slot_types
00055 
00056   def serialize(self, buff):
00057     """
00058     serialize message into buffer
00059     :param buff: buffer, ``StringIO``
00060     """
00061     try:
00062       _x = self.name
00063       length = len(_x)
00064       if python3 or type(_x) == unicode:
00065         _x = _x.encode('utf-8')
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, ``str``
00075     """
00076     try:
00077       end = 0
00078       start = end
00079       end += 4
00080       (length,) = _struct_I.unpack(str[start:end])
00081       start = end
00082       end += length
00083       if python3:
00084         self.name = str[start:end].decode('utf-8')
00085       else:
00086         self.name = str[start:end]
00087       return self
00088     except struct.error as e:
00089       raise genpy.DeserializationError(e) #most likely buffer underfill
00090 
00091 
00092   def serialize_numpy(self, buff, numpy):
00093     """
00094     serialize message with numpy array types into buffer
00095     :param buff: buffer, ``StringIO``
00096     :param numpy: numpy python module
00097     """
00098     try:
00099       _x = self.name
00100       length = len(_x)
00101       if python3 or type(_x) == unicode:
00102         _x = _x.encode('utf-8')
00103         length = len(_x)
00104       buff.write(struct.pack('<I%ss'%length, length, _x))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
00107 
00108   def deserialize_numpy(self, str, numpy):
00109     """
00110     unpack serialized message in str into this message instance using numpy for array types
00111     :param str: byte array of serialized message, ``str``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       end = 0
00116       start = end
00117       end += 4
00118       (length,) = _struct_I.unpack(str[start:end])
00119       start = end
00120       end += length
00121       if python3:
00122         self.name = str[start:end].decode('utf-8')
00123       else:
00124         self.name = str[start:end]
00125       return self
00126     except struct.error as e:
00127       raise genpy.DeserializationError(e) #most likely buffer underfill
00128 
00129 _struct_I = genpy.struct_I
00130 """autogenerated by genpy from pr2_mechanism_msgs/UnloadControllerResponse.msg. Do not edit."""
00131 import sys
00132 python3 = True if sys.hexversion > 0x03000000 else False
00133 import genpy
00134 import struct
00135 
00136 
00137 class UnloadControllerResponse(genpy.Message):
00138   _md5sum = "6f6da3883749771fac40d6deb24a8c02"
00139   _type = "pr2_mechanism_msgs/UnloadControllerResponse"
00140   _has_header = False #flag to mark the presence of a Header object
00141   _full_text = """bool ok
00142 
00143 
00144 """
00145   __slots__ = ['ok']
00146   _slot_types = ['bool']
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        ok
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(UnloadControllerResponse, self).__init__(*args, **kwds)
00164       #message fields cannot be None, assign default values for those that are
00165       if self.ok is None:
00166         self.ok = False
00167     else:
00168       self.ok = False
00169 
00170   def _get_types(self):
00171     """
00172     internal API method
00173     """
00174     return self._slot_types
00175 
00176   def serialize(self, buff):
00177     """
00178     serialize message into buffer
00179     :param buff: buffer, ``StringIO``
00180     """
00181     try:
00182       buff.write(_struct_B.pack(self.ok))
00183     except struct.error as se: self._check_types(se)
00184     except TypeError as te: self._check_types(te)
00185 
00186   def deserialize(self, str):
00187     """
00188     unpack serialized message in str into this message instance
00189     :param str: byte array of serialized message, ``str``
00190     """
00191     try:
00192       end = 0
00193       start = end
00194       end += 1
00195       (self.ok,) = _struct_B.unpack(str[start:end])
00196       self.ok = bool(self.ok)
00197       return self
00198     except struct.error as e:
00199       raise genpy.DeserializationError(e) #most likely buffer underfill
00200 
00201 
00202   def serialize_numpy(self, buff, numpy):
00203     """
00204     serialize message with numpy array types into buffer
00205     :param buff: buffer, ``StringIO``
00206     :param numpy: numpy python module
00207     """
00208     try:
00209       buff.write(_struct_B.pack(self.ok))
00210     except struct.error as se: self._check_types(se)
00211     except TypeError as te: self._check_types(te)
00212 
00213   def deserialize_numpy(self, str, numpy):
00214     """
00215     unpack serialized message in str into this message instance using numpy for array types
00216     :param str: byte array of serialized message, ``str``
00217     :param numpy: numpy python module
00218     """
00219     try:
00220       end = 0
00221       start = end
00222       end += 1
00223       (self.ok,) = _struct_B.unpack(str[start:end])
00224       self.ok = bool(self.ok)
00225       return self
00226     except struct.error as e:
00227       raise genpy.DeserializationError(e) #most likely buffer underfill
00228 
00229 _struct_I = genpy.struct_I
00230 _struct_B = struct.Struct("<B")
00231 class UnloadController(object):
00232   _type          = 'pr2_mechanism_msgs/UnloadController'
00233   _md5sum = '647e5c54b8d6468952d8d31f1efe96c0'
00234   _request_class  = UnloadControllerRequest
00235   _response_class = UnloadControllerResponse
 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