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