# 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_bh1749
else:
    import _pyupm_bh1749

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_bh1749.getVersion()
class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _pyupm_bh1749.delete_SwigPyIterator

    def value(self):
        return _pyupm_bh1749.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _pyupm_bh1749.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _pyupm_bh1749.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _pyupm_bh1749.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _pyupm_bh1749.SwigPyIterator_equal(self, x)

    def copy(self):
        return _pyupm_bh1749.SwigPyIterator_copy(self)

    def next(self):
        return _pyupm_bh1749.SwigPyIterator_next(self)

    def __next__(self):
        return _pyupm_bh1749.SwigPyIterator___next__(self)

    def previous(self):
        return _pyupm_bh1749.SwigPyIterator_previous(self)

    def advance(self, n):
        return _pyupm_bh1749.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _pyupm_bh1749.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _pyupm_bh1749.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _pyupm_bh1749.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _pyupm_bh1749.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _pyupm_bh1749.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _pyupm_bh1749.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _pyupm_bh1749:
_pyupm_bh1749.SwigPyIterator_swigregister(SwigPyIterator)

class uint16Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _pyupm_bh1749.uint16Vector_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _pyupm_bh1749.uint16Vector___nonzero__(self)

    def __bool__(self):
        return _pyupm_bh1749.uint16Vector___bool__(self)

    def __len__(self):
        return _pyupm_bh1749.uint16Vector___len__(self)

    def __getslice__(self, i, j):
        return _pyupm_bh1749.uint16Vector___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _pyupm_bh1749.uint16Vector___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _pyupm_bh1749.uint16Vector___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _pyupm_bh1749.uint16Vector___delitem__(self, *args)

    def __getitem__(self, *args):
        return _pyupm_bh1749.uint16Vector___getitem__(self, *args)

    def __setitem__(self, *args):
        return _pyupm_bh1749.uint16Vector___setitem__(self, *args)

    def pop(self):
        return _pyupm_bh1749.uint16Vector_pop(self)

    def append(self, x):
        return _pyupm_bh1749.uint16Vector_append(self, x)

    def empty(self):
        return _pyupm_bh1749.uint16Vector_empty(self)

    def size(self):
        return _pyupm_bh1749.uint16Vector_size(self)

    def swap(self, v):
        return _pyupm_bh1749.uint16Vector_swap(self, v)

    def begin(self):
        return _pyupm_bh1749.uint16Vector_begin(self)

    def end(self):
        return _pyupm_bh1749.uint16Vector_end(self)

    def rbegin(self):
        return _pyupm_bh1749.uint16Vector_rbegin(self)

    def rend(self):
        return _pyupm_bh1749.uint16Vector_rend(self)

    def clear(self):
        return _pyupm_bh1749.uint16Vector_clear(self)

    def get_allocator(self):
        return _pyupm_bh1749.uint16Vector_get_allocator(self)

    def pop_back(self):
        return _pyupm_bh1749.uint16Vector_pop_back(self)

    def erase(self, *args):
        return _pyupm_bh1749.uint16Vector_erase(self, *args)

    def __init__(self, *args):
        _pyupm_bh1749.uint16Vector_swiginit(self, _pyupm_bh1749.new_uint16Vector(*args))

    def push_back(self, x):
        return _pyupm_bh1749.uint16Vector_push_back(self, x)

    def front(self):
        return _pyupm_bh1749.uint16Vector_front(self)

    def back(self):
        return _pyupm_bh1749.uint16Vector_back(self)

    def assign(self, n, x):
        return _pyupm_bh1749.uint16Vector_assign(self, n, x)

    def resize(self, *args):
        return _pyupm_bh1749.uint16Vector_resize(self, *args)

    def insert(self, *args):
        return _pyupm_bh1749.uint16Vector_insert(self, *args)

    def reserve(self, n):
        return _pyupm_bh1749.uint16Vector_reserve(self, n)

    def capacity(self):
        return _pyupm_bh1749.uint16Vector_capacity(self)
    __swig_destroy__ = _pyupm_bh1749.delete_uint16Vector

# Register uint16Vector in _pyupm_bh1749:
_pyupm_bh1749.uint16Vector_swigregister(uint16Vector)

INT_JUDGE_0 = _pyupm_bh1749.INT_JUDGE_0
INT_JUDGE_1 = _pyupm_bh1749.INT_JUDGE_1
INT_JUDGE_4 = _pyupm_bh1749.INT_JUDGE_4
INT_JUDGE_8 = _pyupm_bh1749.INT_JUDGE_8
MEAS_35MS = _pyupm_bh1749.MEAS_35MS
MEAS_120MS = _pyupm_bh1749.MEAS_120MS
MEAS_240MS = _pyupm_bh1749.MEAS_240MS
RGB_GAIN_1X = _pyupm_bh1749.RGB_GAIN_1X
RGB_GAIN_32X = _pyupm_bh1749.RGB_GAIN_32X
IR_GAIN_1X = _pyupm_bh1749.IR_GAIN_1X
IR_GAIN_32X = _pyupm_bh1749.IR_GAIN_32X
RED = _pyupm_bh1749.RED
GREEN = _pyupm_bh1749.GREEN
BLUE = _pyupm_bh1749.BLUE
class _bh1749_context(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    i2c = property(_pyupm_bh1749._bh1749_context_i2c_get, _pyupm_bh1749._bh1749_context_i2c_set)
    interrupt = property(_pyupm_bh1749._bh1749_context_interrupt_get, _pyupm_bh1749._bh1749_context_interrupt_set)
    enabled = property(_pyupm_bh1749._bh1749_context_enabled_get, _pyupm_bh1749._bh1749_context_enabled_set)
    isrEnabled = property(_pyupm_bh1749._bh1749_context_isrEnabled_get, _pyupm_bh1749._bh1749_context_isrEnabled_set)
    int_thh = property(_pyupm_bh1749._bh1749_context_int_thh_get, _pyupm_bh1749._bh1749_context_int_thh_set)
    int_thl = property(_pyupm_bh1749._bh1749_context_int_thl_get, _pyupm_bh1749._bh1749_context_int_thl_set)
    int_src = property(_pyupm_bh1749._bh1749_context_int_src_get, _pyupm_bh1749._bh1749_context_int_src_set)
    ir_gain = property(_pyupm_bh1749._bh1749_context_ir_gain_get, _pyupm_bh1749._bh1749_context_ir_gain_set)
    rgb_gain = property(_pyupm_bh1749._bh1749_context_rgb_gain_get, _pyupm_bh1749._bh1749_context_rgb_gain_set)
    meas_time = property(_pyupm_bh1749._bh1749_context_meas_time_get, _pyupm_bh1749._bh1749_context_meas_time_set)
    operating_mode = property(_pyupm_bh1749._bh1749_context_operating_mode_get, _pyupm_bh1749._bh1749_context_operating_mode_set)

    def __init__(self):
        _pyupm_bh1749._bh1749_context_swiginit(self, _pyupm_bh1749.new__bh1749_context())
    __swig_destroy__ = _pyupm_bh1749.delete__bh1749_context

# Register _bh1749_context in _pyupm_bh1749:
_pyupm_bh1749._bh1749_context_swigregister(_bh1749_context)


def bh1749_check_who_am_i(dev):
    return _pyupm_bh1749.bh1749_check_who_am_i(dev)

def bh1749_init(bus, addr):
    return _pyupm_bh1749.bh1749_init(bus, addr)

def bh1749_close(dev):
    return _pyupm_bh1749.bh1749_close(dev)

def bh1749_enable(dev):
    return _pyupm_bh1749.bh1749_enable(dev)

def bh1749_disable(dev):
    return _pyupm_bh1749.bh1749_disable(dev)

def bh1749_sensor_init(dev, opMode, measTime, rgbGain, irGain, intSource):
    return _pyupm_bh1749.bh1749_sensor_init(dev, opMode, measTime, rgbGain, irGain, intSource)

def bh1749_set_operating_mode(dev, opMode):
    return _pyupm_bh1749.bh1749_set_operating_mode(dev, opMode)

def bh1749_get_operating_mode(dev, opMode):
    return _pyupm_bh1749.bh1749_get_operating_mode(dev, opMode)

def bh1749_set_measurement_time(dev, measTime):
    return _pyupm_bh1749.bh1749_set_measurement_time(dev, measTime)

def bh1749_get_measurement_time(dev, meas_time):
    return _pyupm_bh1749.bh1749_get_measurement_time(dev, meas_time)

def bh1749_set_rgb_gain(dev, rgbGain):
    return _pyupm_bh1749.bh1749_set_rgb_gain(dev, rgbGain)

def bh1749_get_rgb_gain(dev, gain):
    return _pyupm_bh1749.bh1749_get_rgb_gain(dev, gain)

def bh1749_set_ir_gain(dev, irGain):
    return _pyupm_bh1749.bh1749_set_ir_gain(dev, irGain)

def bh1749_get_ir_gain(dev, gain):
    return _pyupm_bh1749.bh1749_get_ir_gain(dev, gain)

def bh1749_set_int_source(dev, intSource):
    return _pyupm_bh1749.bh1749_set_int_source(dev, intSource)

def bh1749_get_interrupt_source_char(dev):
    return _pyupm_bh1749.bh1749_get_interrupt_source_char(dev)

def bh1749_enable_interrupt(dev):
    return _pyupm_bh1749.bh1749_enable_interrupt(dev)

def bh1749_disable_interrupt(dev):
    return _pyupm_bh1749.bh1749_disable_interrupt(dev)

def bh1749_reset_interrupt(dev):
    return _pyupm_bh1749.bh1749_reset_interrupt(dev)

def bh1749_is_interrupted(dev):
    return _pyupm_bh1749.bh1749_is_interrupted(dev)

def bh1749_is_interrupt_enabled(dev):
    return _pyupm_bh1749.bh1749_is_interrupt_enabled(dev)

def bh1749_soft_reset(dev):
    return _pyupm_bh1749.bh1749_soft_reset(dev)

def bh1749_set_threshold_high(dev, threshold):
    return _pyupm_bh1749.bh1749_set_threshold_high(dev, threshold)

def bh1749_get_threshold_high(dev, threshold):
    return _pyupm_bh1749.bh1749_get_threshold_high(dev, threshold)

def bh1749_set_threshold_low(dev, threshold):
    return _pyupm_bh1749.bh1749_set_threshold_low(dev, threshold)

def bh1749_get_threshold_low(dev, threshold):
    return _pyupm_bh1749.bh1749_get_threshold_low(dev, threshold)

def bh1749_get_red(dev, red):
    return _pyupm_bh1749.bh1749_get_red(dev, red)

def bh1749_get_green(dev, green):
    return _pyupm_bh1749.bh1749_get_green(dev, green)

def bh1749_get_blue(dev, blue):
    return _pyupm_bh1749.bh1749_get_blue(dev, blue)

def bh1749_get_ir(dev, ir):
    return _pyupm_bh1749.bh1749_get_ir(dev, ir)

def bh1749_get_green2(dev, green2):
    return _pyupm_bh1749.bh1749_get_green2(dev, green2)

def bh1749_get_measurements(dev, result):
    return _pyupm_bh1749.bh1749_get_measurements(dev, result)

def bh1749_install_isr(dev, edge, pin, isr, isr_args):
    return _pyupm_bh1749.bh1749_install_isr(dev, edge, pin, isr, isr_args)

def bh1749_remove_isr(dev):
    return _pyupm_bh1749.bh1749_remove_isr(dev)

def bh1749_registers_dump(dev, dump):
    return _pyupm_bh1749.bh1749_registers_dump(dev, dump)
class BH1749(object):
    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_bh1749.BH1749_swiginit(self, _pyupm_bh1749.new_BH1749(*args))
    __swig_destroy__ = _pyupm_bh1749.delete_BH1749

    def Enable(self):
        return _pyupm_bh1749.BH1749_Enable(self)

    def Disable(self):
        return _pyupm_bh1749.BH1749_Disable(self)

    def CheckWhoAmI(self):
        return _pyupm_bh1749.BH1749_CheckWhoAmI(self)

    def SensorInit(self, opMode, measTime, rgbGain, irGain, intSource):
        return _pyupm_bh1749.BH1749_SensorInit(self, opMode, measTime, rgbGain, irGain, intSource)

    def SetOperatingMode(self, opMode):
        return _pyupm_bh1749.BH1749_SetOperatingMode(self, opMode)

    def GetOperatingMode(self):
        return _pyupm_bh1749.BH1749_GetOperatingMode(self)

    def SetMeasurementTime(self, measTime):
        return _pyupm_bh1749.BH1749_SetMeasurementTime(self, measTime)

    def GetMeasurementTime(self):
        return _pyupm_bh1749.BH1749_GetMeasurementTime(self)

    def SetRgbGain(self, rgbGain):
        return _pyupm_bh1749.BH1749_SetRgbGain(self, rgbGain)

    def GetRgbGain(self):
        return _pyupm_bh1749.BH1749_GetRgbGain(self)

    def SetIrGain(self, irGain):
        return _pyupm_bh1749.BH1749_SetIrGain(self, irGain)

    def GetIrGain(self):
        return _pyupm_bh1749.BH1749_GetIrGain(self)

    def SetIntSource(self, intSource):
        return _pyupm_bh1749.BH1749_SetIntSource(self, intSource)

    def GetInterruptSourceChar(self):
        return _pyupm_bh1749.BH1749_GetInterruptSourceChar(self)

    def EnableInterrupt(self):
        return _pyupm_bh1749.BH1749_EnableInterrupt(self)

    def DisableInterrupt(self):
        return _pyupm_bh1749.BH1749_DisableInterrupt(self)

    def ResetInterrupt(self):
        return _pyupm_bh1749.BH1749_ResetInterrupt(self)

    def IsInterrupted(self):
        return _pyupm_bh1749.BH1749_IsInterrupted(self)

    def IsInterruptEnabled(self):
        return _pyupm_bh1749.BH1749_IsInterruptEnabled(self)

    def SoftReset(self):
        return _pyupm_bh1749.BH1749_SoftReset(self)

    def SetThresholdHigh(self, threshold):
        return _pyupm_bh1749.BH1749_SetThresholdHigh(self, threshold)

    def GetThresholdHigh(self):
        return _pyupm_bh1749.BH1749_GetThresholdHigh(self)

    def SetThresholdLow(self, threshold):
        return _pyupm_bh1749.BH1749_SetThresholdLow(self, threshold)

    def GetThresholdLow(self):
        return _pyupm_bh1749.BH1749_GetThresholdLow(self)

    def GetRed(self):
        return _pyupm_bh1749.BH1749_GetRed(self)

    def GetGreen(self):
        return _pyupm_bh1749.BH1749_GetGreen(self)

    def GetBlue(self):
        return _pyupm_bh1749.BH1749_GetBlue(self)

    def GetIr(self):
        return _pyupm_bh1749.BH1749_GetIr(self)

    def GetGeen2(self):
        return _pyupm_bh1749.BH1749_GetGeen2(self)

    def GetMeasurements(self):
        return _pyupm_bh1749.BH1749_GetMeasurements(self)

    def InstallISR(self, edge, pin, isr, isr_args):
        return _pyupm_bh1749.BH1749_InstallISR(self, edge, pin, isr, isr_args)

    def RemoveISR(self):
        return _pyupm_bh1749.BH1749_RemoveISR(self)

    def RegistersDump(self):
        return _pyupm_bh1749.BH1749_RegistersDump(self)

# Register BH1749 in _pyupm_bh1749:
_pyupm_bh1749.BH1749_swigregister(BH1749)



