# 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_hmtrp
else:
    import _pyupm_hmtrp

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_hmtrp.getVersion()
class uint8Array(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, nelements):
        _pyupm_hmtrp.uint8Array_swiginit(self, _pyupm_hmtrp.new_uint8Array(nelements))
    __swig_destroy__ = _pyupm_hmtrp.delete_uint8Array

    def __getitem__(self, index):
        return _pyupm_hmtrp.uint8Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_hmtrp.uint8Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_hmtrp.uint8Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_hmtrp.uint8Array_frompointer(t)

# Register uint8Array in _pyupm_hmtrp:
_pyupm_hmtrp.uint8Array_swigregister(uint8Array)

def uint8Array_frompointer(t):
    return _pyupm_hmtrp.uint8Array_frompointer(t)

class uint16Array(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, nelements):
        _pyupm_hmtrp.uint16Array_swiginit(self, _pyupm_hmtrp.new_uint16Array(nelements))
    __swig_destroy__ = _pyupm_hmtrp.delete_uint16Array

    def __getitem__(self, index):
        return _pyupm_hmtrp.uint16Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_hmtrp.uint16Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_hmtrp.uint16Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_hmtrp.uint16Array_frompointer(t)

# Register uint16Array in _pyupm_hmtrp:
_pyupm_hmtrp.uint16Array_swigregister(uint16Array)

def uint16Array_frompointer(t):
    return _pyupm_hmtrp.uint16Array_frompointer(t)

class uint32Array(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, nelements):
        _pyupm_hmtrp.uint32Array_swiginit(self, _pyupm_hmtrp.new_uint32Array(nelements))
    __swig_destroy__ = _pyupm_hmtrp.delete_uint32Array

    def __getitem__(self, index):
        return _pyupm_hmtrp.uint32Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_hmtrp.uint32Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_hmtrp.uint32Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_hmtrp.uint32Array_frompointer(t)

# Register uint32Array in _pyupm_hmtrp:
_pyupm_hmtrp.uint32Array_swigregister(uint32Array)

def uint32Array_frompointer(t):
    return _pyupm_hmtrp.uint32Array_frompointer(t)

class charArray(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, nelements):
        _pyupm_hmtrp.charArray_swiginit(self, _pyupm_hmtrp.new_charArray(nelements))
    __swig_destroy__ = _pyupm_hmtrp.delete_charArray

    def __getitem__(self, index):
        return _pyupm_hmtrp.charArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_hmtrp.charArray___setitem__(self, index, value)

    def cast(self):
        return _pyupm_hmtrp.charArray_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_hmtrp.charArray_frompointer(t)

# Register charArray in _pyupm_hmtrp:
_pyupm_hmtrp.charArray_swigregister(charArray)

def charArray_frompointer(t):
    return _pyupm_hmtrp.charArray_frompointer(t)

HMTRP_DEFAULT_UART = _pyupm_hmtrp.HMTRP_DEFAULT_UART
class HMTRP(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    RESET = _pyupm_hmtrp.HMTRP_RESET
    GET_CONFIG = _pyupm_hmtrp.HMTRP_GET_CONFIG
    SET_FREQUENCY = _pyupm_hmtrp.HMTRP_SET_FREQUENCY
    SET_RF_DATARATE = _pyupm_hmtrp.HMTRP_SET_RF_DATARATE
    SET_RX_BW = _pyupm_hmtrp.HMTRP_SET_RX_BW
    SET_FREQ_MODULATION = _pyupm_hmtrp.HMTRP_SET_FREQ_MODULATION
    SET_TX_POWER = _pyupm_hmtrp.HMTRP_SET_TX_POWER
    SET_UART_SPEED = _pyupm_hmtrp.HMTRP_SET_UART_SPEED
    GET_RF_SIGNAL_STR = _pyupm_hmtrp.HMTRP_GET_RF_SIGNAL_STR
    GET_MOD_SIGNAL_STR = _pyupm_hmtrp.HMTRP_GET_MOD_SIGNAL_STR

    def __init__(self, uart=0):
        _pyupm_hmtrp.HMTRP_swiginit(self, _pyupm_hmtrp.new_HMTRP(uart))
    __swig_destroy__ = _pyupm_hmtrp.delete_HMTRP

    def dataAvailable(self, millis=0):
        return _pyupm_hmtrp.HMTRP_dataAvailable(self, millis)

    def readData(self, buffer, len, millis=-1):
        return _pyupm_hmtrp.HMTRP_readData(self, buffer, len, millis)

    def writeData(self, buffer, len):
        return _pyupm_hmtrp.HMTRP_writeData(self, buffer, len)

    def setupTty(self, *args):
        return _pyupm_hmtrp.HMTRP_setupTty(self, *args)

    def checkOK(self):
        return _pyupm_hmtrp.HMTRP_checkOK(self)

    def reset(self):
        return _pyupm_hmtrp.HMTRP_reset(self)

    def getConfig(self, freq, dataRate, rxBandwidth, modulation, txPower, uartBaud):
        return _pyupm_hmtrp.HMTRP_getConfig(self, freq, dataRate, rxBandwidth, modulation, txPower, uartBaud)

    def setFrequency(self, freq):
        return _pyupm_hmtrp.HMTRP_setFrequency(self, freq)

    def setRFDataRate(self, rate):
        return _pyupm_hmtrp.HMTRP_setRFDataRate(self, rate)

    def setRXBandwidth(self, rxBand):
        return _pyupm_hmtrp.HMTRP_setRXBandwidth(self, rxBand)

    def setFrequencyModulation(self, modulation):
        return _pyupm_hmtrp.HMTRP_setFrequencyModulation(self, modulation)

    def setTransmitPower(self, power):
        return _pyupm_hmtrp.HMTRP_setTransmitPower(self, power)

    def setUARTSpeed(self, speed):
        return _pyupm_hmtrp.HMTRP_setUARTSpeed(self, speed)

    def getRFSignalStrength(self, strength):
        return _pyupm_hmtrp.HMTRP_getRFSignalStrength(self, strength)

    def getRFSignalStrengthNoParam(self):
        return _pyupm_hmtrp.HMTRP_getRFSignalStrengthNoParam(self)

    def getModSignalStrength(self, strength):
        return _pyupm_hmtrp.HMTRP_getModSignalStrength(self, strength)

    def getModSignalStrengthNoParam(self):
        return _pyupm_hmtrp.HMTRP_getModSignalStrengthNoParam(self)

# Register HMTRP in _pyupm_hmtrp:
_pyupm_hmtrp.HMTRP_swigregister(HMTRP)


cvar = _pyupm_hmtrp.cvar

