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


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