# 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_2jciebu01_usb
else:
    import _pyupm_2jciebu01_usb

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_2jciebu01_usb.getVersion()
OM2JCIEBU_FLASH_LONG_DATA_READ_ADD_UART = _pyupm_2jciebu01_usb.OM2JCIEBU_FLASH_LONG_DATA_READ_ADD_UART
OM2JCIEBU_LIVE_LONG_DATA_READ_ADD_UART = _pyupm_2jciebu01_usb.OM2JCIEBU_LIVE_LONG_DATA_READ_ADD_UART
OM2JCIEBU_LED_CONFIGUARTION_ADD_UART = _pyupm_2jciebu01_usb.OM2JCIEBU_LED_CONFIGUARTION_ADD_UART
OM2JCIEBU_ADV_CONFIGUARTION_ADD_UART = _pyupm_2jciebu01_usb.OM2JCIEBU_ADV_CONFIGUARTION_ADD_UART
OM2JCIEBU_LED_CONFIGUARTION_UUID_BLE = _pyupm_2jciebu01_usb.OM2JCIEBU_LED_CONFIGUARTION_UUID_BLE
OM2JCIEBU_ADV_CONFIGUARTION_UUID_BLE = _pyupm_2jciebu01_usb.OM2JCIEBU_ADV_CONFIGUARTION_UUID_BLE
OM2JCIEBU_LIVE_LONG_DATA_READ_UUID_BLE = _pyupm_2jciebu01_usb.OM2JCIEBU_LIVE_LONG_DATA_READ_UUID_BLE
OM2JCIEBU_CRC_LENGTH = _pyupm_2jciebu01_usb.OM2JCIEBU_CRC_LENGTH
OM2JCIEBU_CRC16 = _pyupm_2jciebu01_usb.OM2JCIEBU_CRC16
OM2JCIEBU_INTERVAL_UNIT = _pyupm_2jciebu01_usb.OM2JCIEBU_INTERVAL_UNIT
class OM2JCIEBU(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
    ALL_PARAM = _pyupm_2jciebu01_usb.OM2JCIEBU_ALL_PARAM
    TEMP = _pyupm_2jciebu01_usb.OM2JCIEBU_TEMP
    HUMIDITY = _pyupm_2jciebu01_usb.OM2JCIEBU_HUMIDITY
    AMBIENT_LIGHT = _pyupm_2jciebu01_usb.OM2JCIEBU_AMBIENT_LIGHT
    PRESSURE = _pyupm_2jciebu01_usb.OM2JCIEBU_PRESSURE
    NOISE = _pyupm_2jciebu01_usb.OM2JCIEBU_NOISE
    ETVOC = _pyupm_2jciebu01_usb.OM2JCIEBU_ETVOC
    ECO2 = _pyupm_2jciebu01_usb.OM2JCIEBU_ECO2
    DISCOMFORT_INDEX = _pyupm_2jciebu01_usb.OM2JCIEBU_DISCOMFORT_INDEX
    HEAT_STROKE = _pyupm_2jciebu01_usb.OM2JCIEBU_HEAT_STROKE
    LED_CONFIGURE = _pyupm_2jciebu01_usb.OM2JCIEBU_LED_CONFIGURE
    ADV_CONFIGURE = _pyupm_2jciebu01_usb.OM2JCIEBU_ADV_CONFIGURE
    BLE = _pyupm_2jciebu01_usb.OM2JCIEBU_BLE
    USB_TO_UART = _pyupm_2jciebu01_usb.OM2JCIEBU_USB_TO_UART
    SENSOR_DATA = _pyupm_2jciebu01_usb.OM2JCIEBU_SENSOR_DATA
    ACCELERATION_DATA = _pyupm_2jciebu01_usb.OM2JCIEBU_ACCELERATION_DATA
    ACCELERATION_SENSOR_DATA = _pyupm_2jciebu01_usb.OM2JCIEBU_ACCELERATION_SENSOR_DATA
    ACCELERATION_SENSOR_FLAG = _pyupm_2jciebu01_usb.OM2JCIEBU_ACCELERATION_SENSOR_FLAG
    SERIAL_NUMBER = _pyupm_2jciebu01_usb.OM2JCIEBU_SERIAL_NUMBER
    ERROR_CRC_WRONG = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_CRC_WRONG
    ERROR_WRONG_COMMAND = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_WRONG_COMMAND
    ERROR_WRONG_ADDRESS = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_WRONG_ADDRESS
    ERROR_WRONG_LENGTH = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_WRONG_LENGTH
    ERROR_DATA_RANGE = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_DATA_RANGE
    ERROR_BUSY = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_BUSY
    ERROR_UNKNOWN = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_UNKNOWN
    ERROR_CRC_MISMATCH = _pyupm_2jciebu01_usb.OM2JCIEBU_ERROR_CRC_MISMATCH
    FAILURE = _pyupm_2jciebu01_usb.OM2JCIEBU_FAILURE
    SUCCESS = _pyupm_2jciebu01_usb.OM2JCIEBU_SUCCESS
    NORMALLY_OFF = _pyupm_2jciebu01_usb.OM2JCIEBU_NORMALLY_OFF
    NORMALLY_ON = _pyupm_2jciebu01_usb.OM2JCIEBU_NORMALLY_ON
    TEMP_SACLE = _pyupm_2jciebu01_usb.OM2JCIEBU_TEMP_SACLE
    HUMIDITY_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_HUMIDITY_SCALE
    AMBIENT_LIGHT_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_AMBIENT_LIGHT_SCALE
    PRESSURE_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_PRESSURE_SCALE
    NOISE_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_NOISE_SCALE
    ETVOC_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_ETVOC_SCALE
    SI_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_SI_SCALE
    PGA_SCALE = _pyupm_2jciebu01_usb.OM2JCIEBU_PGA_SCALE
    __swig_destroy__ = _pyupm_2jciebu01_usb.delete_OM2JCIEBU

    def getAddress(self, attribute_name, interface, attribute_value):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_getAddress(self, attribute_name, interface, attribute_value)

    def delay(self, second):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_delay(self, second)

    def crc_16(self, data, length):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_crc_16(self, data, length)

    def configureSensorLedState(self, state, red, green, blue):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_configureSensorLedState(self, state, red, green, blue)

    def configureSensorAdvSetting(self, milliseconds, adv_mode):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_configureSensorAdvSetting(self, milliseconds, adv_mode)

    def parseSensorData(self, data):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_parseSensorData(self, data)

    def getSensorData(self, attribute_name, attribute_data):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_getSensorData(self, attribute_name, attribute_data)

    def verifyPacket(self, pkt, len):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_verifyPacket(self, pkt, len)

# Register OM2JCIEBU in _pyupm_2jciebu01_usb:
_pyupm_2jciebu01_usb.OM2JCIEBU_swigregister(OM2JCIEBU)

OM2JCIEBU_UART_HEADER_START = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_HEADER_START
OM2JCIEBU_UART_HEADER_END = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_HEADER_END
OM2JCIEBU_UART_MAX_PKT_LEN = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_MAX_PKT_LEN
OM2JCIEBU_UART_MAX_READ_PKT_LEN = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_MAX_READ_PKT_LEN
OM2JCIEBU_UART_COMMAND_LENGHT = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_COMMAND_LENGHT
OM2JCIEBU_UART_ADDRESS_LENGTH = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ADDRESS_LENGTH
OM2JCIEBU_UART_HEADER_LENGTH = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_HEADER_LENGTH
OM2JCIEBU_UART_COMMAND_INDEX = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_COMMAND_INDEX
OM2JCIEBU_UART_COMMAND_ERROR_CODE_INDEX = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_COMMAND_ERROR_CODE_INDEX
class OM2JCIEBU_UART(OM2JCIEBU):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    UART_CMD_READ = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_UART_CMD_READ
    UART_CMD_WRITE = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_UART_CMD_WRITE
    ERROR_UART_CRC_WRONG = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_CRC_WRONG
    ERROR_UART_WRONG_COMMAND = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_WRONG_COMMAND
    ERROR_UART_WRONG_ADDRESS = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_WRONG_ADDRESS
    ERROR_UART_WRONG_LENGTH = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_WRONG_LENGTH
    ERROR_UART_DATA_RANGE = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_DATA_RANGE
    ERROR_UART_BUSY = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_BUSY
    ERROR_UART_UNKNOWN = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_ERROR_UART_UNKNOWN
    PARITY_UART_NONE = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_PARITY_UART_NONE
    PARITY_UART_EVEN = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_PARITY_UART_EVEN
    PARITY_UART_ODD = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_PARITY_UART_ODD
    PARITY_UART_MARK = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_PARITY_UART_MARK
    PARITY_UART_SPACE = _pyupm_2jciebu01_usb.OM2JCIEBU_UART_PARITY_UART_SPACE

    def __init__(self, path, baud=115200):
        _pyupm_2jciebu01_usb.OM2JCIEBU_UART_swiginit(self, _pyupm_2jciebu01_usb.new_OM2JCIEBU_UART(path, baud))

    def setupTty(self, baud=115200):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_setupTty(self, baud)

    def setMode(self, bytesize, parity, stopbits):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_setMode(self, bytesize, parity, stopbits)

    def setFlowControl(self, xonxoff, rtscts):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_setFlowControl(self, xonxoff, rtscts)

    def getSensorData(self, attribute_name, attribute_data):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_getSensorData(self, attribute_name, attribute_data)

    def configureSensorLedState(self, state, red, green, blue):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_configureSensorLedState(self, state, red, green, blue)

    def configureSensorAdvSetting(self, milliseconds, adv_mode):
        return _pyupm_2jciebu01_usb.OM2JCIEBU_UART_configureSensorAdvSetting(self, milliseconds, adv_mode)
    __swig_destroy__ = _pyupm_2jciebu01_usb.delete_OM2JCIEBU_UART

# Register OM2JCIEBU_UART in _pyupm_2jciebu01_usb:
_pyupm_2jciebu01_usb.OM2JCIEBU_UART_swigregister(OM2JCIEBU_UART)



