$search
00001 """autogenerated by genmsg_py from CarveSegmentsResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CarveSegmentsResult(roslib.message.Message): 00007 _md5sum = "9d8061d2347621a6ed88451e28811cc7" 00008 _type = "pr2_dremel_server/CarveSegmentsResult" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 # Define the result 00012 bool complete 00013 00014 00015 """ 00016 __slots__ = ['complete'] 00017 _slot_types = ['bool'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 complete 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(CarveSegmentsResult, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.complete is None: 00037 self.complete = False 00038 else: 00039 self.complete = False 00040 00041 def _get_types(self): 00042 """ 00043 internal API method 00044 """ 00045 return self._slot_types 00046 00047 def serialize(self, buff): 00048 """ 00049 serialize message into buffer 00050 @param buff: buffer 00051 @type buff: StringIO 00052 """ 00053 try: 00054 buff.write(_struct_B.pack(self.complete)) 00055 except struct.error as se: self._check_types(se) 00056 except TypeError as te: self._check_types(te) 00057 00058 def deserialize(self, str): 00059 """ 00060 unpack serialized message in str into this message instance 00061 @param str: byte array of serialized message 00062 @type str: str 00063 """ 00064 try: 00065 end = 0 00066 start = end 00067 end += 1 00068 (self.complete,) = _struct_B.unpack(str[start:end]) 00069 self.complete = bool(self.complete) 00070 return self 00071 except struct.error as e: 00072 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00073 00074 00075 def serialize_numpy(self, buff, numpy): 00076 """ 00077 serialize message with numpy array types into buffer 00078 @param buff: buffer 00079 @type buff: StringIO 00080 @param numpy: numpy python module 00081 @type numpy module 00082 """ 00083 try: 00084 buff.write(_struct_B.pack(self.complete)) 00085 except struct.error as se: self._check_types(se) 00086 except TypeError as te: self._check_types(te) 00087 00088 def deserialize_numpy(self, str, numpy): 00089 """ 00090 unpack serialized message in str into this message instance using numpy for array types 00091 @param str: byte array of serialized message 00092 @type str: str 00093 @param numpy: numpy python module 00094 @type numpy: module 00095 """ 00096 try: 00097 end = 0 00098 start = end 00099 end += 1 00100 (self.complete,) = _struct_B.unpack(str[start:end]) 00101 self.complete = bool(self.complete) 00102 return self 00103 except struct.error as e: 00104 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00105 00106 _struct_I = roslib.message.struct_I 00107 _struct_B = struct.Struct("<B")