$search
00001 """autogenerated by genmsg_py from GNSSDGPSStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class GNSSDGPSStatus(roslib.message.Message): 00008 _md5sum = "e2533637a63b63e4d4385cf8f136e39a" 00009 _type = "applanix_msgs/GNSSDGPSStatus" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# Group 25 00012 TimeDistance td 00013 00014 uint8 MODE_MANUAL_GPS=0 00015 uint8 MODE_MANUAL_DGPS=1 00016 uint8 MODE_DIFFERENTIAL_AUTO=2 00017 uint8 MODE_UNKNOWN=3 00018 uint8 mode 00019 00020 GNSSDGPSChannelStatus channel_0 00021 GNSSDGPSChannelStatus channel_1 00022 00023 # Service provider information 00024 uint64 user_id_code 00025 00026 uint8 USER_ACCESS_INFO_UNAVAILABLE=0 00027 uint8 USER_OMNISTAR_DISABLED=1 00028 uint8 USER_OMNISTAR_ENABLED=2 00029 uint8 USER_LANDSTAR_DISABLED=3 00030 uint8 USER_LANDSTAR_ENABLED=4 00031 uint8 user_access 00032 00033 uint8 STATE_INIT_0=0 00034 uint8 STATE_INIT_1=1 00035 uint8 STATE_INIT_2=2 00036 uint8 STATE_INIT_3=3 00037 uint8 STATE_INIT_4=4 00038 uint8 STATE_INIT_COMPLETE=5 00039 uint8 STATE_USER_ACCESS_CONFIRMED=6 00040 uint8 STATE_RTCM_DATA_RECEIVED=7 00041 uint8 STATE_DECODER_RESET_DETECTED=8 00042 uint8 STATE_DECODER_UNAVAILABLE=9 00043 uint8 STATE_NO_NEW_RTCM_DATA=10 00044 uint8 STATE_NEED_UPDATE_FROM_MASTER=11 00045 uint8 STATE_OFFSHORE_OPERATION_PROHIBITED=12 00046 uint8 STATE_INVALID_OPERATING_REGION=13 00047 uint8 STATE_INVALID_SATELLITE_LINK=14 00048 uint8 state 00049 00050 ================================================================================ 00051 MSG: applanix_msgs/TimeDistance 00052 float64 time1 00053 float64 time2 00054 float64 distance 00055 uint8 time_types 00056 uint8 distance_type 00057 00058 ================================================================================ 00059 MSG: applanix_msgs/GNSSDGPSChannelStatus 00060 # Part of Group 25. 00061 # TODO: enums 00062 00063 float64 frequency 00064 uint8 acquisition_mode 00065 uint8 status 00066 uint8 rtcm 00067 uint8 snr 00068 uint8 data_rate 00069 uint8 lock 00070 uint8 dgps_source_auto_switching 00071 uint8 provider 00072 00073 00074 """ 00075 # Pseudo-constants 00076 MODE_MANUAL_GPS = 0 00077 MODE_MANUAL_DGPS = 1 00078 MODE_DIFFERENTIAL_AUTO = 2 00079 MODE_UNKNOWN = 3 00080 USER_ACCESS_INFO_UNAVAILABLE = 0 00081 USER_OMNISTAR_DISABLED = 1 00082 USER_OMNISTAR_ENABLED = 2 00083 USER_LANDSTAR_DISABLED = 3 00084 USER_LANDSTAR_ENABLED = 4 00085 STATE_INIT_0 = 0 00086 STATE_INIT_1 = 1 00087 STATE_INIT_2 = 2 00088 STATE_INIT_3 = 3 00089 STATE_INIT_4 = 4 00090 STATE_INIT_COMPLETE = 5 00091 STATE_USER_ACCESS_CONFIRMED = 6 00092 STATE_RTCM_DATA_RECEIVED = 7 00093 STATE_DECODER_RESET_DETECTED = 8 00094 STATE_DECODER_UNAVAILABLE = 9 00095 STATE_NO_NEW_RTCM_DATA = 10 00096 STATE_NEED_UPDATE_FROM_MASTER = 11 00097 STATE_OFFSHORE_OPERATION_PROHIBITED = 12 00098 STATE_INVALID_OPERATING_REGION = 13 00099 STATE_INVALID_SATELLITE_LINK = 14 00100 00101 __slots__ = ['td','mode','channel_0','channel_1','user_id_code','user_access','state'] 00102 _slot_types = ['applanix_msgs/TimeDistance','uint8','applanix_msgs/GNSSDGPSChannelStatus','applanix_msgs/GNSSDGPSChannelStatus','uint64','uint8','uint8'] 00103 00104 def __init__(self, *args, **kwds): 00105 """ 00106 Constructor. Any message fields that are implicitly/explicitly 00107 set to None will be assigned a default value. The recommend 00108 use is keyword arguments as this is more robust to future message 00109 changes. You cannot mix in-order arguments and keyword arguments. 00110 00111 The available fields are: 00112 td,mode,channel_0,channel_1,user_id_code,user_access,state 00113 00114 @param args: complete set of field values, in .msg order 00115 @param kwds: use keyword arguments corresponding to message field names 00116 to set specific fields. 00117 """ 00118 if args or kwds: 00119 super(GNSSDGPSStatus, self).__init__(*args, **kwds) 00120 #message fields cannot be None, assign default values for those that are 00121 if self.td is None: 00122 self.td = applanix_msgs.msg.TimeDistance() 00123 if self.mode is None: 00124 self.mode = 0 00125 if self.channel_0 is None: 00126 self.channel_0 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00127 if self.channel_1 is None: 00128 self.channel_1 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00129 if self.user_id_code is None: 00130 self.user_id_code = 0 00131 if self.user_access is None: 00132 self.user_access = 0 00133 if self.state is None: 00134 self.state = 0 00135 else: 00136 self.td = applanix_msgs.msg.TimeDistance() 00137 self.mode = 0 00138 self.channel_0 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00139 self.channel_1 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00140 self.user_id_code = 0 00141 self.user_access = 0 00142 self.state = 0 00143 00144 def _get_types(self): 00145 """ 00146 internal API method 00147 """ 00148 return self._slot_types 00149 00150 def serialize(self, buff): 00151 """ 00152 serialize message into buffer 00153 @param buff: buffer 00154 @type buff: StringIO 00155 """ 00156 try: 00157 _x = self 00158 buff.write(_struct_3d3Bd8Bd8BQ2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.mode, _x.channel_0.frequency, _x.channel_0.acquisition_mode, _x.channel_0.status, _x.channel_0.rtcm, _x.channel_0.snr, _x.channel_0.data_rate, _x.channel_0.lock, _x.channel_0.dgps_source_auto_switching, _x.channel_0.provider, _x.channel_1.frequency, _x.channel_1.acquisition_mode, _x.channel_1.status, _x.channel_1.rtcm, _x.channel_1.snr, _x.channel_1.data_rate, _x.channel_1.lock, _x.channel_1.dgps_source_auto_switching, _x.channel_1.provider, _x.user_id_code, _x.user_access, _x.state)) 00159 except struct.error as se: self._check_types(se) 00160 except TypeError as te: self._check_types(te) 00161 00162 def deserialize(self, str): 00163 """ 00164 unpack serialized message in str into this message instance 00165 @param str: byte array of serialized message 00166 @type str: str 00167 """ 00168 try: 00169 if self.td is None: 00170 self.td = applanix_msgs.msg.TimeDistance() 00171 if self.channel_0 is None: 00172 self.channel_0 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00173 if self.channel_1 is None: 00174 self.channel_1 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00175 end = 0 00176 _x = self 00177 start = end 00178 end += 69 00179 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.mode, _x.channel_0.frequency, _x.channel_0.acquisition_mode, _x.channel_0.status, _x.channel_0.rtcm, _x.channel_0.snr, _x.channel_0.data_rate, _x.channel_0.lock, _x.channel_0.dgps_source_auto_switching, _x.channel_0.provider, _x.channel_1.frequency, _x.channel_1.acquisition_mode, _x.channel_1.status, _x.channel_1.rtcm, _x.channel_1.snr, _x.channel_1.data_rate, _x.channel_1.lock, _x.channel_1.dgps_source_auto_switching, _x.channel_1.provider, _x.user_id_code, _x.user_access, _x.state,) = _struct_3d3Bd8Bd8BQ2B.unpack(str[start:end]) 00180 return self 00181 except struct.error as e: 00182 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00183 00184 00185 def serialize_numpy(self, buff, numpy): 00186 """ 00187 serialize message with numpy array types into buffer 00188 @param buff: buffer 00189 @type buff: StringIO 00190 @param numpy: numpy python module 00191 @type numpy module 00192 """ 00193 try: 00194 _x = self 00195 buff.write(_struct_3d3Bd8Bd8BQ2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.mode, _x.channel_0.frequency, _x.channel_0.acquisition_mode, _x.channel_0.status, _x.channel_0.rtcm, _x.channel_0.snr, _x.channel_0.data_rate, _x.channel_0.lock, _x.channel_0.dgps_source_auto_switching, _x.channel_0.provider, _x.channel_1.frequency, _x.channel_1.acquisition_mode, _x.channel_1.status, _x.channel_1.rtcm, _x.channel_1.snr, _x.channel_1.data_rate, _x.channel_1.lock, _x.channel_1.dgps_source_auto_switching, _x.channel_1.provider, _x.user_id_code, _x.user_access, _x.state)) 00196 except struct.error as se: self._check_types(se) 00197 except TypeError as te: self._check_types(te) 00198 00199 def deserialize_numpy(self, str, numpy): 00200 """ 00201 unpack serialized message in str into this message instance using numpy for array types 00202 @param str: byte array of serialized message 00203 @type str: str 00204 @param numpy: numpy python module 00205 @type numpy: module 00206 """ 00207 try: 00208 if self.td is None: 00209 self.td = applanix_msgs.msg.TimeDistance() 00210 if self.channel_0 is None: 00211 self.channel_0 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00212 if self.channel_1 is None: 00213 self.channel_1 = applanix_msgs.msg.GNSSDGPSChannelStatus() 00214 end = 0 00215 _x = self 00216 start = end 00217 end += 69 00218 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.mode, _x.channel_0.frequency, _x.channel_0.acquisition_mode, _x.channel_0.status, _x.channel_0.rtcm, _x.channel_0.snr, _x.channel_0.data_rate, _x.channel_0.lock, _x.channel_0.dgps_source_auto_switching, _x.channel_0.provider, _x.channel_1.frequency, _x.channel_1.acquisition_mode, _x.channel_1.status, _x.channel_1.rtcm, _x.channel_1.snr, _x.channel_1.data_rate, _x.channel_1.lock, _x.channel_1.dgps_source_auto_switching, _x.channel_1.provider, _x.user_id_code, _x.user_access, _x.state,) = _struct_3d3Bd8Bd8BQ2B.unpack(str[start:end]) 00219 return self 00220 except struct.error as e: 00221 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00222 00223 _struct_I = roslib.message.struct_I 00224 _struct_3d3Bd8Bd8BQ2B = struct.Struct("<3d3Bd8Bd8BQ2B")