_thermo_info.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openni_cam/thermo_info.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 thermo_info(genpy.Message):
00010   _md5sum = "431cd650b658dc748ebe16455d4d7643"
00011   _type = "openni_cam/thermo_info"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """#Information from the thermo camera, other than the temperature matrix
00014 #
00015 Header header
00016 #
00017 # camera serial number
00018 uint32 serial
00019 #
00020 # min and max observed temperature
00021 float32 t_min
00022 float32 t_max
00023 #
00024 # other camera temperature sensors
00025 float32 t_chip
00026 float32 t_flag
00027 float32 t_box
00028 #
00029 ================================================================================
00030 MSG: std_msgs/Header
00031 # Standard metadata for higher-level stamped data types.
00032 # This is generally used to communicate timestamped data 
00033 # in a particular coordinate frame.
00034 # 
00035 # sequence ID: consecutively increasing ID 
00036 uint32 seq
00037 #Two-integer timestamp that is expressed as:
00038 # * stamp.secs: seconds (stamp_secs) since epoch
00039 # * stamp.nsecs: nanoseconds since stamp_secs
00040 # time-handling sugar is provided by the client library
00041 time stamp
00042 #Frame this data is associated with
00043 # 0: no frame
00044 # 1: global frame
00045 string frame_id
00046 
00047 """
00048   __slots__ = ['header','serial','t_min','t_max','t_chip','t_flag','t_box']
00049   _slot_types = ['std_msgs/Header','uint32','float32','float32','float32','float32','float32']
00050 
00051   def __init__(self, *args, **kwds):
00052     """
00053     Constructor. Any message fields that are implicitly/explicitly
00054     set to None will be assigned a default value. The recommend
00055     use is keyword arguments as this is more robust to future message
00056     changes.  You cannot mix in-order arguments and keyword arguments.
00057 
00058     The available fields are:
00059        header,serial,t_min,t_max,t_chip,t_flag,t_box
00060 
00061     :param args: complete set of field values, in .msg order
00062     :param kwds: use keyword arguments corresponding to message field names
00063     to set specific fields.
00064     """
00065     if args or kwds:
00066       super(thermo_info, self).__init__(*args, **kwds)
00067       #message fields cannot be None, assign default values for those that are
00068       if self.header is None:
00069         self.header = std_msgs.msg.Header()
00070       if self.serial is None:
00071         self.serial = 0
00072       if self.t_min is None:
00073         self.t_min = 0.
00074       if self.t_max is None:
00075         self.t_max = 0.
00076       if self.t_chip is None:
00077         self.t_chip = 0.
00078       if self.t_flag is None:
00079         self.t_flag = 0.
00080       if self.t_box is None:
00081         self.t_box = 0.
00082     else:
00083       self.header = std_msgs.msg.Header()
00084       self.serial = 0
00085       self.t_min = 0.
00086       self.t_max = 0.
00087       self.t_chip = 0.
00088       self.t_flag = 0.
00089       self.t_box = 0.
00090 
00091   def _get_types(self):
00092     """
00093     internal API method
00094     """
00095     return self._slot_types
00096 
00097   def serialize(self, buff):
00098     """
00099     serialize message into buffer
00100     :param buff: buffer, ``StringIO``
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00105       _x = self.header.frame_id
00106       length = len(_x)
00107       if python3 or type(_x) == unicode:
00108         _x = _x.encode('utf-8')
00109         length = len(_x)
00110       buff.write(struct.pack('<I%ss'%length, length, _x))
00111       _x = self
00112       buff.write(_struct_I5f.pack(_x.serial, _x.t_min, _x.t_max, _x.t_chip, _x.t_flag, _x.t_box))
00113     except struct.error as se: self._check_types(se)
00114     except TypeError as te: self._check_types(te)
00115 
00116   def deserialize(self, str):
00117     """
00118     unpack serialized message in str into this message instance
00119     :param str: byte array of serialized message, ``str``
00120     """
00121     try:
00122       if self.header is None:
00123         self.header = std_msgs.msg.Header()
00124       end = 0
00125       _x = self
00126       start = end
00127       end += 12
00128       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00129       start = end
00130       end += 4
00131       (length,) = _struct_I.unpack(str[start:end])
00132       start = end
00133       end += length
00134       if python3:
00135         self.header.frame_id = str[start:end].decode('utf-8')
00136       else:
00137         self.header.frame_id = str[start:end]
00138       _x = self
00139       start = end
00140       end += 24
00141       (_x.serial, _x.t_min, _x.t_max, _x.t_chip, _x.t_flag, _x.t_box,) = _struct_I5f.unpack(str[start:end])
00142       return self
00143     except struct.error as e:
00144       raise genpy.DeserializationError(e) #most likely buffer underfill
00145 
00146 
00147   def serialize_numpy(self, buff, numpy):
00148     """
00149     serialize message with numpy array types into buffer
00150     :param buff: buffer, ``StringIO``
00151     :param numpy: numpy python module
00152     """
00153     try:
00154       _x = self
00155       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00156       _x = self.header.frame_id
00157       length = len(_x)
00158       if python3 or type(_x) == unicode:
00159         _x = _x.encode('utf-8')
00160         length = len(_x)
00161       buff.write(struct.pack('<I%ss'%length, length, _x))
00162       _x = self
00163       buff.write(_struct_I5f.pack(_x.serial, _x.t_min, _x.t_max, _x.t_chip, _x.t_flag, _x.t_box))
00164     except struct.error as se: self._check_types(se)
00165     except TypeError as te: self._check_types(te)
00166 
00167   def deserialize_numpy(self, str, numpy):
00168     """
00169     unpack serialized message in str into this message instance using numpy for array types
00170     :param str: byte array of serialized message, ``str``
00171     :param numpy: numpy python module
00172     """
00173     try:
00174       if self.header is None:
00175         self.header = std_msgs.msg.Header()
00176       end = 0
00177       _x = self
00178       start = end
00179       end += 12
00180       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       start = end
00185       end += length
00186       if python3:
00187         self.header.frame_id = str[start:end].decode('utf-8')
00188       else:
00189         self.header.frame_id = str[start:end]
00190       _x = self
00191       start = end
00192       end += 24
00193       (_x.serial, _x.t_min, _x.t_max, _x.t_chip, _x.t_flag, _x.t_box,) = _struct_I5f.unpack(str[start:end])
00194       return self
00195     except struct.error as e:
00196       raise genpy.DeserializationError(e) #most likely buffer underfill
00197 
00198 _struct_I = genpy.struct_I
00199 _struct_3I = struct.Struct("<3I")
00200 _struct_I5f = struct.Struct("<I5f")
 All Classes Namespaces Files Functions Variables Typedefs Defines


openni_cam
Author(s): Alexander Shekhovtsov
autogenerated on Sun Dec 1 2013 17:19:20