# 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_rn2903
else:
    import _pyupm_rn2903

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_rn2903.getVersion()
RN2903_MAX_BUFFER = _pyupm_rn2903.RN2903_MAX_BUFFER
RN2903_MAX_HEX_EUI64 = _pyupm_rn2903.RN2903_MAX_HEX_EUI64
RN2903_DEFAULT_BAUDRATE = _pyupm_rn2903.RN2903_DEFAULT_BAUDRATE
RN2903_DEFAULT_RESP_DELAY = _pyupm_rn2903.RN2903_DEFAULT_RESP_DELAY
RN2903_DEFAULT_RESP2_DELAY = _pyupm_rn2903.RN2903_DEFAULT_RESP2_DELAY
RN2903_PHRASE_TERM = _pyupm_rn2903.RN2903_PHRASE_TERM
RN2903_PHRASE_TERM_LEN = _pyupm_rn2903.RN2903_PHRASE_TERM_LEN
RN2903_PHRASE_INV_PARAM = _pyupm_rn2903.RN2903_PHRASE_INV_PARAM
RN2903_PHRASE_OK = _pyupm_rn2903.RN2903_PHRASE_OK
RN2903_MAC_STATUS_JOINED = _pyupm_rn2903.RN2903_MAC_STATUS_JOINED
RN2903_MAC_STATUS_MAC_STATUS0 = _pyupm_rn2903.RN2903_MAC_STATUS_MAC_STATUS0
RN2903_MAC_STATUS_MAC_STATUS1 = _pyupm_rn2903.RN2903_MAC_STATUS_MAC_STATUS1
RN2903_MAC_STATUS_MAC_STATUS2 = _pyupm_rn2903.RN2903_MAC_STATUS_MAC_STATUS2
_RN2903_MAC_STATUS_MAC_STATUS_MASK = _pyupm_rn2903._RN2903_MAC_STATUS_MAC_STATUS_MASK
_RN2903_MAC_STATUS_MAC_STATUS_SHIFT = _pyupm_rn2903._RN2903_MAC_STATUS_MAC_STATUS_SHIFT
RN2903_MAC_STATUS_AUTO_REPLY = _pyupm_rn2903.RN2903_MAC_STATUS_AUTO_REPLY
RN2903_MAC_STATUS_ADR = _pyupm_rn2903.RN2903_MAC_STATUS_ADR
RN2903_MAC_STATUS_SILENT = _pyupm_rn2903.RN2903_MAC_STATUS_SILENT
RN2903_MAC_STATUS_PAUSED = _pyupm_rn2903.RN2903_MAC_STATUS_PAUSED
RN2903_MAC_STATUS_RFU = _pyupm_rn2903.RN2903_MAC_STATUS_RFU
RN2903_MAC_STATUS_LINK_CHK = _pyupm_rn2903.RN2903_MAC_STATUS_LINK_CHK
RN2903_MAC_STATUS_CHAN_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_CHAN_UPD
RN2903_MAC_STATUS_OUT_PWR_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_OUT_PWR_UPD
RN2903_MAC_STATUS_NBREP_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_NBREP_UPD
RN2903_MAC_STATUS_PRESCALER_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_PRESCALER_UPD
RN2903_MAC_STATUS_SECOND_RX_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_SECOND_RX_UPD
RN2903_MAC_STATUS_TX_TIMING_UPD = _pyupm_rn2903.RN2903_MAC_STATUS_TX_TIMING_UPD
RN2903_MAC_STAT_IDLE = _pyupm_rn2903.RN2903_MAC_STAT_IDLE
RN2903_MAC_STAT_TX_IN_PROGESS = _pyupm_rn2903.RN2903_MAC_STAT_TX_IN_PROGESS
RN2903_MAC_STAT_BEFORE_RX_WIN1 = _pyupm_rn2903.RN2903_MAC_STAT_BEFORE_RX_WIN1
RN2903_MAC_STAT_RX_WIN1_OPEN = _pyupm_rn2903.RN2903_MAC_STAT_RX_WIN1_OPEN
RN2903_MAC_STAT_BETWEEN_RX_WIN1_WIN2 = _pyupm_rn2903.RN2903_MAC_STAT_BETWEEN_RX_WIN1_WIN2
RN2903_MAC_STAT_RX_WIN2_OPEN = _pyupm_rn2903.RN2903_MAC_STAT_RX_WIN2_OPEN
RN2903_MAC_STAT_ACK_TIMEOUT = _pyupm_rn2903.RN2903_MAC_STAT_ACK_TIMEOUT
RN2903_JOIN_TYPE_OTAA = _pyupm_rn2903.RN2903_JOIN_TYPE_OTAA
RN2903_JOIN_TYPE_ABP = _pyupm_rn2903.RN2903_JOIN_TYPE_ABP
RN2903_JOIN_STATUS_ACCEPTED = _pyupm_rn2903.RN2903_JOIN_STATUS_ACCEPTED
RN2903_JOIN_STATUS_BAD_KEYS = _pyupm_rn2903.RN2903_JOIN_STATUS_BAD_KEYS
RN2903_JOIN_STATUS_NO_CHAN = _pyupm_rn2903.RN2903_JOIN_STATUS_NO_CHAN
RN2903_JOIN_STATUS_SILENT = _pyupm_rn2903.RN2903_JOIN_STATUS_SILENT
RN2903_JOIN_STATUS_BUSY = _pyupm_rn2903.RN2903_JOIN_STATUS_BUSY
RN2903_JOIN_STATUS_MAC_PAUSED = _pyupm_rn2903.RN2903_JOIN_STATUS_MAC_PAUSED
RN2903_JOIN_STATUS_DENIED = _pyupm_rn2903.RN2903_JOIN_STATUS_DENIED
RN2903_JOIN_STATUS_ALREADY_JOINED = _pyupm_rn2903.RN2903_JOIN_STATUS_ALREADY_JOINED
RN2903_JOIN_STATUS_UPM_ERROR = _pyupm_rn2903.RN2903_JOIN_STATUS_UPM_ERROR
RN2903_FLOW_CONTROL_NONE = _pyupm_rn2903.RN2903_FLOW_CONTROL_NONE
RN2903_FLOW_CONTROL_HARD = _pyupm_rn2903.RN2903_FLOW_CONTROL_HARD
RN2903_MAC_MSG_TYPE_UNCONFIRMED = _pyupm_rn2903.RN2903_MAC_MSG_TYPE_UNCONFIRMED
RN2903_MAC_MSG_TYPE_CONFIRMED = _pyupm_rn2903.RN2903_MAC_MSG_TYPE_CONFIRMED
RN2903_MAC_TX_STATUS_TX_OK = _pyupm_rn2903.RN2903_MAC_TX_STATUS_TX_OK
RN2903_MAC_TX_STATUS_NOT_JOINED = _pyupm_rn2903.RN2903_MAC_TX_STATUS_NOT_JOINED
RN2903_MAC_TX_STATUS_NO_CHAN = _pyupm_rn2903.RN2903_MAC_TX_STATUS_NO_CHAN
RN2903_MAC_TX_STATUS_SILENT = _pyupm_rn2903.RN2903_MAC_TX_STATUS_SILENT
RN2903_MAC_TX_STATUS_FC_NEED_REJOIN = _pyupm_rn2903.RN2903_MAC_TX_STATUS_FC_NEED_REJOIN
RN2903_MAC_TX_STATUS_BUSY = _pyupm_rn2903.RN2903_MAC_TX_STATUS_BUSY
RN2903_MAC_TX_STATUS_MAC_PAUSED = _pyupm_rn2903.RN2903_MAC_TX_STATUS_MAC_PAUSED
RN2903_MAC_TX_STATUS_BAD_DATA_LEN = _pyupm_rn2903.RN2903_MAC_TX_STATUS_BAD_DATA_LEN
RN2903_MAC_TX_STATUS_RX_RECEIVED = _pyupm_rn2903.RN2903_MAC_TX_STATUS_RX_RECEIVED
RN2903_MAC_TX_STATUS_MAC_ERR = _pyupm_rn2903.RN2903_MAC_TX_STATUS_MAC_ERR
RN2903_MAC_TX_STATUS_UPM_ERROR = _pyupm_rn2903.RN2903_MAC_TX_STATUS_UPM_ERROR
RN2903_RESPONSE_OK = _pyupm_rn2903.RN2903_RESPONSE_OK
RN2903_RESPONSE_INVALID_PARAM = _pyupm_rn2903.RN2903_RESPONSE_INVALID_PARAM
RN2903_RESPONSE_TIMEOUT = _pyupm_rn2903.RN2903_RESPONSE_TIMEOUT
RN2903_RESPONSE_UPM_ERROR = _pyupm_rn2903.RN2903_RESPONSE_UPM_ERROR
class RN2903(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_rn2903.RN2903_swiginit(self, _pyupm_rn2903.new_RN2903(*args))
    __swig_destroy__ = _pyupm_rn2903.delete_RN2903

    def setResponseWaitTime(self, *args):
        return _pyupm_rn2903.RN2903_setResponseWaitTime(self, *args)

    def setResponse2WaitTime(self, *args):
        return _pyupm_rn2903.RN2903_setResponse2WaitTime(self, *args)

    def dataAvailable(self, millis):
        return _pyupm_rn2903.RN2903_dataAvailable(self, millis)

    def drain(self):
        return _pyupm_rn2903.RN2903_drain(self)

    def command(self, cmd):
        return _pyupm_rn2903.RN2903_command(self, cmd)

    def commandWithArg(self, cmd, arg):
        return _pyupm_rn2903.RN2903_commandWithArg(self, cmd, arg)

    def waitForResponse(self, wait_ms):
        return _pyupm_rn2903.RN2903_waitForResponse(self, wait_ms)

    def getResponse(self):
        return _pyupm_rn2903.RN2903_getResponse(self)

    def getResponseLen(self):
        return _pyupm_rn2903.RN2903_getResponseLen(self)

    def setDeviceEUI(self, str):
        return _pyupm_rn2903.RN2903_setDeviceEUI(self, str)

    def getDeviceEUI(self):
        return _pyupm_rn2903.RN2903_getDeviceEUI(self)

    def setDeviceAddr(self, str):
        return _pyupm_rn2903.RN2903_setDeviceAddr(self, str)

    def getDeviceAddr(self):
        return _pyupm_rn2903.RN2903_getDeviceAddr(self)

    def setNetworkSessionKey(self, str):
        return _pyupm_rn2903.RN2903_setNetworkSessionKey(self, str)

    def setApplicationSessionKey(self, str):
        return _pyupm_rn2903.RN2903_setApplicationSessionKey(self, str)

    def setApplicationEUI(self, str):
        return _pyupm_rn2903.RN2903_setApplicationEUI(self, str)

    def getApplicationEUI(self):
        return _pyupm_rn2903.RN2903_getApplicationEUI(self)

    def setApplicationKey(self, str):
        return _pyupm_rn2903.RN2903_setApplicationKey(self, str)

    def getApplicationKey(self):
        return _pyupm_rn2903.RN2903_getApplicationKey(self)

    def toHex(self, src):
        return _pyupm_rn2903.RN2903_toHex(self, src)

    def fromHex(self, src):
        return _pyupm_rn2903.RN2903_fromHex(self, src)

    def join(self, type):
        return _pyupm_rn2903.RN2903_join(self, type)

    def macTx(self, type, port, payload):
        return _pyupm_rn2903.RN2903_macTx(self, type, port, payload)

    def radioTx(self, payload):
        return _pyupm_rn2903.RN2903_radioTx(self, payload)

    def radioRx(self, window_size):
        return _pyupm_rn2903.RN2903_radioRx(self, window_size)

    def getHardwareEUI(self):
        return _pyupm_rn2903.RN2903_getHardwareEUI(self)

    def updateMacStatus(self):
        return _pyupm_rn2903.RN2903_updateMacStatus(self)

    def getMacStatusWord(self):
        return _pyupm_rn2903.RN2903_getMacStatusWord(self)

    def getMacStatus(self):
        return _pyupm_rn2903.RN2903_getMacStatus(self)

    def macSave(self):
        return _pyupm_rn2903.RN2903_macSave(self)

    def macPause(self):
        return _pyupm_rn2903.RN2903_macPause(self)

    def macResume(self):
        return _pyupm_rn2903.RN2903_macResume(self)

    def reset(self):
        return _pyupm_rn2903.RN2903_reset(self)

    def macSetBattery(self, level):
        return _pyupm_rn2903.RN2903_macSetBattery(self, level)

    def setDebug(self, enable):
        return _pyupm_rn2903.RN2903_setDebug(self, enable)

    def setBaudrate(self, baudrate):
        return _pyupm_rn2903.RN2903_setBaudrate(self, baudrate)

    def setFlowControl(self, fc):
        return _pyupm_rn2903.RN2903_setFlowControl(self, fc)

    def find(self, str):
        return _pyupm_rn2903.RN2903_find(self, str)

    def getRadioRxPayload(self):
        return _pyupm_rn2903.RN2903_getRadioRxPayload(self)

    def autobaud(self, retries):
        return _pyupm_rn2903.RN2903_autobaud(self, retries)

# Register RN2903 in _pyupm_rn2903:
_pyupm_rn2903.RN2903_swigregister(RN2903)



