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