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


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