00001 """autogenerated by genpy from ublox_msgs/AidHUI.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 AidHUI(genpy.Message):
00009 _md5sum = "60cd4ce940333cb9b38edd447085ce5c"
00010 _type = "ublox_msgs/AidHUI"
00011 _has_header = False
00012 _full_text = """# AID-HUI (0x0B 0x02)
00013 # GPS Health, UTC and ionosphere parameters
00014 #
00015 # This message contains a health bit mask, UTC time and Klobuchar parameters. For more
00016 # information on these parameters, please see the ICD-GPS-200 documentation.
00017
00018 uint8 CLASS_ID = 11
00019 uint8 MESSAGE_ID = 2
00020
00021 uint32 health # Bitmask, every bit represenst a GPS SV (1-32). If the bit is set the SV is healthy.
00022 float64 utcA0 # UTC - parameter A0
00023 float64 utcA1 # UTC - parameter A1
00024 int32 utcTOW # UTC - reference time of week
00025 int16 utcWNT # UTC - reference week number
00026 int16 utcLS # UTC - time difference due to leap seconds before event
00027 int16 utcWNF # UTC - week number when next leap second event occurs
00028 int16 utcDN # UTC - day of week when next leap second event occurs
00029 int16 utcLSF # UTC - time difference due to leap seconds after event
00030 int16 utcSpare # UTC - Spare to ensure structure is a multiple of 4 bytes
00031 float32 klobA0 #K lobuchar - alpha 0 [s]
00032 float32 klobA1 # Klobuchar - alpha 1 [s/semicircle]
00033 float32 klobA2 # Klobuchar - alpha 2 [s/semicircle^2]
00034 float32 klobA3 # Klobuchar - alpha 3 [s/semicircle^3]
00035 float32 klobB0 #K lobuchar - beta 0 [s]
00036 float32 klobB1 # Klobuchar - beta 1 [s/semicircle]
00037 float32 klobB2 # Klobuchar - beta 2 [s/semicircle^2]
00038 float32 klobB3 # Klobuchar - beta 3 [s/semicircle^3]
00039 uint32 flags # flags
00040 uint32 FLAGS_HEALTH = 1 # Healthmask field in this message is valid
00041 uint32 FLAGS_UTC = 2 # UTC parameter fields in this message are valid
00042 uint32 FLAGS_KLOB = 4 # Klobuchar parameter fields in this message are valid
00043
00044 """
00045
00046 CLASS_ID = 11
00047 MESSAGE_ID = 2
00048 FLAGS_HEALTH = 1
00049 FLAGS_UTC = 2
00050 FLAGS_KLOB = 4
00051
00052 __slots__ = ['health','utcA0','utcA1','utcTOW','utcWNT','utcLS','utcWNF','utcDN','utcLSF','utcSpare','klobA0','klobA1','klobA2','klobA3','klobB0','klobB1','klobB2','klobB3','flags']
00053 _slot_types = ['uint32','float64','float64','int32','int16','int16','int16','int16','int16','int16','float32','float32','float32','float32','float32','float32','float32','float32','uint32']
00054
00055 def __init__(self, *args, **kwds):
00056 """
00057 Constructor. Any message fields that are implicitly/explicitly
00058 set to None will be assigned a default value. The recommend
00059 use is keyword arguments as this is more robust to future message
00060 changes. You cannot mix in-order arguments and keyword arguments.
00061
00062 The available fields are:
00063 health,utcA0,utcA1,utcTOW,utcWNT,utcLS,utcWNF,utcDN,utcLSF,utcSpare,klobA0,klobA1,klobA2,klobA3,klobB0,klobB1,klobB2,klobB3,flags
00064
00065 :param args: complete set of field values, in .msg order
00066 :param kwds: use keyword arguments corresponding to message field names
00067 to set specific fields.
00068 """
00069 if args or kwds:
00070 super(AidHUI, self).__init__(*args, **kwds)
00071
00072 if self.health is None:
00073 self.health = 0
00074 if self.utcA0 is None:
00075 self.utcA0 = 0.
00076 if self.utcA1 is None:
00077 self.utcA1 = 0.
00078 if self.utcTOW is None:
00079 self.utcTOW = 0
00080 if self.utcWNT is None:
00081 self.utcWNT = 0
00082 if self.utcLS is None:
00083 self.utcLS = 0
00084 if self.utcWNF is None:
00085 self.utcWNF = 0
00086 if self.utcDN is None:
00087 self.utcDN = 0
00088 if self.utcLSF is None:
00089 self.utcLSF = 0
00090 if self.utcSpare is None:
00091 self.utcSpare = 0
00092 if self.klobA0 is None:
00093 self.klobA0 = 0.
00094 if self.klobA1 is None:
00095 self.klobA1 = 0.
00096 if self.klobA2 is None:
00097 self.klobA2 = 0.
00098 if self.klobA3 is None:
00099 self.klobA3 = 0.
00100 if self.klobB0 is None:
00101 self.klobB0 = 0.
00102 if self.klobB1 is None:
00103 self.klobB1 = 0.
00104 if self.klobB2 is None:
00105 self.klobB2 = 0.
00106 if self.klobB3 is None:
00107 self.klobB3 = 0.
00108 if self.flags is None:
00109 self.flags = 0
00110 else:
00111 self.health = 0
00112 self.utcA0 = 0.
00113 self.utcA1 = 0.
00114 self.utcTOW = 0
00115 self.utcWNT = 0
00116 self.utcLS = 0
00117 self.utcWNF = 0
00118 self.utcDN = 0
00119 self.utcLSF = 0
00120 self.utcSpare = 0
00121 self.klobA0 = 0.
00122 self.klobA1 = 0.
00123 self.klobA2 = 0.
00124 self.klobA3 = 0.
00125 self.klobB0 = 0.
00126 self.klobB1 = 0.
00127 self.klobB2 = 0.
00128 self.klobB3 = 0.
00129 self.flags = 0
00130
00131 def _get_types(self):
00132 """
00133 internal API method
00134 """
00135 return self._slot_types
00136
00137 def serialize(self, buff):
00138 """
00139 serialize message into buffer
00140 :param buff: buffer, ``StringIO``
00141 """
00142 try:
00143 _x = self
00144 buff.write(_struct_I2di6h8fI.pack(_x.health, _x.utcA0, _x.utcA1, _x.utcTOW, _x.utcWNT, _x.utcLS, _x.utcWNF, _x.utcDN, _x.utcLSF, _x.utcSpare, _x.klobA0, _x.klobA1, _x.klobA2, _x.klobA3, _x.klobB0, _x.klobB1, _x.klobB2, _x.klobB3, _x.flags))
00145 except struct.error as se: self._check_types(se)
00146 except TypeError as te: self._check_types(te)
00147
00148 def deserialize(self, str):
00149 """
00150 unpack serialized message in str into this message instance
00151 :param str: byte array of serialized message, ``str``
00152 """
00153 try:
00154 end = 0
00155 _x = self
00156 start = end
00157 end += 72
00158 (_x.health, _x.utcA0, _x.utcA1, _x.utcTOW, _x.utcWNT, _x.utcLS, _x.utcWNF, _x.utcDN, _x.utcLSF, _x.utcSpare, _x.klobA0, _x.klobA1, _x.klobA2, _x.klobA3, _x.klobB0, _x.klobB1, _x.klobB2, _x.klobB3, _x.flags,) = _struct_I2di6h8fI.unpack(str[start:end])
00159 return self
00160 except struct.error as e:
00161 raise genpy.DeserializationError(e)
00162
00163
00164 def serialize_numpy(self, buff, numpy):
00165 """
00166 serialize message with numpy array types into buffer
00167 :param buff: buffer, ``StringIO``
00168 :param numpy: numpy python module
00169 """
00170 try:
00171 _x = self
00172 buff.write(_struct_I2di6h8fI.pack(_x.health, _x.utcA0, _x.utcA1, _x.utcTOW, _x.utcWNT, _x.utcLS, _x.utcWNF, _x.utcDN, _x.utcLSF, _x.utcSpare, _x.klobA0, _x.klobA1, _x.klobA2, _x.klobA3, _x.klobB0, _x.klobB1, _x.klobB2, _x.klobB3, _x.flags))
00173 except struct.error as se: self._check_types(se)
00174 except TypeError as te: self._check_types(te)
00175
00176 def deserialize_numpy(self, str, numpy):
00177 """
00178 unpack serialized message in str into this message instance using numpy for array types
00179 :param str: byte array of serialized message, ``str``
00180 :param numpy: numpy python module
00181 """
00182 try:
00183 end = 0
00184 _x = self
00185 start = end
00186 end += 72
00187 (_x.health, _x.utcA0, _x.utcA1, _x.utcTOW, _x.utcWNT, _x.utcLS, _x.utcWNF, _x.utcDN, _x.utcLSF, _x.utcSpare, _x.klobA0, _x.klobA1, _x.klobA2, _x.klobA3, _x.klobB0, _x.klobB1, _x.klobB2, _x.klobB3, _x.flags,) = _struct_I2di6h8fI.unpack(str[start:end])
00188 return self
00189 except struct.error as e:
00190 raise genpy.DeserializationError(e)
00191
00192 _struct_I = genpy.struct_I
00193 _struct_I2di6h8fI = struct.Struct("<I2di6h8fI")