# 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_si114x
else:
    import _pyupm_si114x

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



def getVersion():
    return _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):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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):
        _pyupm_si114x.SI114X_swiginit(self, _pyupm_si114x.new_SI114X(bus, address))
    __swig_destroy__ = _pyupm_si114x.delete_SI114X

    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)

# Register SI114X in _pyupm_si114x:
_pyupm_si114x.SI114X_swigregister(SI114X)



