$search
00001 """autogenerated by genmsg_py from bmp085_measurement.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class bmp085_measurement(roslib.message.Message): 00008 _md5sum = "e46f06afb39aba894bcfac63fab0dcc3" 00009 _type = "bmp085/bmp085_measurement" 00010 _has_header = True #flag to mark the presence of a Header object 00011 _full_text = """Header header 00012 bool is_connected 00013 float32 temperature 00014 float32 pressure 00015 00016 ================================================================================ 00017 MSG: std_msgs/Header 00018 # Standard metadata for higher-level stamped data types. 00019 # This is generally used to communicate timestamped data 00020 # in a particular coordinate frame. 00021 # 00022 # sequence ID: consecutively increasing ID 00023 uint32 seq 00024 #Two-integer timestamp that is expressed as: 00025 # * stamp.secs: seconds (stamp_secs) since epoch 00026 # * stamp.nsecs: nanoseconds since stamp_secs 00027 # time-handling sugar is provided by the client library 00028 time stamp 00029 #Frame this data is associated with 00030 # 0: no frame 00031 # 1: global frame 00032 string frame_id 00033 00034 """ 00035 __slots__ = ['header','is_connected','temperature','pressure'] 00036 _slot_types = ['Header','bool','float32','float32'] 00037 00038 def __init__(self, *args, **kwds): 00039 """ 00040 Constructor. Any message fields that are implicitly/explicitly 00041 set to None will be assigned a default value. The recommend 00042 use is keyword arguments as this is more robust to future message 00043 changes. You cannot mix in-order arguments and keyword arguments. 00044 00045 The available fields are: 00046 header,is_connected,temperature,pressure 00047 00048 @param args: complete set of field values, in .msg order 00049 @param kwds: use keyword arguments corresponding to message field names 00050 to set specific fields. 00051 """ 00052 if args or kwds: 00053 super(bmp085_measurement, self).__init__(*args, **kwds) 00054 #message fields cannot be None, assign default values for those that are 00055 if self.header is None: 00056 self.header = std_msgs.msg._Header.Header() 00057 if self.is_connected is None: 00058 self.is_connected = False 00059 if self.temperature is None: 00060 self.temperature = 0. 00061 if self.pressure is None: 00062 self.pressure = 0. 00063 else: 00064 self.header = std_msgs.msg._Header.Header() 00065 self.is_connected = False 00066 self.temperature = 0. 00067 self.pressure = 0. 00068 00069 def _get_types(self): 00070 """ 00071 internal API method 00072 """ 00073 return self._slot_types 00074 00075 def serialize(self, buff): 00076 """ 00077 serialize message into buffer 00078 @param buff: buffer 00079 @type buff: StringIO 00080 """ 00081 try: 00082 _x = self 00083 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00084 _x = self.header.frame_id 00085 length = len(_x) 00086 buff.write(struct.pack('<I%ss'%length, length, _x)) 00087 _x = self 00088 buff.write(_struct_B2f.pack(_x.is_connected, _x.temperature, _x.pressure)) 00089 except struct.error as se: self._check_types(se) 00090 except TypeError as te: self._check_types(te) 00091 00092 def deserialize(self, str): 00093 """ 00094 unpack serialized message in str into this message instance 00095 @param str: byte array of serialized message 00096 @type str: str 00097 """ 00098 try: 00099 if self.header is None: 00100 self.header = std_msgs.msg._Header.Header() 00101 end = 0 00102 _x = self 00103 start = end 00104 end += 12 00105 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00106 start = end 00107 end += 4 00108 (length,) = _struct_I.unpack(str[start:end]) 00109 start = end 00110 end += length 00111 self.header.frame_id = str[start:end] 00112 _x = self 00113 start = end 00114 end += 9 00115 (_x.is_connected, _x.temperature, _x.pressure,) = _struct_B2f.unpack(str[start:end]) 00116 self.is_connected = bool(self.is_connected) 00117 return self 00118 except struct.error as e: 00119 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00120 00121 00122 def serialize_numpy(self, buff, numpy): 00123 """ 00124 serialize message with numpy array types into buffer 00125 @param buff: buffer 00126 @type buff: StringIO 00127 @param numpy: numpy python module 00128 @type numpy module 00129 """ 00130 try: 00131 _x = self 00132 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00133 _x = self.header.frame_id 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 _x = self 00137 buff.write(_struct_B2f.pack(_x.is_connected, _x.temperature, _x.pressure)) 00138 except struct.error as se: self._check_types(se) 00139 except TypeError as te: self._check_types(te) 00140 00141 def deserialize_numpy(self, str, numpy): 00142 """ 00143 unpack serialized message in str into this message instance using numpy for array types 00144 @param str: byte array of serialized message 00145 @type str: str 00146 @param numpy: numpy python module 00147 @type numpy: module 00148 """ 00149 try: 00150 if self.header is None: 00151 self.header = std_msgs.msg._Header.Header() 00152 end = 0 00153 _x = self 00154 start = end 00155 end += 12 00156 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00157 start = end 00158 end += 4 00159 (length,) = _struct_I.unpack(str[start:end]) 00160 start = end 00161 end += length 00162 self.header.frame_id = str[start:end] 00163 _x = self 00164 start = end 00165 end += 9 00166 (_x.is_connected, _x.temperature, _x.pressure,) = _struct_B2f.unpack(str[start:end]) 00167 self.is_connected = bool(self.is_connected) 00168 return self 00169 except struct.error as e: 00170 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00171 00172 _struct_I = roslib.message.struct_I 00173 _struct_B2f = struct.Struct("<B2f") 00174 _struct_3I = struct.Struct("<3I")