$search
00001 """autogenerated by genmsg_py from CfgSBAS.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CfgSBAS(roslib.message.Message): 00007 _md5sum = "39af6a94627471fe56e5091b5bd74bf2" 00008 _type = "ublox_msgs/CfgSBAS" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# CFG-SBAS (0x06 0x24) 00011 # SBAS Configuration 00012 # 00013 00014 uint8 CLASS_ID = 6 00015 uint8 MESSAGE_ID = 22 00016 00017 uint8 mode # SBAS Mode 00018 uint8 MODE_ENABLED = 1 # SBAS Enabled (1) / Disabled (0) 00019 uint8 MODE_TEST = 2 # SBAS Testbed: Use data anyhow (1) / Ignore data when in Test Mode (SBAS Msg 0) 00020 00021 uint8 usage # SBAS Usage 00022 uint8 USAGE_RANGE = 1 # Use SBAS GEOs as a ranging source (for navigation) 00023 uint8 USAGE_DIFFCORR = 2 # Use SBAS Differential Corrections 00024 uint8 USAGE_INTEGRITY = 4 # Use SBAS Integrity Information 00025 00026 uint8 maxSBAS # Maximum Number of SBAS prioritized tracking 00027 # channels (valid range: 0 - 3) to use 00028 00029 00030 uint8 scanmode2 # Continuation of scanmode bitmask below 00031 uint32 scanmode1 # Which SBAS PRN numbers to search for (Bitmask) 00032 # If all Bits are set to zero, auto-scan (i.e. all valid 00033 # PRNs) are searched. Every bit corresponds to a PRN number. 00034 00035 """ 00036 # Pseudo-constants 00037 CLASS_ID = 6 00038 MESSAGE_ID = 22 00039 MODE_ENABLED = 1 00040 MODE_TEST = 2 00041 USAGE_RANGE = 1 00042 USAGE_DIFFCORR = 2 00043 USAGE_INTEGRITY = 4 00044 00045 __slots__ = ['mode','usage','maxSBAS','scanmode2','scanmode1'] 00046 _slot_types = ['uint8','uint8','uint8','uint8','uint32'] 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 mode,usage,maxSBAS,scanmode2,scanmode1 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(CfgSBAS, self).__init__(*args, **kwds) 00064 #message fields cannot be None, assign default values for those that are 00065 if self.mode is None: 00066 self.mode = 0 00067 if self.usage is None: 00068 self.usage = 0 00069 if self.maxSBAS is None: 00070 self.maxSBAS = 0 00071 if self.scanmode2 is None: 00072 self.scanmode2 = 0 00073 if self.scanmode1 is None: 00074 self.scanmode1 = 0 00075 else: 00076 self.mode = 0 00077 self.usage = 0 00078 self.maxSBAS = 0 00079 self.scanmode2 = 0 00080 self.scanmode1 = 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 00092 @type buff: StringIO 00093 """ 00094 try: 00095 _x = self 00096 buff.write(_struct_4BI.pack(_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1)) 00097 except struct.error as se: self._check_types(se) 00098 except TypeError as te: self._check_types(te) 00099 00100 def deserialize(self, str): 00101 """ 00102 unpack serialized message in str into this message instance 00103 @param str: byte array of serialized message 00104 @type str: 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 roslib.message.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 00121 @type buff: StringIO 00122 @param numpy: numpy python module 00123 @type numpy module 00124 """ 00125 try: 00126 _x = self 00127 buff.write(_struct_4BI.pack(_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize_numpy(self, str, numpy): 00132 """ 00133 unpack serialized message in str into this message instance using numpy for array types 00134 @param str: byte array of serialized message 00135 @type str: str 00136 @param numpy: numpy python module 00137 @type numpy: module 00138 """ 00139 try: 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 8 00144 (_x.mode, _x.usage, _x.maxSBAS, _x.scanmode2, _x.scanmode1,) = _struct_4BI.unpack(str[start:end]) 00145 return self 00146 except struct.error as e: 00147 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00148 00149 _struct_I = roslib.message.struct_I 00150 _struct_4BI = struct.Struct("<4BI")