_GazeboBenchmarks.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_gazebo_benchmarks/GazeboBenchmarks.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class GazeboBenchmarks(genpy.Message):
00009   _md5sum = "edc3f5a3db68624a17b9366945a951f6"
00010   _type = "pr2_gazebo_benchmarks/GazeboBenchmarks"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float64 max_duration
00013 float64 min_duration
00014 float64 avg_duration
00015 float64 tot_duration
00016 float64 cur_duration
00017 uint32  count
00018 
00019 """
00020   __slots__ = ['max_duration','min_duration','avg_duration','tot_duration','cur_duration','count']
00021   _slot_types = ['float64','float64','float64','float64','float64','uint32']
00022 
00023   def __init__(self, *args, **kwds):
00024     """
00025     Constructor. Any message fields that are implicitly/explicitly
00026     set to None will be assigned a default value. The recommend
00027     use is keyword arguments as this is more robust to future message
00028     changes.  You cannot mix in-order arguments and keyword arguments.
00029 
00030     The available fields are:
00031        max_duration,min_duration,avg_duration,tot_duration,cur_duration,count
00032 
00033     :param args: complete set of field values, in .msg order
00034     :param kwds: use keyword arguments corresponding to message field names
00035     to set specific fields.
00036     """
00037     if args or kwds:
00038       super(GazeboBenchmarks, self).__init__(*args, **kwds)
00039       #message fields cannot be None, assign default values for those that are
00040       if self.max_duration is None:
00041         self.max_duration = 0.
00042       if self.min_duration is None:
00043         self.min_duration = 0.
00044       if self.avg_duration is None:
00045         self.avg_duration = 0.
00046       if self.tot_duration is None:
00047         self.tot_duration = 0.
00048       if self.cur_duration is None:
00049         self.cur_duration = 0.
00050       if self.count is None:
00051         self.count = 0
00052     else:
00053       self.max_duration = 0.
00054       self.min_duration = 0.
00055       self.avg_duration = 0.
00056       self.tot_duration = 0.
00057       self.cur_duration = 0.
00058       self.count = 0
00059 
00060   def _get_types(self):
00061     """
00062     internal API method
00063     """
00064     return self._slot_types
00065 
00066   def serialize(self, buff):
00067     """
00068     serialize message into buffer
00069     :param buff: buffer, ``StringIO``
00070     """
00071     try:
00072       _x = self
00073       buff.write(_struct_5dI.pack(_x.max_duration, _x.min_duration, _x.avg_duration, _x.tot_duration, _x.cur_duration, _x.count))
00074     except struct.error as se: self._check_types(se)
00075     except TypeError as te: self._check_types(te)
00076 
00077   def deserialize(self, str):
00078     """
00079     unpack serialized message in str into this message instance
00080     :param str: byte array of serialized message, ``str``
00081     """
00082     try:
00083       end = 0
00084       _x = self
00085       start = end
00086       end += 44
00087       (_x.max_duration, _x.min_duration, _x.avg_duration, _x.tot_duration, _x.cur_duration, _x.count,) = _struct_5dI.unpack(str[start:end])
00088       return self
00089     except struct.error as e:
00090       raise genpy.DeserializationError(e) #most likely buffer underfill
00091 
00092 
00093   def serialize_numpy(self, buff, numpy):
00094     """
00095     serialize message with numpy array types into buffer
00096     :param buff: buffer, ``StringIO``
00097     :param numpy: numpy python module
00098     """
00099     try:
00100       _x = self
00101       buff.write(_struct_5dI.pack(_x.max_duration, _x.min_duration, _x.avg_duration, _x.tot_duration, _x.cur_duration, _x.count))
00102     except struct.error as se: self._check_types(se)
00103     except TypeError as te: self._check_types(te)
00104 
00105   def deserialize_numpy(self, str, numpy):
00106     """
00107     unpack serialized message in str into this message instance using numpy for array types
00108     :param str: byte array of serialized message, ``str``
00109     :param numpy: numpy python module
00110     """
00111     try:
00112       end = 0
00113       _x = self
00114       start = end
00115       end += 44
00116       (_x.max_duration, _x.min_duration, _x.avg_duration, _x.tot_duration, _x.cur_duration, _x.count,) = _struct_5dI.unpack(str[start:end])
00117       return self
00118     except struct.error as e:
00119       raise genpy.DeserializationError(e) #most likely buffer underfill
00120 
00121 _struct_I = genpy.struct_I
00122 _struct_5dI = struct.Struct("<5dI")


pr2_gazebo_benchmarks
Author(s): John Hsu
autogenerated on Thu Jan 2 2014 11:45:34