_RxmSVSI_SV.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/RxmSVSI_SV.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 RxmSVSI_SV(genpy.Message):
00009   _md5sum = "b58fccf5178b8e0d3921f5737e017cc6"
00010   _type = "ublox_msgs/RxmSVSI_SV"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# see message RxmSVSI
00013 #
00014 
00015 uint8 svid            # Satellite ID
00016 
00017 uint8 svFlag          # Information Flags
00018 uint8 FLAG_URA_MASK = 15      # Figure of Merit (URA) range 0..15
00019 uint8 FLAG_HEALTHY = 16       # SV healthy flag
00020 uint8 FLAG_EPH_VAL = 32       # Ephemeris valid
00021 uint8 FLAG_ALM_VAL = 64       # Almanach valid
00022 uint8 FLAG_NOT_AVAIL = 128    # SV not available
00023 
00024 int16 azi             # Azimuth
00025 int8 elev             # Elevation
00026 
00027 uint8 age             # Age of Almanach and Ephemeris
00028 uint8 AGE_ALM_MASK = 15       # Age of ALM in days offset by 4
00029                               # i.e. the reference time may be in the future:
00030                               # ageOfAlm = (age & 0x0f) - 4
00031 uint8 AGE_EPH_MASK = 240      # Age of EPH in hours offset by 4.
00032                               # i.e. the reference time may be in the future:
00033                               # ageOfEph = ((age & 0xf0) >> 4) - 4
00034 
00035 """
00036   # Pseudo-constants
00037   FLAG_URA_MASK = 15
00038   FLAG_HEALTHY = 16
00039   FLAG_EPH_VAL = 32
00040   FLAG_ALM_VAL = 64
00041   FLAG_NOT_AVAIL = 128
00042   AGE_ALM_MASK = 15
00043   AGE_EPH_MASK = 240
00044 
00045   __slots__ = ['svid','svFlag','azi','elev','age']
00046   _slot_types = ['uint8','uint8','int16','int8','uint8']
00047 
00048   def __init__(self, *args, **kwds):
00049     """
00050     Constructor. Any message fields that are implicitly/explicitly
00051     set to None will be assigned a default value. The recommend
00052     use is keyword arguments as this is more robust to future message
00053     changes.  You cannot mix in-order arguments and keyword arguments.
00054 
00055     The available fields are:
00056        svid,svFlag,azi,elev,age
00057 
00058     :param args: complete set of field values, in .msg order
00059     :param kwds: use keyword arguments corresponding to message field names
00060     to set specific fields.
00061     """
00062     if args or kwds:
00063       super(RxmSVSI_SV, self).__init__(*args, **kwds)
00064       #message fields cannot be None, assign default values for those that are
00065       if self.svid is None:
00066         self.svid = 0
00067       if self.svFlag is None:
00068         self.svFlag = 0
00069       if self.azi is None:
00070         self.azi = 0
00071       if self.elev is None:
00072         self.elev = 0
00073       if self.age is None:
00074         self.age = 0
00075     else:
00076       self.svid = 0
00077       self.svFlag = 0
00078       self.azi = 0
00079       self.elev = 0
00080       self.age = 0
00081 
00082   def _get_types(self):
00083     """
00084     internal API method
00085     """
00086     return self._slot_types
00087 
00088   def serialize(self, buff):
00089     """
00090     serialize message into buffer
00091     :param buff: buffer, ``StringIO``
00092     """
00093     try:
00094       _x = self
00095       buff.write(_struct_2BhbB.pack(_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age))
00096     except struct.error as se: self._check_types(se)
00097     except TypeError as te: self._check_types(te)
00098 
00099   def deserialize(self, str):
00100     """
00101     unpack serialized message in str into this message instance
00102     :param str: byte array of serialized message, ``str``
00103     """
00104     try:
00105       end = 0
00106       _x = self
00107       start = end
00108       end += 6
00109       (_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age,) = _struct_2BhbB.unpack(str[start:end])
00110       return self
00111     except struct.error as e:
00112       raise genpy.DeserializationError(e) #most likely buffer underfill
00113 
00114 
00115   def serialize_numpy(self, buff, numpy):
00116     """
00117     serialize message with numpy array types into buffer
00118     :param buff: buffer, ``StringIO``
00119     :param numpy: numpy python module
00120     """
00121     try:
00122       _x = self
00123       buff.write(_struct_2BhbB.pack(_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age))
00124     except struct.error as se: self._check_types(se)
00125     except TypeError as te: self._check_types(te)
00126 
00127   def deserialize_numpy(self, str, numpy):
00128     """
00129     unpack serialized message in str into this message instance using numpy for array types
00130     :param str: byte array of serialized message, ``str``
00131     :param numpy: numpy python module
00132     """
00133     try:
00134       end = 0
00135       _x = self
00136       start = end
00137       end += 6
00138       (_x.svid, _x.svFlag, _x.azi, _x.elev, _x.age,) = _struct_2BhbB.unpack(str[start:end])
00139       return self
00140     except struct.error as e:
00141       raise genpy.DeserializationError(e) #most likely buffer underfill
00142 
00143 _struct_I = genpy.struct_I
00144 _struct_2BhbB = struct.Struct("<2BhbB")
 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