# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pyupm_bmpx8x
else:
    import _pyupm_bmpx8x

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import upm.pyupm_interfaces

def getVersion():
    return _pyupm_bmpx8x.getVersion()
BMPX8X_DEFAULT_I2C_BUS = _pyupm_bmpx8x.BMPX8X_DEFAULT_I2C_BUS
BMPX8X_DEFAULT_I2C_ADDR = _pyupm_bmpx8x.BMPX8X_DEFAULT_I2C_ADDR
BMPX8X_DEFAULT_CHIPID = _pyupm_bmpx8x.BMPX8X_DEFAULT_CHIPID
B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X8X_CTRL_MEAS_CMD4 = _pyupm_bmpx8x.BMPX8X_CTRL_MEAS_CMD4
_BMPX8X_CTRL_MEAS_CMD_MASK = _pyupm_bmpx8x._BMPX8X_CTRL_MEAS_CMD_MASK
_BMPX8X_CTRL_MEAS_CMD_SHIFT = _pyupm_bmpx8x._BMPX8X_CTRL_MEAS_CMD_SHIFT
BMPX8X_CTRL_MEAS_SCO = _pyupm_bmpx8x.BMPX8X_CTRL_MEAS_SCO
BMPX8X_CTRL_MEAS_OSS0 = _pyupm_bmpx8x.BMPX8X_CTRL_MEAS_OSS0
BMPX8X_CTRL_MEAS_OSS1 = _pyupm_bmpx8x.BMPX8X_CTRL_MEAS_OSS1
_BMPX8X_CTRL_MEAS_OSS_MASK = _pyupm_bmpx8x._BMPX8X_CTRL_MEAS_OSS_MASK
_BMPX8X_CTRL_MEAS_OSS_SHIFT = _pyupm_bmpx8x._BMPX8X_CTRL_MEAS_OSS_SHIFT
BMPX8X_CMD_READ_TEMP = _pyupm_bmpx8x.BMPX8X_CMD_READ_TEMP
BMPX8X_CMD_READ_PRESSURE = _pyupm_bmpx8x.BMPX8X_CMD_READ_PRESSURE
BMPX8X_OSS_ULTRALOWPOWER = _pyupm_bmpx8x.BMPX8X_OSS_ULTRALOWPOWER
BMPX8X_OSS_STANDARD = _pyupm_bmpx8x.BMPX8X_OSS_STANDARD
BMPX8X_OSS_HIGHRES = _pyupm_bmpx8x.BMPX8X_OSS_HIGHRES
BMPX8X_OSS_ULTRAHIGHRES = _pyupm_bmpx8x.BMPX8X_OSS_ULTRAHIGHRES
class BMPX8X(upm.pyupm_interfaces.iPressure, upm.pyupm_interfaces.iTemperature):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _pyupm_bmpx8x.BMPX8X_swiginit(self, _pyupm_bmpx8x.new_BMPX8X(*args))
    __swig_destroy__ = _pyupm_bmpx8x.delete_BMPX8X

    def update(self):
        return _pyupm_bmpx8x.BMPX8X_update(self)

    def reset(self):
        return _pyupm_bmpx8x.BMPX8X_reset(self)

    def init(self, oss=BMPX8X_OSS_ULTRAHIGHRES):
        return _pyupm_bmpx8x.BMPX8X_init(self, oss)

    def setOversampling(self, oss=BMPX8X_OSS_ULTRAHIGHRES):
        return _pyupm_bmpx8x.BMPX8X_setOversampling(self, oss)

    def getPressure(self):
        return _pyupm_bmpx8x.BMPX8X_getPressure(self)

    def getTemperature(self):
        return _pyupm_bmpx8x.BMPX8X_getTemperature(self)

    def getSealevelPressure(self, *args):
        return _pyupm_bmpx8x.BMPX8X_getSealevelPressure(self, *args)

    def getAltitude(self, sealevelPressure=101325):
        return _pyupm_bmpx8x.BMPX8X_getAltitude(self, sealevelPressure)

    def getTemperatureCelsius(self):
        return _pyupm_bmpx8x.BMPX8X_getTemperatureCelsius(self)

    def getPressurePa(self):
        return _pyupm_bmpx8x.BMPX8X_getPressurePa(self)

    def getModuleName(self):
        return _pyupm_bmpx8x.BMPX8X_getModuleName(self)

# Register BMPX8X in _pyupm_bmpx8x:
_pyupm_bmpx8x.BMPX8X_swigregister(BMPX8X)



