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