Go to the documentation of this file.00001 """autogenerated by genpy from rve_msgs/RenderTargetFrameStats.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 rve_msgs.msg
00008
00009 class RenderTargetFrameStats(genpy.Message):
00010 _md5sum = "5a0895fdd149215bc728155ab3857266"
00011 _type = "rve_msgs/RenderTargetFrameStats"
00012 _has_header = False
00013 _full_text = """UUID id
00014
00015 float64 blit_to_main
00016 float64 main_swap
00017
00018 float64 gbuffer_update
00019 float64 gbuffer_swap
00020 ================================================================================
00021 MSG: rve_msgs/UUID
00022 uint8[16] data
00023
00024 """
00025 __slots__ = ['id','blit_to_main','main_swap','gbuffer_update','gbuffer_swap']
00026 _slot_types = ['rve_msgs/UUID','float64','float64','float64','float64']
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 id,blit_to_main,main_swap,gbuffer_update,gbuffer_swap
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(RenderTargetFrameStats, self).__init__(*args, **kwds)
00044
00045 if self.id is None:
00046 self.id = rve_msgs.msg.UUID()
00047 if self.blit_to_main is None:
00048 self.blit_to_main = 0.
00049 if self.main_swap is None:
00050 self.main_swap = 0.
00051 if self.gbuffer_update is None:
00052 self.gbuffer_update = 0.
00053 if self.gbuffer_swap is None:
00054 self.gbuffer_swap = 0.
00055 else:
00056 self.id = rve_msgs.msg.UUID()
00057 self.blit_to_main = 0.
00058 self.main_swap = 0.
00059 self.gbuffer_update = 0.
00060 self.gbuffer_swap = 0.
00061
00062 def _get_types(self):
00063 """
00064 internal API method
00065 """
00066 return self._slot_types
00067
00068 def serialize(self, buff):
00069 """
00070 serialize message into buffer
00071 :param buff: buffer, ``StringIO``
00072 """
00073 try:
00074 _x = self.id.data
00075
00076 if type(_x) in [list, tuple]:
00077 buff.write(_struct_16B.pack(*_x))
00078 else:
00079 buff.write(_struct_16s.pack(_x))
00080 _x = self
00081 buff.write(_struct_4d.pack(_x.blit_to_main, _x.main_swap, _x.gbuffer_update, _x.gbuffer_swap))
00082 except struct.error as se: self._check_types(se)
00083 except TypeError as te: self._check_types(te)
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 :param str: byte array of serialized message, ``str``
00089 """
00090 try:
00091 if self.id is None:
00092 self.id = rve_msgs.msg.UUID()
00093 end = 0
00094 start = end
00095 end += 16
00096 self.id.data = str[start:end]
00097 _x = self
00098 start = end
00099 end += 32
00100 (_x.blit_to_main, _x.main_swap, _x.gbuffer_update, _x.gbuffer_swap,) = _struct_4d.unpack(str[start:end])
00101 return self
00102 except struct.error as e:
00103 raise genpy.DeserializationError(e)
00104
00105
00106 def serialize_numpy(self, buff, numpy):
00107 """
00108 serialize message with numpy array types into buffer
00109 :param buff: buffer, ``StringIO``
00110 :param numpy: numpy python module
00111 """
00112 try:
00113 _x = self.id.data
00114
00115 if type(_x) in [list, tuple]:
00116 buff.write(_struct_16B.pack(*_x))
00117 else:
00118 buff.write(_struct_16s.pack(_x))
00119 _x = self
00120 buff.write(_struct_4d.pack(_x.blit_to_main, _x.main_swap, _x.gbuffer_update, _x.gbuffer_swap))
00121 except struct.error as se: self._check_types(se)
00122 except TypeError as te: self._check_types(te)
00123
00124 def deserialize_numpy(self, str, numpy):
00125 """
00126 unpack serialized message in str into this message instance using numpy for array types
00127 :param str: byte array of serialized message, ``str``
00128 :param numpy: numpy python module
00129 """
00130 try:
00131 if self.id is None:
00132 self.id = rve_msgs.msg.UUID()
00133 end = 0
00134 start = end
00135 end += 16
00136 self.id.data = str[start:end]
00137 _x = self
00138 start = end
00139 end += 32
00140 (_x.blit_to_main, _x.main_swap, _x.gbuffer_update, _x.gbuffer_swap,) = _struct_4d.unpack(str[start:end])
00141 return self
00142 except struct.error as e:
00143 raise genpy.DeserializationError(e)
00144
00145 _struct_I = genpy.struct_I
00146 _struct_4d = struct.Struct("<4d")
00147 _struct_16B = struct.Struct("<16B")
00148 _struct_16s = struct.Struct("<16s")