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