# 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_bh1792
else:
    import _pyupm_bh1792

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_bh1792.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_bh1792.delete_SwigPyIterator

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

class intVector(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_bh1792.intVector_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _pyupm_bh1792.intVector___nonzero__(self)

    def __bool__(self):
        return _pyupm_bh1792.intVector___bool__(self)

    def __len__(self):
        return _pyupm_bh1792.intVector___len__(self)

    def __getslice__(self, i, j):
        return _pyupm_bh1792.intVector___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _pyupm_bh1792.intVector___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _pyupm_bh1792.intVector___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _pyupm_bh1792.intVector___delitem__(self, *args)

    def __getitem__(self, *args):
        return _pyupm_bh1792.intVector___getitem__(self, *args)

    def __setitem__(self, *args):
        return _pyupm_bh1792.intVector___setitem__(self, *args)

    def pop(self):
        return _pyupm_bh1792.intVector_pop(self)

    def append(self, x):
        return _pyupm_bh1792.intVector_append(self, x)

    def empty(self):
        return _pyupm_bh1792.intVector_empty(self)

    def size(self):
        return _pyupm_bh1792.intVector_size(self)

    def swap(self, v):
        return _pyupm_bh1792.intVector_swap(self, v)

    def begin(self):
        return _pyupm_bh1792.intVector_begin(self)

    def end(self):
        return _pyupm_bh1792.intVector_end(self)

    def rbegin(self):
        return _pyupm_bh1792.intVector_rbegin(self)

    def rend(self):
        return _pyupm_bh1792.intVector_rend(self)

    def clear(self):
        return _pyupm_bh1792.intVector_clear(self)

    def get_allocator(self):
        return _pyupm_bh1792.intVector_get_allocator(self)

    def pop_back(self):
        return _pyupm_bh1792.intVector_pop_back(self)

    def erase(self, *args):
        return _pyupm_bh1792.intVector_erase(self, *args)

    def __init__(self, *args):
        _pyupm_bh1792.intVector_swiginit(self, _pyupm_bh1792.new_intVector(*args))

    def push_back(self, x):
        return _pyupm_bh1792.intVector_push_back(self, x)

    def front(self):
        return _pyupm_bh1792.intVector_front(self)

    def back(self):
        return _pyupm_bh1792.intVector_back(self)

    def assign(self, n, x):
        return _pyupm_bh1792.intVector_assign(self, n, x)

    def resize(self, *args):
        return _pyupm_bh1792.intVector_resize(self, *args)

    def insert(self, *args):
        return _pyupm_bh1792.intVector_insert(self, *args)

    def reserve(self, n):
        return _pyupm_bh1792.intVector_reserve(self, n)

    def capacity(self):
        return _pyupm_bh1792.intVector_capacity(self)
    __swig_destroy__ = _pyupm_bh1792.delete_intVector

# Register intVector in _pyupm_bh1792:
_pyupm_bh1792.intVector_swigregister(intVector)

class intVector2D(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_bh1792.intVector2D_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _pyupm_bh1792.intVector2D___nonzero__(self)

    def __bool__(self):
        return _pyupm_bh1792.intVector2D___bool__(self)

    def __len__(self):
        return _pyupm_bh1792.intVector2D___len__(self)

    def __getslice__(self, i, j):
        return _pyupm_bh1792.intVector2D___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _pyupm_bh1792.intVector2D___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _pyupm_bh1792.intVector2D___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _pyupm_bh1792.intVector2D___delitem__(self, *args)

    def __getitem__(self, *args):
        return _pyupm_bh1792.intVector2D___getitem__(self, *args)

    def __setitem__(self, *args):
        return _pyupm_bh1792.intVector2D___setitem__(self, *args)

    def pop(self):
        return _pyupm_bh1792.intVector2D_pop(self)

    def append(self, x):
        return _pyupm_bh1792.intVector2D_append(self, x)

    def empty(self):
        return _pyupm_bh1792.intVector2D_empty(self)

    def size(self):
        return _pyupm_bh1792.intVector2D_size(self)

    def swap(self, v):
        return _pyupm_bh1792.intVector2D_swap(self, v)

    def begin(self):
        return _pyupm_bh1792.intVector2D_begin(self)

    def end(self):
        return _pyupm_bh1792.intVector2D_end(self)

    def rbegin(self):
        return _pyupm_bh1792.intVector2D_rbegin(self)

    def rend(self):
        return _pyupm_bh1792.intVector2D_rend(self)

    def clear(self):
        return _pyupm_bh1792.intVector2D_clear(self)

    def get_allocator(self):
        return _pyupm_bh1792.intVector2D_get_allocator(self)

    def pop_back(self):
        return _pyupm_bh1792.intVector2D_pop_back(self)

    def erase(self, *args):
        return _pyupm_bh1792.intVector2D_erase(self, *args)

    def __init__(self, *args):
        _pyupm_bh1792.intVector2D_swiginit(self, _pyupm_bh1792.new_intVector2D(*args))

    def push_back(self, x):
        return _pyupm_bh1792.intVector2D_push_back(self, x)

    def front(self):
        return _pyupm_bh1792.intVector2D_front(self)

    def back(self):
        return _pyupm_bh1792.intVector2D_back(self)

    def assign(self, n, x):
        return _pyupm_bh1792.intVector2D_assign(self, n, x)

    def resize(self, *args):
        return _pyupm_bh1792.intVector2D_resize(self, *args)

    def insert(self, *args):
        return _pyupm_bh1792.intVector2D_insert(self, *args)

    def reserve(self, n):
        return _pyupm_bh1792.intVector2D_reserve(self, n)

    def capacity(self):
        return _pyupm_bh1792.intVector2D_capacity(self)
    __swig_destroy__ = _pyupm_bh1792.delete_intVector2D

# Register intVector2D in _pyupm_bh1792:
_pyupm_bh1792.intVector2D_swigregister(intVector2D)

ONE_SEC_IN_MIRCO_SEC = _pyupm_bh1792.ONE_SEC_IN_MIRCO_SEC
FIFO_WATERMARK = _pyupm_bh1792.FIFO_WATERMARK
LED_CURRENT_MAX = _pyupm_bh1792.LED_CURRENT_MAX
MSR_64Hz = _pyupm_bh1792.MSR_64Hz
MSR_32Hz = _pyupm_bh1792.MSR_32Hz
MSR_128Hz = _pyupm_bh1792.MSR_128Hz
MSR_256Hz = _pyupm_bh1792.MSR_256Hz
MSR_1024Hz = _pyupm_bh1792.MSR_1024Hz
MSR_NON_SYNC = _pyupm_bh1792.MSR_NON_SYNC
MSR_SINGLE = _pyupm_bh1792.MSR_SINGLE
GREEN = _pyupm_bh1792.GREEN
IR = _pyupm_bh1792.IR
WATER_MARK = _pyupm_bh1792.WATER_MARK
IR_THRESHOLD_JUDGE = _pyupm_bh1792.IR_THRESHOLD_JUDGE
ON_COMPLETE = _pyupm_bh1792.ON_COMPLETE
SYNCHRONIZED = _pyupm_bh1792.SYNCHRONIZED
NON_SYNCHRONIZED = _pyupm_bh1792.NON_SYNCHRONIZED
SINGLE_GREEN = _pyupm_bh1792.SINGLE_GREEN
SINGLE_IR = _pyupm_bh1792.SINGLE_IR
class _bh1792_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_bh1792._bh1792_context_i2c_get, _pyupm_bh1792._bh1792_context_i2c_set)
    interrupt = property(_pyupm_bh1792._bh1792_context_interrupt_get, _pyupm_bh1792._bh1792_context_interrupt_set)
    enabled = property(_pyupm_bh1792._bh1792_context_enabled_get, _pyupm_bh1792._bh1792_context_enabled_set)
    isrEnabled = property(_pyupm_bh1792._bh1792_context_isrEnabled_get, _pyupm_bh1792._bh1792_context_isrEnabled_set)
    op_mode = property(_pyupm_bh1792._bh1792_context_op_mode_get, _pyupm_bh1792._bh1792_context_op_mode_set)
    sync_thread = property(_pyupm_bh1792._bh1792_context_sync_thread_get, _pyupm_bh1792._bh1792_context_sync_thread_set)
    sync_thread_alive = property(_pyupm_bh1792._bh1792_context_sync_thread_alive_get, _pyupm_bh1792._bh1792_context_sync_thread_alive_set)
    led_type = property(_pyupm_bh1792._bh1792_context_led_type_get, _pyupm_bh1792._bh1792_context_led_type_set)
    interrupt_mode = property(_pyupm_bh1792._bh1792_context_interrupt_mode_get, _pyupm_bh1792._bh1792_context_interrupt_mode_set)
    meas_freq = property(_pyupm_bh1792._bh1792_context_meas_freq_get, _pyupm_bh1792._bh1792_context_meas_freq_set)
    green_current = property(_pyupm_bh1792._bh1792_context_green_current_get, _pyupm_bh1792._bh1792_context_green_current_set)
    ir_current = property(_pyupm_bh1792._bh1792_context_ir_current_get, _pyupm_bh1792._bh1792_context_ir_current_set)
    threshold = property(_pyupm_bh1792._bh1792_context_threshold_get, _pyupm_bh1792._bh1792_context_threshold_set)

    def __init__(self):
        _pyupm_bh1792._bh1792_context_swiginit(self, _pyupm_bh1792.new__bh1792_context())
    __swig_destroy__ = _pyupm_bh1792.delete__bh1792_context

# Register _bh1792_context in _pyupm_bh1792:
_pyupm_bh1792._bh1792_context_swigregister(_bh1792_context)


def bh1792_init(bus, addr):
    return _pyupm_bh1792.bh1792_init(bus, addr)

def bh1792_close(dev):
    return _pyupm_bh1792.bh1792_close(dev)

def bh1792_check_who_am_i(dev):
    return _pyupm_bh1792.bh1792_check_who_am_i(dev)

def bh1792_is_enabled(dev):
    return _pyupm_bh1792.bh1792_is_enabled(dev)

def bh1792_soft_reset(dev):
    return _pyupm_bh1792.bh1792_soft_reset(dev)

def bh1792_get_meas_time_ms(dev, meas_time):
    return _pyupm_bh1792.bh1792_get_meas_time_ms(dev, meas_time)

def bh1792_set_green_leds_current(dev, current):
    return _pyupm_bh1792.bh1792_set_green_leds_current(dev, current)

def bh1792_get_green_leds_current(dev, current):
    return _pyupm_bh1792.bh1792_get_green_leds_current(dev, current)

def bh1792_set_ir_led_current(dev, current):
    return _pyupm_bh1792.bh1792_set_ir_led_current(dev, current)

def bh1792_get_ir_led_current(dev, current):
    return _pyupm_bh1792.bh1792_get_ir_led_current(dev, current)

def bh1792_set_ir_threshold(dev, threshold):
    return _pyupm_bh1792.bh1792_set_ir_threshold(dev, threshold)

def bh1792_get_ir_threshold(dev, threshold):
    return _pyupm_bh1792.bh1792_get_ir_threshold(dev, threshold)

def bh1792_get_fifo_size(dev, count):
    return _pyupm_bh1792.bh1792_get_fifo_size(dev, count)

def bh1792_disable_interrupt(dev):
    return _pyupm_bh1792.bh1792_disable_interrupt(dev)

def bh1792_clear_interrupt(dev):
    return _pyupm_bh1792.bh1792_clear_interrupt(dev)

def bh1792_start_measurement(dev):
    return _pyupm_bh1792.bh1792_start_measurement(dev)

def bh1792_stop_measurement(dev):
    return _pyupm_bh1792.bh1792_stop_measurement(dev)

def bh1792_restart_measurement(dev):
    return _pyupm_bh1792.bh1792_restart_measurement(dev)

def bh1792_get_fifo_data(dev, fifo_led_off, fifo_led_on):
    return _pyupm_bh1792.bh1792_get_fifo_data(dev, fifo_led_off, fifo_led_on)

def bh1792_discard_fifo_data(dev):
    return _pyupm_bh1792.bh1792_discard_fifo_data(dev)

def bh1792_get_green_data(dev, green_led_off, green_led_on):
    return _pyupm_bh1792.bh1792_get_green_data(dev, green_led_off, green_led_on)

def bh1792_get_ir_data(dev, ir_led_off, ir_led_on):
    return _pyupm_bh1792.bh1792_get_ir_data(dev, ir_led_off, ir_led_on)

def bh1792_enable_sync_mode(dev, meas_freq, green_current):
    return _pyupm_bh1792.bh1792_enable_sync_mode(dev, meas_freq, green_current)

def bh1792_enable_non_sync_mode(dev, ir_current, threshold):
    return _pyupm_bh1792.bh1792_enable_non_sync_mode(dev, ir_current, threshold)

def bh1792_enable_single_mode(dev, led_type, current):
    return _pyupm_bh1792.bh1792_enable_single_mode(dev, led_type, current)

def bh1792_install_isr(dev, edge, pin, isr, isr_args):
    return _pyupm_bh1792.bh1792_install_isr(dev, edge, pin, isr, isr_args)

def bh1792_install_isr_falling_edge(dev, pin, isr, isr_args):
    return _pyupm_bh1792.bh1792_install_isr_falling_edge(dev, pin, isr, isr_args)

def bh1792_remove_isr(dev):
    return _pyupm_bh1792.bh1792_remove_isr(dev)

def bh1792_registers_dump(dev, dump):
    return _pyupm_bh1792.bh1792_registers_dump(dev, dump)
class BH1792(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_bh1792.BH1792_swiginit(self, _pyupm_bh1792.new_BH1792(*args))
    __swig_destroy__ = _pyupm_bh1792.delete_BH1792

    def CheckWhoAmI(self):
        return _pyupm_bh1792.BH1792_CheckWhoAmI(self)

    def IsEnabled(self):
        return _pyupm_bh1792.BH1792_IsEnabled(self)

    def SoftReset(self):
        return _pyupm_bh1792.BH1792_SoftReset(self)

    def GetMeasurementTimeMS(self):
        return _pyupm_bh1792.BH1792_GetMeasurementTimeMS(self)

    def SetGreenLedsCurrent(self, current):
        return _pyupm_bh1792.BH1792_SetGreenLedsCurrent(self, current)

    def GetGreenLedsCurrent(self):
        return _pyupm_bh1792.BH1792_GetGreenLedsCurrent(self)

    def SetIrLedCurrent(self, current):
        return _pyupm_bh1792.BH1792_SetIrLedCurrent(self, current)

    def GetIrLedCurrent(self):
        return _pyupm_bh1792.BH1792_GetIrLedCurrent(self)

    def SetIrThreshold(self, threshold):
        return _pyupm_bh1792.BH1792_SetIrThreshold(self, threshold)

    def GetIrThreshold(self):
        return _pyupm_bh1792.BH1792_GetIrThreshold(self)

    def GetFifoSize(self):
        return _pyupm_bh1792.BH1792_GetFifoSize(self)

    def DisableInterrupt(self):
        return _pyupm_bh1792.BH1792_DisableInterrupt(self)

    def ClearInterrupt(self):
        return _pyupm_bh1792.BH1792_ClearInterrupt(self)

    def StartMeasurement(self):
        return _pyupm_bh1792.BH1792_StartMeasurement(self)

    def StopMeasurement(self):
        return _pyupm_bh1792.BH1792_StopMeasurement(self)

    def RestartMeasurement(self):
        return _pyupm_bh1792.BH1792_RestartMeasurement(self)

    def GetFifoData(self):
        return _pyupm_bh1792.BH1792_GetFifoData(self)

    def DiscardFifoData(self):
        return _pyupm_bh1792.BH1792_DiscardFifoData(self)

    def GetGreenData(self):
        return _pyupm_bh1792.BH1792_GetGreenData(self)

    def GetIrData(self):
        return _pyupm_bh1792.BH1792_GetIrData(self)

    def EnableSyncMode(self, measFreq, green_current):
        return _pyupm_bh1792.BH1792_EnableSyncMode(self, measFreq, green_current)

    def EnableNonSyncMode(self, ir_current, threshold):
        return _pyupm_bh1792.BH1792_EnableNonSyncMode(self, ir_current, threshold)

    def EnableSingleMode(self, led_type, current):
        return _pyupm_bh1792.BH1792_EnableSingleMode(self, led_type, current)

    def InstallISR(self, *args):
        return _pyupm_bh1792.BH1792_InstallISR(self, *args)

    def RemoveISR(self):
        return _pyupm_bh1792.BH1792_RemoveISR(self)

    def RegistersDump(self):
        return _pyupm_bh1792.BH1792_RegistersDump(self)

# Register BH1792 in _pyupm_bh1792:
_pyupm_bh1792.BH1792_swigregister(BH1792)



