_GNSSDGPSStationDatabase.py
Go to the documentation of this file.
00001 """autogenerated by genpy from applanix_msgs/GNSSDGPSStationDatabase.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 GNSSDGPSStationDatabase(genpy.Message):
00010   _md5sum = "c954eb8ef0a53b8f04965106e84e8a92"
00011   _type = "applanix_msgs/GNSSDGPSStationDatabase"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# Group 26
00014 TimeDistance td
00015 
00016 GNSSDGPSStation[] stations
00017 
00018 ================================================================================
00019 MSG: applanix_msgs/TimeDistance
00020 float64 time1
00021 float64 time2
00022 float64 distance
00023 uint8 time_types
00024 uint8 distance_type
00025 
00026 ================================================================================
00027 MSG: applanix_msgs/GNSSDGPSStation
00028 # Part of Group 26
00029 
00030 uint8 FLAGS_SATELLITE=1
00031 uint8 FLAGS_STATION_PROVIDING_CORRECTIONS=2
00032 uint8 FLAGS_STATION_USED_AS_RTCM_SOURCE=4
00033 uint8 FLAGS_OMNISTAR_STATIONS=8
00034 uint8 flags
00035 
00036 uint16 id
00037 uint16 frequency
00038 
00039 uint8 HEALTH_NORMAL=0
00040 uint8 HEALTH_NOT_MONITORED=1
00041 uint8 HEALTH_NO_INFO_AVAILABLE=2
00042 uint8 HEALTH_DO_NOT_USE=3
00043 uint8 health
00044 
00045 float32 distance
00046 float32 range
00047 uint8 uscg_index
00048 uint32 seconds
00049 
00050 uint8 RATE_25BPS=0
00051 uint8 RATE_50BPS=1
00052 uint8 RATE_100BPS=2
00053 uint8 RATE_200BPS=3
00054 uint8 RATE_600BPS=4
00055 uint8 RATE_1200BPS=5
00056 uint8 RATE_2400BPS=6
00057 uint8 RATE_4800BPS=7
00058 uint8 modulation_rate
00059 
00060 """
00061   __slots__ = ['td','stations']
00062   _slot_types = ['applanix_msgs/TimeDistance','applanix_msgs/GNSSDGPSStation[]']
00063 
00064   def __init__(self, *args, **kwds):
00065     """
00066     Constructor. Any message fields that are implicitly/explicitly
00067     set to None will be assigned a default value. The recommend
00068     use is keyword arguments as this is more robust to future message
00069     changes.  You cannot mix in-order arguments and keyword arguments.
00070 
00071     The available fields are:
00072        td,stations
00073 
00074     :param args: complete set of field values, in .msg order
00075     :param kwds: use keyword arguments corresponding to message field names
00076     to set specific fields.
00077     """
00078     if args or kwds:
00079       super(GNSSDGPSStationDatabase, self).__init__(*args, **kwds)
00080       #message fields cannot be None, assign default values for those that are
00081       if self.td is None:
00082         self.td = applanix_msgs.msg.TimeDistance()
00083       if self.stations is None:
00084         self.stations = []
00085     else:
00086       self.td = applanix_msgs.msg.TimeDistance()
00087       self.stations = []
00088 
00089   def _get_types(self):
00090     """
00091     internal API method
00092     """
00093     return self._slot_types
00094 
00095   def serialize(self, buff):
00096     """
00097     serialize message into buffer
00098     :param buff: buffer, ``StringIO``
00099     """
00100     try:
00101       _x = self
00102       buff.write(_struct_3d2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type))
00103       length = len(self.stations)
00104       buff.write(_struct_I.pack(length))
00105       for val1 in self.stations:
00106         _x = val1
00107         buff.write(_struct_B2HB2fBIB.pack(_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate))
00108     except struct.error as se: self._check_types(se)
00109     except TypeError as te: self._check_types(te)
00110 
00111   def deserialize(self, str):
00112     """
00113     unpack serialized message in str into this message instance
00114     :param str: byte array of serialized message, ``str``
00115     """
00116     try:
00117       if self.td is None:
00118         self.td = applanix_msgs.msg.TimeDistance()
00119       if self.stations is None:
00120         self.stations = None
00121       end = 0
00122       _x = self
00123       start = end
00124       end += 26
00125       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type,) = _struct_3d2B.unpack(str[start:end])
00126       start = end
00127       end += 4
00128       (length,) = _struct_I.unpack(str[start:end])
00129       self.stations = []
00130       for i in range(0, length):
00131         val1 = applanix_msgs.msg.GNSSDGPSStation()
00132         _x = val1
00133         start = end
00134         end += 20
00135         (_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate,) = _struct_B2HB2fBIB.unpack(str[start:end])
00136         self.stations.append(val1)
00137       return self
00138     except struct.error as e:
00139       raise genpy.DeserializationError(e) #most likely buffer underfill
00140 
00141 
00142   def serialize_numpy(self, buff, numpy):
00143     """
00144     serialize message with numpy array types into buffer
00145     :param buff: buffer, ``StringIO``
00146     :param numpy: numpy python module
00147     """
00148     try:
00149       _x = self
00150       buff.write(_struct_3d2B.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type))
00151       length = len(self.stations)
00152       buff.write(_struct_I.pack(length))
00153       for val1 in self.stations:
00154         _x = val1
00155         buff.write(_struct_B2HB2fBIB.pack(_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate))
00156     except struct.error as se: self._check_types(se)
00157     except TypeError as te: self._check_types(te)
00158 
00159   def deserialize_numpy(self, str, numpy):
00160     """
00161     unpack serialized message in str into this message instance using numpy for array types
00162     :param str: byte array of serialized message, ``str``
00163     :param numpy: numpy python module
00164     """
00165     try:
00166       if self.td is None:
00167         self.td = applanix_msgs.msg.TimeDistance()
00168       if self.stations is None:
00169         self.stations = None
00170       end = 0
00171       _x = self
00172       start = end
00173       end += 26
00174       (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type,) = _struct_3d2B.unpack(str[start:end])
00175       start = end
00176       end += 4
00177       (length,) = _struct_I.unpack(str[start:end])
00178       self.stations = []
00179       for i in range(0, length):
00180         val1 = applanix_msgs.msg.GNSSDGPSStation()
00181         _x = val1
00182         start = end
00183         end += 20
00184         (_x.flags, _x.id, _x.frequency, _x.health, _x.distance, _x.range, _x.uscg_index, _x.seconds, _x.modulation_rate,) = _struct_B2HB2fBIB.unpack(str[start:end])
00185         self.stations.append(val1)
00186       return self
00187     except struct.error as e:
00188       raise genpy.DeserializationError(e) #most likely buffer underfill
00189 
00190 _struct_I = genpy.struct_I
00191 _struct_B2HB2fBIB = struct.Struct("<B2HB2fBIB")
00192 _struct_3d2B = struct.Struct("<3d2B")


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