_CfgSBAS.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/CfgSBAS.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 CfgSBAS(genpy.Message):
00009   _md5sum = "39af6a94627471fe56e5091b5bd74bf2"
00010   _type = "ublox_msgs/CfgSBAS"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# CFG-SBAS (0x06 0x24)
00013 # SBAS Configuration
00014 #
00015 
00016 uint8 CLASS_ID = 6
00017 uint8 MESSAGE_ID = 22
00018 
00019 uint8 mode              # SBAS Mode
00020 uint8 MODE_ENABLED = 1    # SBAS Enabled (1) / Disabled (0)
00021 uint8 MODE_TEST = 2       # SBAS Testbed: Use data anyhow (1) / Ignore data when in Test Mode (SBAS Msg 0)
00022 
00023 uint8 usage             # SBAS Usage
00024 uint8 USAGE_RANGE = 1     # Use SBAS GEOs as a ranging source (for navigation)
00025 uint8 USAGE_DIFFCORR = 2  # Use SBAS Differential Corrections
00026 uint8 USAGE_INTEGRITY = 4 # Use SBAS Integrity Information
00027 
00028 uint8 maxSBAS           # Maximum Number of SBAS prioritized tracking
00029                         # channels (valid range: 0 - 3) to use
00030 
00031 
00032 uint8 scanmode2         # Continuation of scanmode bitmask below
00033 uint32 scanmode1        # Which SBAS PRN numbers to search for (Bitmask)
00034                         # If all Bits are set to zero, auto-scan (i.e. all valid
00035                         # PRNs) are searched. Every bit corresponds to a PRN number.
00036 
00037 """
00038   # Pseudo-constants
00039   CLASS_ID = 6
00040   MESSAGE_ID = 22
00041   MODE_ENABLED = 1
00042   MODE_TEST = 2
00043   USAGE_RANGE = 1
00044   USAGE_DIFFCORR = 2
00045   USAGE_INTEGRITY = 4
00046 
00047   __slots__ = ['mode','usage','maxSBAS','scanmode2','scanmode1']
00048   _slot_types = ['uint8','uint8','uint8','uint8','uint32']
00049 
00050   def __init__(self, *args, **kwds):
00051     """
00052     Constructor. Any message fields that are implicitly/explicitly
00053     set to None will be assigned a default value. The recommend
00054     use is keyword arguments as this is more robust to future message
00055     changes.  You cannot mix in-order arguments and keyword arguments.
00056 
00057     The available fields are:
00058        mode,usage,maxSBAS,scanmode2,scanmode1
00059 
00060     :param args: complete set of field values, in .msg order
00061     :param kwds: use keyword arguments corresponding to message field names
00062     to set specific fields.
00063     """
00064     if args or kwds:
00065       super(CfgSBAS, self).__init__(*args, **kwds)
00066       #message fields cannot be None, assign default values for those that are
00067       if self.mode is None:
00068         self.mode = 0
00069       if self.usage is None:
00070         self.usage = 0
00071       if self.maxSBAS is None:
00072         self.maxSBAS = 0
00073       if self.scanmode2 is None:
00074         self.scanmode2 = 0
00075       if self.scanmode1 is None:
00076         self.scanmode1 = 0
00077     else:
00078       self.mode = 0
00079       self.usage = 0
00080       self.maxSBAS = 0
00081       self.scanmode2 = 0
00082       self.scanmode1 = 0
00083 
00084   def _get_types(self):
00085     """
00086     internal API method
00087     """
00088     return self._slot_types
00089 
00090   def serialize(self, buff):
00091     """
00092     serialize message into buffer
00093     :param buff: buffer, ``StringIO``
00094     """
00095     try:
00096       _x = self
00097       buff.write(_struct_4BI.pack(_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1))
00098     except struct.error as se: self._check_types(se)
00099     except TypeError as te: self._check_types(te)
00100 
00101   def deserialize(self, str):
00102     """
00103     unpack serialized message in str into this message instance
00104     :param str: byte array of serialized message, ``str``
00105     """
00106     try:
00107       end = 0
00108       _x = self
00109       start = end
00110       end += 8
00111       (_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1,) = _struct_4BI.unpack(str[start:end])
00112       return self
00113     except struct.error as e:
00114       raise genpy.DeserializationError(e) #most likely buffer underfill
00115 
00116 
00117   def serialize_numpy(self, buff, numpy):
00118     """
00119     serialize message with numpy array types into buffer
00120     :param buff: buffer, ``StringIO``
00121     :param numpy: numpy python module
00122     """
00123     try:
00124       _x = self
00125       buff.write(_struct_4BI.pack(_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1))
00126     except struct.error as se: self._check_types(se)
00127     except TypeError as te: self._check_types(te)
00128 
00129   def deserialize_numpy(self, str, numpy):
00130     """
00131     unpack serialized message in str into this message instance using numpy for array types
00132     :param str: byte array of serialized message, ``str``
00133     :param numpy: numpy python module
00134     """
00135     try:
00136       end = 0
00137       _x = self
00138       start = end
00139       end += 8
00140       (_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1,) = _struct_4BI.unpack(str[start:end])
00141       return self
00142     except struct.error as e:
00143       raise genpy.DeserializationError(e) #most likely buffer underfill
00144 
00145 _struct_I = genpy.struct_I
00146 _struct_4BI = struct.Struct("<4BI")
 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