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