_GNSSChannelStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from applanix_msgs/GNSSChannelStatus.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 GNSSChannelStatus(genpy.Message):
00009   _md5sum = "e704e6e58bbc7d5b1e03c4dc44b6ebbf"
00010   _type = "applanix_msgs/GNSSChannelStatus"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """uint16 sv_prn
00013 
00014 uint16 STATUS_L1_IDLE=0
00015 uint16 STATUS_L1_ACQUISITION=1
00016 uint16 STATUS_L1_CODE_LOCK=3
00017 uint16 STATUS_L1_PHASE_LOCK=5
00018 uint16 STATUS_L2_IDLE=6
00019 uint16 STATUS_L2_ACQUISITION=8
00020 uint16 STATUS_L2_CODE_LOCK=9
00021 uint16 STATUS_L2_PHASE_LOCK=11
00022 uint16 status
00023 
00024 float32 sv_azimuth
00025 float32 sv_elevation
00026 float32 sv_l1_snr
00027 float32 sv_l2_snr
00028 
00029 """
00030   # Pseudo-constants
00031   STATUS_L1_IDLE = 0
00032   STATUS_L1_ACQUISITION = 1
00033   STATUS_L1_CODE_LOCK = 3
00034   STATUS_L1_PHASE_LOCK = 5
00035   STATUS_L2_IDLE = 6
00036   STATUS_L2_ACQUISITION = 8
00037   STATUS_L2_CODE_LOCK = 9
00038   STATUS_L2_PHASE_LOCK = 11
00039 
00040   __slots__ = ['sv_prn','status','sv_azimuth','sv_elevation','sv_l1_snr','sv_l2_snr']
00041   _slot_types = ['uint16','uint16','float32','float32','float32','float32']
00042 
00043   def __init__(self, *args, **kwds):
00044     """
00045     Constructor. Any message fields that are implicitly/explicitly
00046     set to None will be assigned a default value. The recommend
00047     use is keyword arguments as this is more robust to future message
00048     changes.  You cannot mix in-order arguments and keyword arguments.
00049 
00050     The available fields are:
00051        sv_prn,status,sv_azimuth,sv_elevation,sv_l1_snr,sv_l2_snr
00052 
00053     :param args: complete set of field values, in .msg order
00054     :param kwds: use keyword arguments corresponding to message field names
00055     to set specific fields.
00056     """
00057     if args or kwds:
00058       super(GNSSChannelStatus, self).__init__(*args, **kwds)
00059       #message fields cannot be None, assign default values for those that are
00060       if self.sv_prn is None:
00061         self.sv_prn = 0
00062       if self.status is None:
00063         self.status = 0
00064       if self.sv_azimuth is None:
00065         self.sv_azimuth = 0.
00066       if self.sv_elevation is None:
00067         self.sv_elevation = 0.
00068       if self.sv_l1_snr is None:
00069         self.sv_l1_snr = 0.
00070       if self.sv_l2_snr is None:
00071         self.sv_l2_snr = 0.
00072     else:
00073       self.sv_prn = 0
00074       self.status = 0
00075       self.sv_azimuth = 0.
00076       self.sv_elevation = 0.
00077       self.sv_l1_snr = 0.
00078       self.sv_l2_snr = 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, ``StringIO``
00090     """
00091     try:
00092       _x = self
00093       buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr))
00094     except struct.error as se: self._check_types(se)
00095     except TypeError as te: self._check_types(te)
00096 
00097   def deserialize(self, str):
00098     """
00099     unpack serialized message in str into this message instance
00100     :param str: byte array of serialized message, ``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 genpy.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, ``StringIO``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       _x = self
00121       buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr))
00122     except struct.error as se: self._check_types(se)
00123     except TypeError as te: self._check_types(te)
00124 
00125   def deserialize_numpy(self, str, numpy):
00126     """
00127     unpack serialized message in str into this message instance using numpy for array types
00128     :param str: byte array of serialized message, ``str``
00129     :param numpy: numpy python module
00130     """
00131     try:
00132       end = 0
00133       _x = self
00134       start = end
00135       end += 20
00136       (_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])
00137       return self
00138     except struct.error as e:
00139       raise genpy.DeserializationError(e) #most likely buffer underfill
00140 
00141 _struct_I = genpy.struct_I
00142 _struct_2H4f = struct.Struct("<2H4f")


applanix_msgs
Author(s): Mike Purvis
autogenerated on Thu Jan 2 2014 11:04:51