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