# 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_si114x')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_si114x')
    _pyupm_si114x = 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_si114x', [dirname(__file__)])
        except ImportError:
            import _pyupm_si114x
            return _pyupm_si114x
        try:
            _mod = imp.load_module('_pyupm_si114x', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_si114x = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_si114x
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


def getVersion():
    return _pyupm_si114x.getVersion()
getVersion = _pyupm_si114x.getVersion
SI114X_I2C_BUS = _pyupm_si114x.SI114X_I2C_BUS
SI114X_DEFAULT_I2C_ADDR = _pyupm_si114x.SI114X_DEFAULT_I2C_ADDR
SI114X_HW_KEY = _pyupm_si114x.SI114X_HW_KEY
class SI114X(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SI114X, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SI114X, name)
    __repr__ = _swig_repr
    REG_PART_ID = _pyupm_si114x.SI114X_REG_PART_ID
    REG_REV_ID = _pyupm_si114x.SI114X_REG_REV_ID
    REG_SEQ_ID = _pyupm_si114x.SI114X_REG_SEQ_ID
    REG_INT_CFG = _pyupm_si114x.SI114X_REG_INT_CFG
    REG_IRQ_ENABLE = _pyupm_si114x.SI114X_REG_IRQ_ENABLE
    REG_IRQ_MODE1 = _pyupm_si114x.SI114X_REG_IRQ_MODE1
    REG_IRQ_MODE2 = _pyupm_si114x.SI114X_REG_IRQ_MODE2
    REG_HW_KEY = _pyupm_si114x.SI114X_REG_HW_KEY
    REG_MEAS_RATE0 = _pyupm_si114x.SI114X_REG_MEAS_RATE0
    REG_MEAS_RATE1 = _pyupm_si114x.SI114X_REG_MEAS_RATE1
    REG_PS_LED21 = _pyupm_si114x.SI114X_REG_PS_LED21
    REG_PS_LED3 = _pyupm_si114x.SI114X_REG_PS_LED3
    REG_UCOEF0 = _pyupm_si114x.SI114X_REG_UCOEF0
    REG_UCOEF1 = _pyupm_si114x.SI114X_REG_UCOEF1
    REG_UCOEF2 = _pyupm_si114x.SI114X_REG_UCOEF2
    REG_UCOEF3 = _pyupm_si114x.SI114X_REG_UCOEF3
    REG_PARAM_WR = _pyupm_si114x.SI114X_REG_PARAM_WR
    REG_COMMAND = _pyupm_si114x.SI114X_REG_COMMAND
    REG_RESPONSE = _pyupm_si114x.SI114X_REG_RESPONSE
    REG_IRQ_STATUS = _pyupm_si114x.SI114X_REG_IRQ_STATUS
    REG_ALS_VIS_DATA0 = _pyupm_si114x.SI114X_REG_ALS_VIS_DATA0
    REG_ALS_VIS_DATA1 = _pyupm_si114x.SI114X_REG_ALS_VIS_DATA1
    REG_ALS_IR_DATA0 = _pyupm_si114x.SI114X_REG_ALS_IR_DATA0
    REG_ALS_IR_DATA1 = _pyupm_si114x.SI114X_REG_ALS_IR_DATA1
    REG_PS1_DATA0 = _pyupm_si114x.SI114X_REG_PS1_DATA0
    REG_PS1_DATA1 = _pyupm_si114x.SI114X_REG_PS1_DATA1
    REG_PS2_DATA0 = _pyupm_si114x.SI114X_REG_PS2_DATA0
    REG_PS2_DATA1 = _pyupm_si114x.SI114X_REG_PS2_DATA1
    REG_PS3_DATA0 = _pyupm_si114x.SI114X_REG_PS3_DATA0
    REG_PS3_DATA1 = _pyupm_si114x.SI114X_REG_PS3_DATA1
    REG_AUX_UVINDEX0 = _pyupm_si114x.SI114X_REG_AUX_UVINDEX0
    REG_AUX_UVINDEX1 = _pyupm_si114x.SI114X_REG_AUX_UVINDEX1
    REG_PARAM_READ = _pyupm_si114x.SI114X_REG_PARAM_READ
    REG_CHIP_STAT = _pyupm_si114x.SI114X_REG_CHIP_STAT
    REG_ANA_IN_KEY0 = _pyupm_si114x.SI114X_REG_ANA_IN_KEY0
    REG_ANA_IN_KEY1 = _pyupm_si114x.SI114X_REG_ANA_IN_KEY1
    REG_ANA_IN_KEY2 = _pyupm_si114x.SI114X_REG_ANA_IN_KEY2
    REG_ANA_IN_KEY3 = _pyupm_si114x.SI114X_REG_ANA_IN_KEY3
    PARAM_I2C_ADDDR = _pyupm_si114x.SI114X_PARAM_I2C_ADDDR
    PARAM_CHLIST = _pyupm_si114x.SI114X_PARAM_CHLIST
    PARAM_PSLED12_SEL = _pyupm_si114x.SI114X_PARAM_PSLED12_SEL
    PARAM_PSLED3_SEL = _pyupm_si114x.SI114X_PARAM_PSLED3_SEL
    PARAM_PS_ENCODING = _pyupm_si114x.SI114X_PARAM_PS_ENCODING
    PARAM_ALS_ENCODING = _pyupm_si114x.SI114X_PARAM_ALS_ENCODING
    PARAM_PS1_ADCMUX = _pyupm_si114x.SI114X_PARAM_PS1_ADCMUX
    PARAM_PS2_ADCMUX = _pyupm_si114x.SI114X_PARAM_PS2_ADCMUX
    PARAM_PS3_ADCMUX = _pyupm_si114x.SI114X_PARAM_PS3_ADCMUX
    PARAM_PS_ADC_COUNT = _pyupm_si114x.SI114X_PARAM_PS_ADC_COUNT
    PARAM_PS_ADC_GAIN = _pyupm_si114x.SI114X_PARAM_PS_ADC_GAIN
    PARAM_PS_ADC_MISC = _pyupm_si114x.SI114X_PARAM_PS_ADC_MISC
    PARAM_ALS_IR_ADCMUX = _pyupm_si114x.SI114X_PARAM_ALS_IR_ADCMUX
    PARAM_AUX_ADCMUX = _pyupm_si114x.SI114X_PARAM_AUX_ADCMUX
    PARAM_ALS_VIS_ADC_COUNT = _pyupm_si114x.SI114X_PARAM_ALS_VIS_ADC_COUNT
    PARAM_ALS_VIS_ADC_GAIN = _pyupm_si114x.SI114X_PARAM_ALS_VIS_ADC_GAIN
    PARAM_ALS_VIS_ADC_MISC = _pyupm_si114x.SI114X_PARAM_ALS_VIS_ADC_MISC
    PARAM_LED_REC = _pyupm_si114x.SI114X_PARAM_LED_REC
    PARAM_ALS_IR_ADC_COUNT = _pyupm_si114x.SI114X_PARAM_ALS_IR_ADC_COUNT
    PARAM_ALS_IR_ADX_GAIN = _pyupm_si114x.SI114X_PARAM_ALS_IR_ADX_GAIN
    PARAM_ALS_IR_ADC_MISC = _pyupm_si114x.SI114X_PARAM_ALS_IR_ADC_MISC
    CMD_NOOP = _pyupm_si114x.SI114X_CMD_NOOP
    CMD_RESET = _pyupm_si114x.SI114X_CMD_RESET
    CMD_BUSADDR = _pyupm_si114x.SI114X_CMD_BUSADDR
    CMD_PS_FORCE = _pyupm_si114x.SI114X_CMD_PS_FORCE
    CMD_GET_CAL = _pyupm_si114x.SI114X_CMD_GET_CAL
    CMD_ALS_FORCE = _pyupm_si114x.SI114X_CMD_ALS_FORCE
    CMD_PSALS_FORCE = _pyupm_si114x.SI114X_CMD_PSALS_FORCE
    CMD_PS_PAUSE = _pyupm_si114x.SI114X_CMD_PS_PAUSE
    CMD_ALS_PAUSE = _pyupm_si114x.SI114X_CMD_ALS_PAUSE
    CMD_PSALS_PAUSE = _pyupm_si114x.SI114X_CMD_PSALS_PAUSE
    CMD_PS_AUTO = _pyupm_si114x.SI114X_CMD_PS_AUTO
    CMD_ALS_AUTO = _pyupm_si114x.SI114X_CMD_ALS_AUTO
    CMD_PSALS_AUTO = _pyupm_si114x.SI114X_CMD_PSALS_AUTO
    CMD_PARAM_QUERY = _pyupm_si114x.SI114X_CMD_PARAM_QUERY
    CMD_PARAM_SET = _pyupm_si114x.SI114X_CMD_PARAM_SET
    CHLIST_EN_PS1 = _pyupm_si114x.SI114X_CHLIST_EN_PS1
    CHLIST_EN_PS2 = _pyupm_si114x.SI114X_CHLIST_EN_PS2
    CHLIST_EN_PS3 = _pyupm_si114x.SI114X_CHLIST_EN_PS3
    CHLIST_EN_ALS_VIS = _pyupm_si114x.SI114X_CHLIST_EN_ALS_VIS
    CHLIST_EN_ALS_IR = _pyupm_si114x.SI114X_CHLIST_EN_ALS_IR
    CHLIST_EN_AUX = _pyupm_si114x.SI114X_CHLIST_EN_AUX
    CHLIST_EN_UV = _pyupm_si114x.SI114X_CHLIST_EN_UV
    ERR_NONE = _pyupm_si114x.SI114X_ERR_NONE
    ERR_INVALID_SET = _pyupm_si114x.SI114X_ERR_INVALID_SET
    ERR_PS1_ADC_OVER = _pyupm_si114x.SI114X_ERR_PS1_ADC_OVER
    ERR_PS2_ADC_OVER = _pyupm_si114x.SI114X_ERR_PS2_ADC_OVER
    ERR_PS3_ADC_OVER = _pyupm_si114x.SI114X_ERR_PS3_ADC_OVER
    ERR_ALS_VIS_ADC_OVER = _pyupm_si114x.SI114X_ERR_ALS_VIS_ADC_OVER
    ERR_ALS_IR_ADC_OVER = _pyupm_si114x.SI114X_ERR_ALS_IR_ADC_OVER
    ERR_AUX_ADC_OVER = _pyupm_si114x.SI114X_ERR_AUX_ADC_OVER
    IRQEN_ALS_IE = _pyupm_si114x.SI114X_IRQEN_ALS_IE
    IRQEN_PS1_IE = _pyupm_si114x.SI114X_IRQEN_PS1_IE
    IRQEN_PS2_IE = _pyupm_si114x.SI114X_IRQEN_PS2_IE
    IRQEN_PS3_IE = _pyupm_si114x.SI114X_IRQEN_PS3_IE

    def __init__(self, bus, address=0x60):
        this = _pyupm_si114x.new_SI114X(bus, address)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_si114x.delete_SI114X
    __del__ = lambda self: None

    def writeByte(self, reg, byte):
        return _pyupm_si114x.SI114X_writeByte(self, reg, byte)

    def readByte(self, reg):
        return _pyupm_si114x.SI114X_readByte(self, reg)

    def readWord(self, reg):
        return _pyupm_si114x.SI114X_readWord(self, reg)

    def reset(self):
        return _pyupm_si114x.SI114X_reset(self)

    def setUVCalibration(self, uvcoeff0, uvcoeff1, uvcoeff2, uvcoeff3):
        return _pyupm_si114x.SI114X_setUVCalibration(self, uvcoeff0, uvcoeff1, uvcoeff2, uvcoeff3)

    def writeParam(self, param, value):
        return _pyupm_si114x.SI114X_writeParam(self, param, value)

    def readParam(self, param):
        return _pyupm_si114x.SI114X_readParam(self, param)

    def initialize(self):
        return _pyupm_si114x.SI114X_initialize(self)

    def update(self):
        return _pyupm_si114x.SI114X_update(self)

    def getUVIndex(self):
        return _pyupm_si114x.SI114X_getUVIndex(self)
SI114X_swigregister = _pyupm_si114x.SI114X_swigregister
SI114X_swigregister(SI114X)

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


