_pp_status.py
Go to the documentation of this file.
00001 """autogenerated by genpy from vision_msgs/pp_status.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 pp_status(genpy.Message):
00009   _md5sum = "3fae99b8c6b5e7dcd495e396abef123c"
00010   _type = "vision_msgs/pp_status"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """uint64  STARTED = 0
00013 uint64  TERMINATED = 1
00014 uint64  EVALUATED = 2
00015 uint64  DELETABLE = 3
00016 
00017 uint64  perception_primitive
00018 uint64  status
00019 """
00020   # Pseudo-constants
00021   STARTED = 0
00022   TERMINATED = 1
00023   EVALUATED = 2
00024   DELETABLE = 3
00025 
00026   __slots__ = ['perception_primitive','status']
00027   _slot_types = ['uint64','uint64']
00028 
00029   def __init__(self, *args, **kwds):
00030     """
00031     Constructor. Any message fields that are implicitly/explicitly
00032     set to None will be assigned a default value. The recommend
00033     use is keyword arguments as this is more robust to future message
00034     changes.  You cannot mix in-order arguments and keyword arguments.
00035 
00036     The available fields are:
00037        perception_primitive,status
00038 
00039     :param args: complete set of field values, in .msg order
00040     :param kwds: use keyword arguments corresponding to message field names
00041     to set specific fields.
00042     """
00043     if args or kwds:
00044       super(pp_status, self).__init__(*args, **kwds)
00045       #message fields cannot be None, assign default values for those that are
00046       if self.perception_primitive is None:
00047         self.perception_primitive = 0
00048       if self.status is None:
00049         self.status = 0
00050     else:
00051       self.perception_primitive = 0
00052       self.status = 0
00053 
00054   def _get_types(self):
00055     """
00056     internal API method
00057     """
00058     return self._slot_types
00059 
00060   def serialize(self, buff):
00061     """
00062     serialize message into buffer
00063     :param buff: buffer, ``StringIO``
00064     """
00065     try:
00066       _x = self
00067       buff.write(_struct_2Q.pack(_x.perception_primitive, _x.status))
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       _x = self
00079       start = end
00080       end += 16
00081       (_x.perception_primitive, _x.status,) = _struct_2Q.unpack(str[start:end])
00082       return self
00083     except struct.error as e:
00084       raise genpy.DeserializationError(e) #most likely buffer underfill
00085 
00086 
00087   def serialize_numpy(self, buff, numpy):
00088     """
00089     serialize message with numpy array types into buffer
00090     :param buff: buffer, ``StringIO``
00091     :param numpy: numpy python module
00092     """
00093     try:
00094       _x = self
00095       buff.write(_struct_2Q.pack(_x.perception_primitive, _x.status))
00096     except struct.error as se: self._check_types(se)
00097     except TypeError as te: self._check_types(te)
00098 
00099   def deserialize_numpy(self, str, numpy):
00100     """
00101     unpack serialized message in str into this message instance using numpy for array types
00102     :param str: byte array of serialized message, ``str``
00103     :param numpy: numpy python module
00104     """
00105     try:
00106       end = 0
00107       _x = self
00108       start = end
00109       end += 16
00110       (_x.perception_primitive, _x.status,) = _struct_2Q.unpack(str[start:end])
00111       return self
00112     except struct.error as e:
00113       raise genpy.DeserializationError(e) #most likely buffer underfill
00114 
00115 _struct_I = genpy.struct_I
00116 _struct_2Q = struct.Struct("<2Q")


vision_msgs
Author(s): Ulrich F Klank
autogenerated on Thu Jan 2 2014 11:21:43