_ManualBBEstimationGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_assisted_arm_navigation_msgs/ManualBBEstimationGoal.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 ManualBBEstimationGoal(genpy.Message):
00009   _md5sum = "781df1358f25fcea62d0dad6eece60a9"
00010   _type = "srs_assisted_arm_navigation_msgs/ManualBBEstimationGoal"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 # Action server is implemented in RVIZ plugin which acts as bb_estimator client
00014 # goal
00015 string object_name
00016 bool disable_video # aka useless mode for RVIZ plugin
00017 
00018 """
00019   __slots__ = ['object_name','disable_video']
00020   _slot_types = ['string','bool']
00021 
00022   def __init__(self, *args, **kwds):
00023     """
00024     Constructor. Any message fields that are implicitly/explicitly
00025     set to None will be assigned a default value. The recommend
00026     use is keyword arguments as this is more robust to future message
00027     changes.  You cannot mix in-order arguments and keyword arguments.
00028 
00029     The available fields are:
00030        object_name,disable_video
00031 
00032     :param args: complete set of field values, in .msg order
00033     :param kwds: use keyword arguments corresponding to message field names
00034     to set specific fields.
00035     """
00036     if args or kwds:
00037       super(ManualBBEstimationGoal, self).__init__(*args, **kwds)
00038       #message fields cannot be None, assign default values for those that are
00039       if self.object_name is None:
00040         self.object_name = ''
00041       if self.disable_video is None:
00042         self.disable_video = False
00043     else:
00044       self.object_name = ''
00045       self.disable_video = False
00046 
00047   def _get_types(self):
00048     """
00049     internal API method
00050     """
00051     return self._slot_types
00052 
00053   def serialize(self, buff):
00054     """
00055     serialize message into buffer
00056     :param buff: buffer, ``StringIO``
00057     """
00058     try:
00059       _x = self.object_name
00060       length = len(_x)
00061       if python3 or type(_x) == unicode:
00062         _x = _x.encode('utf-8')
00063         length = len(_x)
00064       buff.write(struct.pack('<I%ss'%length, length, _x))
00065       buff.write(_struct_B.pack(self.disable_video))
00066     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00067     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00068 
00069   def deserialize(self, str):
00070     """
00071     unpack serialized message in str into this message instance
00072     :param str: byte array of serialized message, ``str``
00073     """
00074     try:
00075       end = 0
00076       start = end
00077       end += 4
00078       (length,) = _struct_I.unpack(str[start:end])
00079       start = end
00080       end += length
00081       if python3:
00082         self.object_name = str[start:end].decode('utf-8')
00083       else:
00084         self.object_name = str[start:end]
00085       start = end
00086       end += 1
00087       (self.disable_video,) = _struct_B.unpack(str[start:end])
00088       self.disable_video = bool(self.disable_video)
00089       return self
00090     except struct.error as e:
00091       raise genpy.DeserializationError(e) #most likely buffer underfill
00092 
00093 
00094   def serialize_numpy(self, buff, numpy):
00095     """
00096     serialize message with numpy array types into buffer
00097     :param buff: buffer, ``StringIO``
00098     :param numpy: numpy python module
00099     """
00100     try:
00101       _x = self.object_name
00102       length = len(_x)
00103       if python3 or type(_x) == unicode:
00104         _x = _x.encode('utf-8')
00105         length = len(_x)
00106       buff.write(struct.pack('<I%ss'%length, length, _x))
00107       buff.write(_struct_B.pack(self.disable_video))
00108     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00109     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00110 
00111   def deserialize_numpy(self, str, numpy):
00112     """
00113     unpack serialized message in str into this message instance using numpy for array types
00114     :param str: byte array of serialized message, ``str``
00115     :param numpy: numpy python module
00116     """
00117     try:
00118       end = 0
00119       start = end
00120       end += 4
00121       (length,) = _struct_I.unpack(str[start:end])
00122       start = end
00123       end += length
00124       if python3:
00125         self.object_name = str[start:end].decode('utf-8')
00126       else:
00127         self.object_name = str[start:end]
00128       start = end
00129       end += 1
00130       (self.disable_video,) = _struct_B.unpack(str[start:end])
00131       self.disable_video = bool(self.disable_video)
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 _struct_I = genpy.struct_I
00137 _struct_B = struct.Struct("<B")


srs_assisted_arm_navigation_msgs
Author(s): Zdenek Materna
autogenerated on Mon Oct 6 2014 08:09:35