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