# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_bmpx8x')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_bmpx8x')
    _pyupm_bmpx8x = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pyupm_bmpx8x', [dirname(__file__)])
        except ImportError:
            import _pyupm_bmpx8x
            return _pyupm_bmpx8x
        try:
            _mod = imp.load_module('_pyupm_bmpx8x', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_bmpx8x = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_bmpx8x
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

import upm.pyupm_interfaces

def getVersion():
    return _pyupm_bmpx8x.getVersion()
getVersion = _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
BMPX8X_RESET_BYTE = _pyupm_bmpx8x.BMPX8X_RESET_BYTE
BMPX8X_CAL_AC1 = _pyupm_bmpx8x.BMPX8X_CAL_AC1
BMPX8X_CAL_AC2 = _pyupm_bmpx8x.BMPX8X_CAL_AC2
BMPX8X_CAL_AC3 = _pyupm_bmpx8x.BMPX8X_CAL_AC3
BMPX8X_CAL_AC4 = _pyupm_bmpx8x.BMPX8X_CAL_AC4
BMPX8X_CAL_AC5 = _pyupm_bmpx8x.BMPX8X_CAL_AC5
BMPX8X_CAL_AC6 = _pyupm_bmpx8x.BMPX8X_CAL_AC6
BMPX8X_CAL_B1 = _pyupm_bmpx8x.BMPX8X_CAL_B1
BMPX8X_CAL_B2 = _pyupm_bmpx8x.BMPX8X_CAL_B2
BMPX8X_CAL_MB = _pyupm_bmpx8x.BMPX8X_CAL_MB
BMPX8X_CAL_MC = _pyupm_bmpx8x.BMPX8X_CAL_MC
BMPX8X_CAL_MD = _pyupm_bmpx8x.BMPX8X_CAL_MD
BMPX8X_CTRL_MEAS = _pyupm_bmpx8x.BMPX8X_CTRL_MEAS
BMPX8X_OUTDATA_MSB = _pyupm_bmpx8x.BMPX8X_OUTDATA_MSB
BMPX8X_OUTDATA_LSB = _pyupm_bmpx8x.BMPX8X_OUTDATA_LSB
BMPX8X_OUTDATA_XLSB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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):
    __swig_setmethods__ = {}
    for _s in [upm.pyupm_interfaces.iPressure, upm.pyupm_interfaces.iTemperature]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, BMPX8X, name, value)
    __swig_getmethods__ = {}
    for _s in [upm.pyupm_interfaces.iPressure, upm.pyupm_interfaces.iTemperature]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, BMPX8X, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _pyupm_bmpx8x.new_BMPX8X(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_bmpx8x.delete_BMPX8X
    __del__ = lambda self: None

    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)
BMPX8X_swigregister = _pyupm_bmpx8x.BMPX8X_swigregister
BMPX8X_swigregister(BMPX8X)

# This file is compatible with both classic and new-style classes.


