$search
00001 """autogenerated by genmsg_py from GNSSChannelStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GNSSChannelStatus(roslib.message.Message): 00007 _md5sum = "e704e6e58bbc7d5b1e03c4dc44b6ebbf" 00008 _type = "applanix_msgs/GNSSChannelStatus" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """uint16 sv_prn 00011 00012 uint16 STATUS_L1_IDLE=0 00013 uint16 STATUS_L1_ACQUISITION=1 00014 uint16 STATUS_L1_CODE_LOCK=3 00015 uint16 STATUS_L1_PHASE_LOCK=5 00016 uint16 STATUS_L2_IDLE=6 00017 uint16 STATUS_L2_ACQUISITION=8 00018 uint16 STATUS_L2_CODE_LOCK=9 00019 uint16 STATUS_L2_PHASE_LOCK=11 00020 uint16 status 00021 00022 float32 sv_azimuth 00023 float32 sv_elevation 00024 float32 sv_l1_snr 00025 float32 sv_l2_snr 00026 00027 """ 00028 # Pseudo-constants 00029 STATUS_L1_IDLE = 0 00030 STATUS_L1_ACQUISITION = 1 00031 STATUS_L1_CODE_LOCK = 3 00032 STATUS_L1_PHASE_LOCK = 5 00033 STATUS_L2_IDLE = 6 00034 STATUS_L2_ACQUISITION = 8 00035 STATUS_L2_CODE_LOCK = 9 00036 STATUS_L2_PHASE_LOCK = 11 00037 00038 __slots__ = ['sv_prn','status','sv_azimuth','sv_elevation','sv_l1_snr','sv_l2_snr'] 00039 _slot_types = ['uint16','uint16','float32','float32','float32','float32'] 00040 00041 def __init__(self, *args, **kwds): 00042 """ 00043 Constructor. Any message fields that are implicitly/explicitly 00044 set to None will be assigned a default value. The recommend 00045 use is keyword arguments as this is more robust to future message 00046 changes. You cannot mix in-order arguments and keyword arguments. 00047 00048 The available fields are: 00049 sv_prn,status,sv_azimuth,sv_elevation,sv_l1_snr,sv_l2_snr 00050 00051 @param args: complete set of field values, in .msg order 00052 @param kwds: use keyword arguments corresponding to message field names 00053 to set specific fields. 00054 """ 00055 if args or kwds: 00056 super(GNSSChannelStatus, self).__init__(*args, **kwds) 00057 #message fields cannot be None, assign default values for those that are 00058 if self.sv_prn is None: 00059 self.sv_prn = 0 00060 if self.status is None: 00061 self.status = 0 00062 if self.sv_azimuth is None: 00063 self.sv_azimuth = 0. 00064 if self.sv_elevation is None: 00065 self.sv_elevation = 0. 00066 if self.sv_l1_snr is None: 00067 self.sv_l1_snr = 0. 00068 if self.sv_l2_snr is None: 00069 self.sv_l2_snr = 0. 00070 else: 00071 self.sv_prn = 0 00072 self.status = 0 00073 self.sv_azimuth = 0. 00074 self.sv_elevation = 0. 00075 self.sv_l1_snr = 0. 00076 self.sv_l2_snr = 0. 00077 00078 def _get_types(self): 00079 """ 00080 internal API method 00081 """ 00082 return self._slot_types 00083 00084 def serialize(self, buff): 00085 """ 00086 serialize message into buffer 00087 @param buff: buffer 00088 @type buff: StringIO 00089 """ 00090 try: 00091 _x = self 00092 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 00093 except struct.error as se: self._check_types(se) 00094 except TypeError as te: self._check_types(te) 00095 00096 def deserialize(self, str): 00097 """ 00098 unpack serialized message in str into this message instance 00099 @param str: byte array of serialized message 00100 @type str: str 00101 """ 00102 try: 00103 end = 0 00104 _x = self 00105 start = end 00106 end += 20 00107 (_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr,) = _struct_2H4f.unpack(str[start:end]) 00108 return self 00109 except struct.error as e: 00110 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00111 00112 00113 def serialize_numpy(self, buff, numpy): 00114 """ 00115 serialize message with numpy array types into buffer 00116 @param buff: buffer 00117 @type buff: StringIO 00118 @param numpy: numpy python module 00119 @type numpy module 00120 """ 00121 try: 00122 _x = self 00123 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 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 00131 @type str: str 00132 @param numpy: numpy python module 00133 @type numpy: module 00134 """ 00135 try: 00136 end = 0 00137 _x = self 00138 start = end 00139 end += 20 00140 (_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr,) = _struct_2H4f.unpack(str[start:end]) 00141 return self 00142 except struct.error as e: 00143 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00144 00145 _struct_I = roslib.message.struct_I 00146 _struct_2H4f = struct.Struct("<2H4f")