_AidEPH.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/AidEPH.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 AidEPH(genpy.Message):
00009   _md5sum = "796d86b27ebfe497b3a42695f2e69e13"
00010   _type = "ublox_msgs/AidEPH"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# AID-EPH (0x0B 0x31)
00013 # GPS Aiding Ephemeris Input/Output Message
00014 #
00015 # This message is provided considered obsolete, please use AID-EPH instead!
00016 # - SF1D0 to SF3D7 is only sent if ephemeris is available for this SV. If not, the payload may
00017 #   be reduced to 8 Bytes, or all bytes are set to zero, indicating that this SV Number does
00018 #   not have valid ephemeris for the moment. This may happen even if NAV-SVINFO and
00019 #   RXM-SVSI are indicating ephemeris availability as the internal data may not represent the
00020 #   content of an original broadcast ephemeris (or only parts thereof).
00021 # - SF1D0 to SF3D7 contain the 24 words following the Hand-Over Word ( HOW ) from the
00022 #   GPS navigation message, subframes 1 to 3. The Truncated TOW Count is not valid and
00023 #   cannot be used. See IS-GPS-200 for a full description of the contents of the Subframes.
00024 # - In SF1D0 to SF3D7, the parity bits have been removed, and the 24 bits of data are
00025 #   located in Bits 0 to 23. Bits 24 to 31 shall be ignored.
00026 # - When polled, the data contained in this message does not represent the full original
00027 #   ephemeris broadcast. Some fields that are irrelevant to u-blox receivers may be missing.
00028 #   The week number in Subframe 1 has already been modified to match the Time Of
00029 #   Ephemeris (TOE).
00030 
00031 uint8 CLASS_ID = 11
00032 uint8 MESSAGE_ID = 49
00033 
00034 uint32 svid             # SV ID for which this ephemeris data is (Valid Range: 1 .. 32).
00035 uint32 how              # Hand-Over Word of first Subframe. This is
00036                         # required if data is sent to the receiver.
00037                         # 0 indicates that no Ephemeris Data is following.
00038 
00039 # Start of optional block
00040 uint32[] sf1d          # Subframe 1 Words 3..10 (SF1D0..SF1D7)
00041 uint32[] sf2d          # Subframe 2 Words 3..10 (SF2D0..SF2D7)
00042 uint32[] sf3d          # Subframe 3 Words 3..10 (SF3D0..SF3D7)
00043 # End of optional block
00044 
00045 """
00046   # Pseudo-constants
00047   CLASS_ID = 11
00048   MESSAGE_ID = 49
00049 
00050   __slots__ = ['svid','how','sf1d','sf2d','sf3d']
00051   _slot_types = ['uint32','uint32','uint32[]','uint32[]','uint32[]']
00052 
00053   def __init__(self, *args, **kwds):
00054     """
00055     Constructor. Any message fields that are implicitly/explicitly
00056     set to None will be assigned a default value. The recommend
00057     use is keyword arguments as this is more robust to future message
00058     changes.  You cannot mix in-order arguments and keyword arguments.
00059 
00060     The available fields are:
00061        svid,how,sf1d,sf2d,sf3d
00062 
00063     :param args: complete set of field values, in .msg order
00064     :param kwds: use keyword arguments corresponding to message field names
00065     to set specific fields.
00066     """
00067     if args or kwds:
00068       super(AidEPH, self).__init__(*args, **kwds)
00069       #message fields cannot be None, assign default values for those that are
00070       if self.svid is None:
00071         self.svid = 0
00072       if self.how is None:
00073         self.how = 0
00074       if self.sf1d is None:
00075         self.sf1d = []
00076       if self.sf2d is None:
00077         self.sf2d = []
00078       if self.sf3d is None:
00079         self.sf3d = []
00080     else:
00081       self.svid = 0
00082       self.how = 0
00083       self.sf1d = []
00084       self.sf2d = []
00085       self.sf3d = []
00086 
00087   def _get_types(self):
00088     """
00089     internal API method
00090     """
00091     return self._slot_types
00092 
00093   def serialize(self, buff):
00094     """
00095     serialize message into buffer
00096     :param buff: buffer, ``StringIO``
00097     """
00098     try:
00099       _x = self
00100       buff.write(_struct_2I.pack(_x.svid, _x.how))
00101       length = len(self.sf1d)
00102       buff.write(_struct_I.pack(length))
00103       pattern = '<%sI'%length
00104       buff.write(struct.pack(pattern, *self.sf1d))
00105       length = len(self.sf2d)
00106       buff.write(_struct_I.pack(length))
00107       pattern = '<%sI'%length
00108       buff.write(struct.pack(pattern, *self.sf2d))
00109       length = len(self.sf3d)
00110       buff.write(_struct_I.pack(length))
00111       pattern = '<%sI'%length
00112       buff.write(struct.pack(pattern, *self.sf3d))
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       end = 0
00123       _x = self
00124       start = end
00125       end += 8
00126       (_x.svid, _x.how,) = _struct_2I.unpack(str[start:end])
00127       start = end
00128       end += 4
00129       (length,) = _struct_I.unpack(str[start:end])
00130       pattern = '<%sI'%length
00131       start = end
00132       end += struct.calcsize(pattern)
00133       self.sf1d = struct.unpack(pattern, str[start:end])
00134       start = end
00135       end += 4
00136       (length,) = _struct_I.unpack(str[start:end])
00137       pattern = '<%sI'%length
00138       start = end
00139       end += struct.calcsize(pattern)
00140       self.sf2d = struct.unpack(pattern, str[start:end])
00141       start = end
00142       end += 4
00143       (length,) = _struct_I.unpack(str[start:end])
00144       pattern = '<%sI'%length
00145       start = end
00146       end += struct.calcsize(pattern)
00147       self.sf3d = struct.unpack(pattern, str[start:end])
00148       return self
00149     except struct.error as e:
00150       raise genpy.DeserializationError(e) #most likely buffer underfill
00151 
00152 
00153   def serialize_numpy(self, buff, numpy):
00154     """
00155     serialize message with numpy array types into buffer
00156     :param buff: buffer, ``StringIO``
00157     :param numpy: numpy python module
00158     """
00159     try:
00160       _x = self
00161       buff.write(_struct_2I.pack(_x.svid, _x.how))
00162       length = len(self.sf1d)
00163       buff.write(_struct_I.pack(length))
00164       pattern = '<%sI'%length
00165       buff.write(self.sf1d.tostring())
00166       length = len(self.sf2d)
00167       buff.write(_struct_I.pack(length))
00168       pattern = '<%sI'%length
00169       buff.write(self.sf2d.tostring())
00170       length = len(self.sf3d)
00171       buff.write(_struct_I.pack(length))
00172       pattern = '<%sI'%length
00173       buff.write(self.sf3d.tostring())
00174     except struct.error as se: self._check_types(se)
00175     except TypeError as te: self._check_types(te)
00176 
00177   def deserialize_numpy(self, str, numpy):
00178     """
00179     unpack serialized message in str into this message instance using numpy for array types
00180     :param str: byte array of serialized message, ``str``
00181     :param numpy: numpy python module
00182     """
00183     try:
00184       end = 0
00185       _x = self
00186       start = end
00187       end += 8
00188       (_x.svid, _x.how,) = _struct_2I.unpack(str[start:end])
00189       start = end
00190       end += 4
00191       (length,) = _struct_I.unpack(str[start:end])
00192       pattern = '<%sI'%length
00193       start = end
00194       end += struct.calcsize(pattern)
00195       self.sf1d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00196       start = end
00197       end += 4
00198       (length,) = _struct_I.unpack(str[start:end])
00199       pattern = '<%sI'%length
00200       start = end
00201       end += struct.calcsize(pattern)
00202       self.sf2d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00203       start = end
00204       end += 4
00205       (length,) = _struct_I.unpack(str[start:end])
00206       pattern = '<%sI'%length
00207       start = end
00208       end += struct.calcsize(pattern)
00209       self.sf3d = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00210       return self
00211     except struct.error as e:
00212       raise genpy.DeserializationError(e) #most likely buffer underfill
00213 
00214 _struct_I = genpy.struct_I
00215 _struct_2I = struct.Struct("<2I")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


ublox_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:55:23