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