# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from sbg_driver/SbgGpsPosStatus.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class SbgGpsPosStatus(genpy.Message):
  _md5sum = "85506deb3699c6f0e87097da56884a7e"
  _type = "sbg_driver/SbgGpsPosStatus"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# SBG Ellipse Messages
# Submessage


# The raw GPS position status
# 0 SOL_COMPUTED		A valid solution has been computed.
# 1 INSUFFICIENT_OBS 	Not enough valid SV to compute a solution.
# 2 INTERNAL_ERROR 		An internal error has occurred.
# 3 HEIGHT_LIMIT 		The height limit has been exceeded.
uint8 status

# The raw GPS position type
# 0 NO_SOLUTION		No valid solution available.
# 1 UNKNOWN_TYPE	An unknown solution type has been computed.
# 2 SINGLE			Single point solution position.
# 3 PSRDIFF			Standard Pseudorange Differential Solution (DGPS).
# 4 SBAS			SBAS satellite used for differential corrections.
# 5 OMNISTAR		Omnistar VBS Position (L1 sub-meter).
# 6 RTK_FLOAT		Floating RTK ambiguity solution (20 cms RTK).
# 7 RTK_INT			Integer RTK ambiguity solution (2 cms RTK).
# 8 PPP_FLOAT		Precise Point Positioning with float ambiguities
# 9 PPP_INT			Precise Point Positioning with fixed ambiguities
# 10 FIXED			Fixed location solution position
uint8 type

# True if GPS L1 is used in the solution
bool gps_l1_used

# True if GPS L2 is used in the solution
bool gps_l2_used

# True if GPS L5 is used in the solution
bool gps_l5_used

# True if GLONASS L1 is used in the solution
bool glo_l1_used

# True if GLONASS L2 is used in the solution
bool glo_l2_used
"""
  __slots__ = ['status','type','gps_l1_used','gps_l2_used','gps_l5_used','glo_l1_used','glo_l2_used']
  _slot_types = ['uint8','uint8','bool','bool','bool','bool','bool']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       status,type,gps_l1_used,gps_l2_used,gps_l5_used,glo_l1_used,glo_l2_used

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(SbgGpsPosStatus, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.status is None:
        self.status = 0
      if self.type is None:
        self.type = 0
      if self.gps_l1_used is None:
        self.gps_l1_used = False
      if self.gps_l2_used is None:
        self.gps_l2_used = False
      if self.gps_l5_used is None:
        self.gps_l5_used = False
      if self.glo_l1_used is None:
        self.glo_l1_used = False
      if self.glo_l2_used is None:
        self.glo_l2_used = False
    else:
      self.status = 0
      self.type = 0
      self.gps_l1_used = False
      self.gps_l2_used = False
      self.gps_l5_used = False
      self.glo_l1_used = False
      self.glo_l2_used = False

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self
      buff.write(_get_struct_7B().pack(_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 7
      (_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used,) = _get_struct_7B().unpack(str[start:end])
      self.gps_l1_used = bool(self.gps_l1_used)
      self.gps_l2_used = bool(self.gps_l2_used)
      self.gps_l5_used = bool(self.gps_l5_used)
      self.glo_l1_used = bool(self.glo_l1_used)
      self.glo_l2_used = bool(self.glo_l2_used)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self
      buff.write(_get_struct_7B().pack(_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 7
      (_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used,) = _get_struct_7B().unpack(str[start:end])
      self.gps_l1_used = bool(self.gps_l1_used)
      self.gps_l2_used = bool(self.gps_l2_used)
      self.gps_l5_used = bool(self.gps_l5_used)
      self.glo_l1_used = bool(self.glo_l1_used)
      self.glo_l2_used = bool(self.glo_l2_used)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_7B = None
def _get_struct_7B():
    global _struct_7B
    if _struct_7B is None:
        _struct_7B = struct.Struct("<7B")
    return _struct_7B

# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from sbg_driver/SbgGpsPosStatus.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class SbgGpsPosStatus(genpy.Message):
  _md5sum = "85506deb3699c6f0e87097da56884a7e"
  _type = "sbg_driver/SbgGpsPosStatus"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# SBG Ellipse Messages
# Submessage


# The raw GPS position status
# 0 SOL_COMPUTED		A valid solution has been computed.
# 1 INSUFFICIENT_OBS 	Not enough valid SV to compute a solution.
# 2 INTERNAL_ERROR 		An internal error has occurred.
# 3 HEIGHT_LIMIT 		The height limit has been exceeded.
uint8 status

# The raw GPS position type
# 0 NO_SOLUTION		No valid solution available.
# 1 UNKNOWN_TYPE	An unknown solution type has been computed.
# 2 SINGLE			Single point solution position.
# 3 PSRDIFF			Standard Pseudorange Differential Solution (DGPS).
# 4 SBAS			SBAS satellite used for differential corrections.
# 5 OMNISTAR		Omnistar VBS Position (L1 sub-meter).
# 6 RTK_FLOAT		Floating RTK ambiguity solution (20 cms RTK).
# 7 RTK_INT			Integer RTK ambiguity solution (2 cms RTK).
# 8 PPP_FLOAT		Precise Point Positioning with float ambiguities
# 9 PPP_INT			Precise Point Positioning with fixed ambiguities
# 10 FIXED			Fixed location solution position
uint8 type

# True if GPS L1 is used in the solution
bool gps_l1_used

# True if GPS L2 is used in the solution
bool gps_l2_used

# True if GPS L5 is used in the solution
bool gps_l5_used

# True if GLONASS L1 is used in the solution
bool glo_l1_used

# True if GLONASS L2 is used in the solution
bool glo_l2_used
"""
  __slots__ = ['status','type','gps_l1_used','gps_l2_used','gps_l5_used','glo_l1_used','glo_l2_used']
  _slot_types = ['uint8','uint8','bool','bool','bool','bool','bool']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       status,type,gps_l1_used,gps_l2_used,gps_l5_used,glo_l1_used,glo_l2_used

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(SbgGpsPosStatus, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.status is None:
        self.status = 0
      if self.type is None:
        self.type = 0
      if self.gps_l1_used is None:
        self.gps_l1_used = False
      if self.gps_l2_used is None:
        self.gps_l2_used = False
      if self.gps_l5_used is None:
        self.gps_l5_used = False
      if self.glo_l1_used is None:
        self.glo_l1_used = False
      if self.glo_l2_used is None:
        self.glo_l2_used = False
    else:
      self.status = 0
      self.type = 0
      self.gps_l1_used = False
      self.gps_l2_used = False
      self.gps_l5_used = False
      self.glo_l1_used = False
      self.glo_l2_used = False

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self
      buff.write(_get_struct_7B().pack(_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 7
      (_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used,) = _get_struct_7B().unpack(str[start:end])
      self.gps_l1_used = bool(self.gps_l1_used)
      self.gps_l2_used = bool(self.gps_l2_used)
      self.gps_l5_used = bool(self.gps_l5_used)
      self.glo_l1_used = bool(self.glo_l1_used)
      self.glo_l2_used = bool(self.glo_l2_used)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self
      buff.write(_get_struct_7B().pack(_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 7
      (_x.status, _x.type, _x.gps_l1_used, _x.gps_l2_used, _x.gps_l5_used, _x.glo_l1_used, _x.glo_l2_used,) = _get_struct_7B().unpack(str[start:end])
      self.gps_l1_used = bool(self.gps_l1_used)
      self.gps_l2_used = bool(self.gps_l2_used)
      self.gps_l5_used = bool(self.gps_l5_used)
      self.glo_l1_used = bool(self.glo_l1_used)
      self.glo_l2_used = bool(self.glo_l2_used)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_7B = None
def _get_struct_7B():
    global _struct_7B
    if _struct_7B is None:
        _struct_7B = struct.Struct("<7B")
    return _struct_7B

# This Python file uses the following encoding: utf-8 autogenerated by genpy from sbg_driver/SbgGpsPosStatus.msg. Do not edit. # flag to mark the presence of a Header object # SBG Ellipse Messages # Submessage   # The raw GPS position status # 0 SOL_COMPUTED		A valid solution has been computed. # 1 INSUFFICIENT_OBS 	Not enough valid SV to compute a solution. # 2 INTERNAL_ERROR 		An internal error has occurred. # 3 HEIGHT_LIMIT 		The height limit has been exceeded. uint8 status  # The raw GPS position type # 0 NO_SOLUTION		No valid solution available. # 1 UNKNOWN_TYPE	An unknown solution type has been computed. # 2 SINGLE			Single point solution position. # 3 PSRDIFF			Standard Pseudorange Differential Solution (DGPS). # 4 SBAS			SBAS satellite used for differential corrections. # 5 OMNISTAR		Omnistar VBS Position (L1 sub-meter). # 6 RTK_FLOAT		Floating RTK ambiguity solution (20 cms RTK). # 7 RTK_INT			Integer RTK ambiguity solution (2 cms RTK). # 8 PPP_FLOAT		Precise Point Positioning with float ambiguities # 9 PPP_INT			Precise Point Positioning with fixed ambiguities # 10 FIXED			Fixed location solution position uint8 type  # True if GPS L1 is used in the solution bool gps_l1_used  # True if GPS L2 is used in the solution bool gps_l2_used  # True if GPS L5 is used in the solution bool gps_l5_used  # True if GLONASS L1 is used in the solution bool glo_l1_used  # True if GLONASS L2 is used in the solution bool glo_l2_used Constructor. Any message fields that are implicitly/explicitly     set to None will be assigned a default value. The recommend     use is keyword arguments as this is more robust to future message     changes.  You cannot mix in-order arguments and keyword arguments.      The available fields are:        status,type,gps_l1_used,gps_l2_used,gps_l5_used,glo_l1_used,glo_l2_used      :param args: complete set of field values, in .msg order     :param kwds: use keyword arguments corresponding to message field names     to set specific fields. # message fields cannot be None, assign default values for those that are internal API method serialize message into buffer     :param buff: buffer, ``StringIO`` unpack serialized message in str into this message instance     :param str: byte array of serialized message, ``str`` # most likely buffer underfill serialize message with numpy array types into buffer     :param buff: buffer, ``StringIO``     :param numpy: numpy python module unpack serialized message in str into this message instance using numpy for array types     :param str: byte array of serialized message, ``str``     :param numpy: numpy python module # most likely buffer underfill