_RxmSVSI.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/RxmSVSI.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 ublox_msgs.msg
00008 
00009 class RxmSVSI(genpy.Message):
00010   _md5sum = "98aa3a36683a81726f4382ea8e0b7c1b"
00011   _type = "ublox_msgs/RxmSVSI"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# RXM-SVSI (0x02 0x20)
00014 # SV Status Info
00015 #
00016 # Status of the receiver manager knowledge about GPS Orbit Validity
00017 #
00018 
00019 uint8 CLASS_ID = 2
00020 uint8 MESSAGE_ID = 32
00021 
00022 int32 iTOW              # Measurement integer millisecond GPS time of week [ms]
00023 int16 week              # Measurement GPS week number [weeks]
00024 
00025 uint8 numVis            # Number of visible satellites
00026 uint8 numSV             # Number of per-SV data blocks following
00027 
00028 RxmSVSI_SV[] sv
00029 
00030 ================================================================================
00031 MSG: ublox_msgs/RxmSVSI_SV
00032 # see message RxmSVSI
00033 #
00034 
00035 uint8 svid            # Satellite ID
00036 
00037 uint8 svFlag          # Information Flags
00038 uint8 FLAG_URA_MASK = 15      # Figure of Merit (URA) range 0..15
00039 uint8 FLAG_HEALTHY = 16       # SV healthy flag
00040 uint8 FLAG_EPH_VAL = 32       # Ephemeris valid
00041 uint8 FLAG_ALM_VAL = 64       # Almanach valid
00042 uint8 FLAG_NOT_AVAIL = 128    # SV not available
00043 
00044 int16 azi             # Azimuth
00045 int8 elev             # Elevation
00046 
00047 uint8 age             # Age of Almanach and Ephemeris
00048 uint8 AGE_ALM_MASK = 15       # Age of ALM in days offset by 4
00049                               # i.e. the reference time may be in the future:
00050                               # ageOfAlm = (age & 0x0f) - 4
00051 uint8 AGE_EPH_MASK = 240      # Age of EPH in hours offset by 4.
00052                               # i.e. the reference time may be in the future:
00053                               # ageOfEph = ((age & 0xf0) >> 4) - 4
00054 
00055 """
00056   # Pseudo-constants
00057   CLASS_ID = 2
00058   MESSAGE_ID = 32
00059 
00060   __slots__ = ['iTOW','week','numVis','numSV','sv']
00061   _slot_types = ['int32','int16','uint8','uint8','ublox_msgs/RxmSVSI_SV[]']
00062 
00063   def __init__(self, *args, **kwds):
00064     """
00065     Constructor. Any message fields that are implicitly/explicitly
00066     set to None will be assigned a default value. The recommend
00067     use is keyword arguments as this is more robust to future message
00068     changes.  You cannot mix in-order arguments and keyword arguments.
00069 
00070     The available fields are:
00071        iTOW,week,numVis,numSV,sv
00072 
00073     :param args: complete set of field values, in .msg order
00074     :param kwds: use keyword arguments corresponding to message field names
00075     to set specific fields.
00076     """
00077     if args or kwds:
00078       super(RxmSVSI, self).__init__(*args, **kwds)
00079       #message fields cannot be None, assign default values for those that are
00080       if self.iTOW is None:
00081         self.iTOW = 0
00082       if self.week is None:
00083         self.week = 0
00084       if self.numVis is None:
00085         self.numVis = 0
00086       if self.numSV is None:
00087         self.numSV = 0
00088       if self.sv is None:
00089         self.sv = []
00090     else:
00091       self.iTOW = 0
00092       self.week = 0
00093       self.numVis = 0
00094       self.numSV = 0
00095       self.sv = []
00096 
00097   def _get_types(self):
00098     """
00099     internal API method
00100     """
00101     return self._slot_types
00102 
00103   def serialize(self, buff):
00104     """
00105     serialize message into buffer
00106     :param buff: buffer, ``StringIO``
00107     """
00108     try:
00109       _x = self
00110       buff.write(_struct_ih2B.pack(_x.iTOW, _x.week, _x.numVis, _x.numSV))
00111       length = len(self.sv)
00112       buff.write(_struct_I.pack(length))
00113       for val1 in self.sv:
00114         _x = val1
00115         buff.write(_struct_2BhbB.pack(_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age))
00116     except struct.error as se: self._check_types(se)
00117     except TypeError as te: self._check_types(te)
00118 
00119   def deserialize(self, str):
00120     """
00121     unpack serialized message in str into this message instance
00122     :param str: byte array of serialized message, ``str``
00123     """
00124     try:
00125       if self.sv is None:
00126         self.sv = None
00127       end = 0
00128       _x = self
00129       start = end
00130       end += 8
00131       (_x.iTOW, _x.week, _x.numVis, _x.numSV,) = _struct_ih2B.unpack(str[start:end])
00132       start = end
00133       end += 4
00134       (length,) = _struct_I.unpack(str[start:end])
00135       self.sv = []
00136       for i in range(0, length):
00137         val1 = ublox_msgs.msg.RxmSVSI_SV()
00138         _x = val1
00139         start = end
00140         end += 6
00141         (_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age,) = _struct_2BhbB.unpack(str[start:end])
00142         self.sv.append(val1)
00143       return self
00144     except struct.error as e:
00145       raise genpy.DeserializationError(e) #most likely buffer underfill
00146 
00147 
00148   def serialize_numpy(self, buff, numpy):
00149     """
00150     serialize message with numpy array types into buffer
00151     :param buff: buffer, ``StringIO``
00152     :param numpy: numpy python module
00153     """
00154     try:
00155       _x = self
00156       buff.write(_struct_ih2B.pack(_x.iTOW, _x.week, _x.numVis, _x.numSV))
00157       length = len(self.sv)
00158       buff.write(_struct_I.pack(length))
00159       for val1 in self.sv:
00160         _x = val1
00161         buff.write(_struct_2BhbB.pack(_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age))
00162     except struct.error as se: self._check_types(se)
00163     except TypeError as te: self._check_types(te)
00164 
00165   def deserialize_numpy(self, str, numpy):
00166     """
00167     unpack serialized message in str into this message instance using numpy for array types
00168     :param str: byte array of serialized message, ``str``
00169     :param numpy: numpy python module
00170     """
00171     try:
00172       if self.sv is None:
00173         self.sv = None
00174       end = 0
00175       _x = self
00176       start = end
00177       end += 8
00178       (_x.iTOW, _x.week, _x.numVis, _x.numSV,) = _struct_ih2B.unpack(str[start:end])
00179       start = end
00180       end += 4
00181       (length,) = _struct_I.unpack(str[start:end])
00182       self.sv = []
00183       for i in range(0, length):
00184         val1 = ublox_msgs.msg.RxmSVSI_SV()
00185         _x = val1
00186         start = end
00187         end += 6
00188         (_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age,) = _struct_2BhbB.unpack(str[start:end])
00189         self.sv.append(val1)
00190       return self
00191     except struct.error as e:
00192       raise genpy.DeserializationError(e) #most likely buffer underfill
00193 
00194 _struct_I = genpy.struct_I
00195 _struct_2BhbB = struct.Struct("<2BhbB")
00196 _struct_ih2B = struct.Struct("<ih2B")
 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