# 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_mcp9808
else:
    import _pyupm_mcp9808

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_mcp9808.getVersion()
MCP9808_REG_CONFIG = _pyupm_mcp9808.MCP9808_REG_CONFIG
MCP9808_REG_AMBIENT_TEMP = _pyupm_mcp9808.MCP9808_REG_AMBIENT_TEMP
MCP9808_REG_MANUF_ID = _pyupm_mcp9808.MCP9808_REG_MANUF_ID
MCP9808_REG_DEVICE_ID = _pyupm_mcp9808.MCP9808_REG_DEVICE_ID
MCP9808_REG_RESOLUTION = _pyupm_mcp9808.MCP9808_REG_RESOLUTION
MCP9808_CONFIG_SHUTDOWN = _pyupm_mcp9808.MCP9808_CONFIG_SHUTDOWN
MCP9808_CONFIG_CRITLOCKED = _pyupm_mcp9808.MCP9808_CONFIG_CRITLOCKED
MCP9808_CONFIG_WINLOCKED = _pyupm_mcp9808.MCP9808_CONFIG_WINLOCKED
MCP9808_CONFIG_INTCLR = _pyupm_mcp9808.MCP9808_CONFIG_INTCLR
class MCP9808(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
    UPPER_TEMP = _pyupm_mcp9808.MCP9808_UPPER_TEMP
    LOWER_TEMP = _pyupm_mcp9808.MCP9808_LOWER_TEMP
    CRIT_TEMP = _pyupm_mcp9808.MCP9808_CRIT_TEMP
    RES_LOW = _pyupm_mcp9808.MCP9808_RES_LOW
    RES_MEDIUM = _pyupm_mcp9808.MCP9808_RES_MEDIUM
    RES_HIGH = _pyupm_mcp9808.MCP9808_RES_HIGH
    RES_PRECISION = _pyupm_mcp9808.MCP9808_RES_PRECISION
    ALERTSTAT = _pyupm_mcp9808.MCP9808_ALERTSTAT
    ALERTCTRL = _pyupm_mcp9808.MCP9808_ALERTCTRL
    ALERTSEL = _pyupm_mcp9808.MCP9808_ALERTSEL
    ALERTPOL = _pyupm_mcp9808.MCP9808_ALERTPOL
    ALERTMODE = _pyupm_mcp9808.MCP9808_ALERTMODE
    HYST_0 = _pyupm_mcp9808.MCP9808_HYST_0
    HYST_1_5 = _pyupm_mcp9808.MCP9808_HYST_1_5
    HYST_3_0 = _pyupm_mcp9808.MCP9808_HYST_3_0
    HYST_6_0 = _pyupm_mcp9808.MCP9808_HYST_6_0

    def __init__(self, bus, address=0x18):
        _pyupm_mcp9808.MCP9808_swiginit(self, _pyupm_mcp9808.new_MCP9808(bus, address))
    __swig_destroy__ = _pyupm_mcp9808.delete_MCP9808

    def name(self):
        return _pyupm_mcp9808.MCP9808_name(self)

    def getTemp(self):
        return _pyupm_mcp9808.MCP9808_getTemp(self)

    def getTemperature(self):
        return _pyupm_mcp9808.MCP9808_getTemperature(self)

    def shutDown(self, sleep=True):
        return _pyupm_mcp9808.MCP9808_shutDown(self, sleep)

    def setMode(self, celsius=True):
        return _pyupm_mcp9808.MCP9808_setMode(self, celsius)

    def isCelsius(self):
        return _pyupm_mcp9808.MCP9808_isCelsius(self)

    def isTcrit(self):
        return _pyupm_mcp9808.MCP9808_isTcrit(self)

    def isTupper(self):
        return _pyupm_mcp9808.MCP9808_isTupper(self)

    def isTlower(self):
        return _pyupm_mcp9808.MCP9808_isTlower(self)

    def setMonitorReg(self, reg, value):
        return _pyupm_mcp9808.MCP9808_setMonitorReg(self, reg, value)

    def getMonitorReg(self, reg):
        return _pyupm_mcp9808.MCP9808_getMonitorReg(self, reg)

    def clearInterrupt(self):
        return _pyupm_mcp9808.MCP9808_clearInterrupt(self)

    def setAlertMode(self, command):
        return _pyupm_mcp9808.MCP9808_setAlertMode(self, command)

    def clearAlertMode(self):
        return _pyupm_mcp9808.MCP9808_clearAlertMode(self)

    def setHysteresis(self, value):
        return _pyupm_mcp9808.MCP9808_setHysteresis(self, value)

    def getHysteresis(self):
        return _pyupm_mcp9808.MCP9808_getHysteresis(self)

    def setResolution(self, value):
        return _pyupm_mcp9808.MCP9808_setResolution(self, value)

    def getResolution(self):
        return _pyupm_mcp9808.MCP9808_getResolution(self)

    def getManufacturer(self):
        return _pyupm_mcp9808.MCP9808_getManufacturer(self)

    def getDevicedId(self):
        return _pyupm_mcp9808.MCP9808_getDevicedId(self)

# Register MCP9808 in _pyupm_mcp9808:
_pyupm_mcp9808.MCP9808_swigregister(MCP9808)



