_GPSStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_teleop/GPSStatus.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 GPSStatus(genpy.Message):
00009   _md5sum = "331cdbddfa4bc96ffc3b9ad98900a54c"
00010   _type = "corobot_teleop/GPSStatus"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# Navigation Satellite fix status for any Global Navigation Satellite System
00013 
00014 # Whether to output an augmented fix is determined by both the fix
00015 # type and the last time differential corrections were received.  A
00016 # fix is valid when status >= STATUS_FIX.
00017 
00018 int8 STATUS_NO_FIX =  -1        # unable to fix position
00019 int8 STATUS_FIX =      0        # unaugmented fix
00020 int8 STATUS_SBAS_FIX = 1        # with satellite-based augmentation
00021 int8 STATUS_GBAS_FIX = 2        # with ground-based augmentation
00022 
00023 int8 status
00024 
00025 # Bits defining which Global Navigation Satellite System signals were
00026 # used by the receiver.
00027 
00028 uint16 SERVICE_GPS =     1
00029 uint16 SERVICE_GLONASS = 2
00030 uint16 SERVICE_COMPASS = 4      # includes BeiDou.
00031 uint16 SERVICE_GALILEO = 8
00032 
00033 uint16 service
00034 
00035 """
00036   # Pseudo-constants
00037   STATUS_NO_FIX = -1
00038   STATUS_FIX = 0
00039   STATUS_SBAS_FIX = 1
00040   STATUS_GBAS_FIX = 2
00041   SERVICE_GPS = 1
00042   SERVICE_GLONASS = 2
00043   SERVICE_COMPASS = 4
00044   SERVICE_GALILEO = 8
00045 
00046   __slots__ = ['status','service']
00047   _slot_types = ['int8','uint16']
00048 
00049   def __init__(self, *args, **kwds):
00050     """
00051     Constructor. Any message fields that are implicitly/explicitly
00052     set to None will be assigned a default value. The recommend
00053     use is keyword arguments as this is more robust to future message
00054     changes.  You cannot mix in-order arguments and keyword arguments.
00055 
00056     The available fields are:
00057        status,service
00058 
00059     :param args: complete set of field values, in .msg order
00060     :param kwds: use keyword arguments corresponding to message field names
00061     to set specific fields.
00062     """
00063     if args or kwds:
00064       super(GPSStatus, self).__init__(*args, **kwds)
00065       #message fields cannot be None, assign default values for those that are
00066       if self.status is None:
00067         self.status = 0
00068       if self.service is None:
00069         self.service = 0
00070     else:
00071       self.status = 0
00072       self.service = 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, ``StringIO``
00084     """
00085     try:
00086       _x = self
00087       buff.write(_struct_bH.pack(_x.status, _x.service))
00088     except struct.error as se: self._check_types(se)
00089     except TypeError as te: self._check_types(te)
00090 
00091   def deserialize(self, str):
00092     """
00093     unpack serialized message in str into this message instance
00094     :param str: byte array of serialized message, ``str``
00095     """
00096     try:
00097       end = 0
00098       _x = self
00099       start = end
00100       end += 3
00101       (_x.status, _x.service,) = _struct_bH.unpack(str[start:end])
00102       return self
00103     except struct.error as e:
00104       raise genpy.DeserializationError(e) #most likely buffer underfill
00105 
00106 
00107   def serialize_numpy(self, buff, numpy):
00108     """
00109     serialize message with numpy array types into buffer
00110     :param buff: buffer, ``StringIO``
00111     :param numpy: numpy python module
00112     """
00113     try:
00114       _x = self
00115       buff.write(_struct_bH.pack(_x.status, _x.service))
00116     except struct.error as se: self._check_types(se)
00117     except TypeError as te: self._check_types(te)
00118 
00119   def deserialize_numpy(self, str, numpy):
00120     """
00121     unpack serialized message in str into this message instance using numpy for array types
00122     :param str: byte array of serialized message, ``str``
00123     :param numpy: numpy python module
00124     """
00125     try:
00126       end = 0
00127       _x = self
00128       start = end
00129       end += 3
00130       (_x.status, _x.service,) = _struct_bH.unpack(str[start:end])
00131       return self
00132     except struct.error as e:
00133       raise genpy.DeserializationError(e) #most likely buffer underfill
00134 
00135 _struct_I = genpy.struct_I
00136 _struct_bH = struct.Struct("<bH")


corobot_teleop
Author(s):
autogenerated on Wed Aug 26 2015 11:09:59