00001 """autogenerated by genpy from applanix_msgs/GNSSDGPSChannelStatus.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 GNSSDGPSChannelStatus(genpy.Message):
00009 _md5sum = "8441bd37d9364590ce86273785774816"
00010 _type = "applanix_msgs/GNSSDGPSChannelStatus"
00011 _has_header = False
00012 _full_text = """# Part of Group 25.
00013 # TODO: enums
00014
00015 float64 frequency
00016 uint8 acquisition_mode
00017 uint8 status
00018 uint8 rtcm
00019 uint8 snr
00020 uint8 data_rate
00021 uint8 lock
00022 uint8 dgps_source_auto_switching
00023 uint8 provider
00024
00025
00026 """
00027 __slots__ = ['frequency','acquisition_mode','status','rtcm','snr','data_rate','lock','dgps_source_auto_switching','provider']
00028 _slot_types = ['float64','uint8','uint8','uint8','uint8','uint8','uint8','uint8','uint8']
00029
00030 def __init__(self, *args, **kwds):
00031 """
00032 Constructor. Any message fields that are implicitly/explicitly
00033 set to None will be assigned a default value. The recommend
00034 use is keyword arguments as this is more robust to future message
00035 changes. You cannot mix in-order arguments and keyword arguments.
00036
00037 The available fields are:
00038 frequency,acquisition_mode,status,rtcm,snr,data_rate,lock,dgps_source_auto_switching,provider
00039
00040 :param args: complete set of field values, in .msg order
00041 :param kwds: use keyword arguments corresponding to message field names
00042 to set specific fields.
00043 """
00044 if args or kwds:
00045 super(GNSSDGPSChannelStatus, self).__init__(*args, **kwds)
00046
00047 if self.frequency is None:
00048 self.frequency = 0.
00049 if self.acquisition_mode is None:
00050 self.acquisition_mode = 0
00051 if self.status is None:
00052 self.status = 0
00053 if self.rtcm is None:
00054 self.rtcm = 0
00055 if self.snr is None:
00056 self.snr = 0
00057 if self.data_rate is None:
00058 self.data_rate = 0
00059 if self.lock is None:
00060 self.lock = 0
00061 if self.dgps_source_auto_switching is None:
00062 self.dgps_source_auto_switching = 0
00063 if self.provider is None:
00064 self.provider = 0
00065 else:
00066 self.frequency = 0.
00067 self.acquisition_mode = 0
00068 self.status = 0
00069 self.rtcm = 0
00070 self.snr = 0
00071 self.data_rate = 0
00072 self.lock = 0
00073 self.dgps_source_auto_switching = 0
00074 self.provider = 0
00075
00076 def _get_types(self):
00077 """
00078 internal API method
00079 """
00080 return self._slot_types
00081
00082 def serialize(self, buff):
00083 """
00084 serialize message into buffer
00085 :param buff: buffer, ``StringIO``
00086 """
00087 try:
00088 _x = self
00089 buff.write(_struct_d8B.pack(_x.frequency, _x.acquisition_mode, _x.status, _x.rtcm, _x.snr, _x.data_rate, _x.lock, _x.dgps_source_auto_switching, _x.provider))
00090 except struct.error as se: self._check_types(se)
00091 except TypeError as te: self._check_types(te)
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 :param str: byte array of serialized message, ``str``
00097 """
00098 try:
00099 end = 0
00100 _x = self
00101 start = end
00102 end += 16
00103 (_x.frequency, _x.acquisition_mode, _x.status, _x.rtcm, _x.snr, _x.data_rate, _x.lock, _x.dgps_source_auto_switching, _x.provider,) = _struct_d8B.unpack(str[start:end])
00104 return self
00105 except struct.error as e:
00106 raise genpy.DeserializationError(e)
00107
00108
00109 def serialize_numpy(self, buff, numpy):
00110 """
00111 serialize message with numpy array types into buffer
00112 :param buff: buffer, ``StringIO``
00113 :param numpy: numpy python module
00114 """
00115 try:
00116 _x = self
00117 buff.write(_struct_d8B.pack(_x.frequency, _x.acquisition_mode, _x.status, _x.rtcm, _x.snr, _x.data_rate, _x.lock, _x.dgps_source_auto_switching, _x.provider))
00118 except struct.error as se: self._check_types(se)
00119 except TypeError as te: self._check_types(te)
00120
00121 def deserialize_numpy(self, str, numpy):
00122 """
00123 unpack serialized message in str into this message instance using numpy for array types
00124 :param str: byte array of serialized message, ``str``
00125 :param numpy: numpy python module
00126 """
00127 try:
00128 end = 0
00129 _x = self
00130 start = end
00131 end += 16
00132 (_x.frequency, _x.acquisition_mode, _x.status, _x.rtcm, _x.snr, _x.data_rate, _x.lock, _x.dgps_source_auto_switching, _x.provider,) = _struct_d8B.unpack(str[start:end])
00133 return self
00134 except struct.error as e:
00135 raise genpy.DeserializationError(e)
00136
00137 _struct_I = genpy.struct_I
00138 _struct_d8B = struct.Struct("<d8B")