# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_sm130')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_sm130')
    _pyupm_sm130 = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pyupm_sm130', [dirname(__file__)])
        except ImportError:
            import _pyupm_sm130
            return _pyupm_sm130
        try:
            _mod = imp.load_module('_pyupm_sm130', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_sm130 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_sm130
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def getVersion():
    return _pyupm_sm130.getVersion()
getVersion = _pyupm_sm130.getVersion
SM130_DEFAULT_UART = _pyupm_sm130.SM130_DEFAULT_UART
SM130_DEFAULT_RESET_PIN = _pyupm_sm130.SM130_DEFAULT_RESET_PIN
class SM130(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SM130, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SM130, name)
    __repr__ = _swig_repr
    CMD_RESET = _pyupm_sm130.SM130_CMD_RESET
    CMD_VERSION = _pyupm_sm130.SM130_CMD_VERSION
    CMD_SEEK_TAG = _pyupm_sm130.SM130_CMD_SEEK_TAG
    CMD_SELECT_TAG = _pyupm_sm130.SM130_CMD_SELECT_TAG
    CMD_AUTHENTICATE = _pyupm_sm130.SM130_CMD_AUTHENTICATE
    CMD_READ16 = _pyupm_sm130.SM130_CMD_READ16
    CMD_READ_VALUE = _pyupm_sm130.SM130_CMD_READ_VALUE
    CMD_WRITE16 = _pyupm_sm130.SM130_CMD_WRITE16
    CMD_WRITE_VALUE = _pyupm_sm130.SM130_CMD_WRITE_VALUE
    CMD_WRITE4 = _pyupm_sm130.SM130_CMD_WRITE4
    CMD_WRITE_KEY = _pyupm_sm130.SM130_CMD_WRITE_KEY
    CMD_INC_VALUE = _pyupm_sm130.SM130_CMD_INC_VALUE
    CMD_DEC_VALUE = _pyupm_sm130.SM130_CMD_DEC_VALUE
    CMD_ANTENNA_POWER = _pyupm_sm130.SM130_CMD_ANTENNA_POWER
    CMD_READ_PORT = _pyupm_sm130.SM130_CMD_READ_PORT
    CMD_WRITE_PORT = _pyupm_sm130.SM130_CMD_WRITE_PORT
    CMD_HALT_TAG = _pyupm_sm130.SM130_CMD_HALT_TAG
    CMD_SET_BAUD = _pyupm_sm130.SM130_CMD_SET_BAUD
    CMD_SLEEP = _pyupm_sm130.SM130_CMD_SLEEP
    TAG_NONE = _pyupm_sm130.SM130_TAG_NONE
    TAG_MIFARE_ULTRALIGHT = _pyupm_sm130.SM130_TAG_MIFARE_ULTRALIGHT
    TAG_MIFARE_1K = _pyupm_sm130.SM130_TAG_MIFARE_1K
    TAG_MIFARE_4K = _pyupm_sm130.SM130_TAG_MIFARE_4K
    TAG_UNKNOWN = _pyupm_sm130.SM130_TAG_UNKNOWN
    KEY_TYPE_EEPROM_A0 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A0
    KEY_TYPE_EEPROM_A1 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A1
    KEY_TYPE_EEPROM_A2 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A2
    KEY_TYPE_EEPROM_A3 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A3
    KEY_TYPE_EEPROM_A4 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A4
    KEY_TYPE_EEPROM_A5 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A5
    KEY_TYPE_EEPROM_A6 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A6
    KEY_TYPE_EEPROM_A7 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A7
    KEY_TYPE_EEPROM_A8 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A8
    KEY_TYPE_EEPROM_A9 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A9
    KEY_TYPE_EEPROM_A10 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A10
    KEY_TYPE_EEPROM_A11 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A11
    KEY_TYPE_EEPROM_A12 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A12
    KEY_TYPE_EEPROM_A13 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A13
    KEY_TYPE_EEPROM_A14 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A14
    KEY_TYPE_EEPROM_A15 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_A15
    KEY_TYPE_EEPROM_B0 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B0
    KEY_TYPE_EEPROM_B1 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B1
    KEY_TYPE_EEPROM_B2 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B2
    KEY_TYPE_EEPROM_B3 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B3
    KEY_TYPE_EEPROM_B4 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B4
    KEY_TYPE_EEPROM_B5 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B5
    KEY_TYPE_EEPROM_B6 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B6
    KEY_TYPE_EEPROM_B7 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B7
    KEY_TYPE_EEPROM_B8 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B8
    KEY_TYPE_EEPROM_B9 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B9
    KEY_TYPE_EEPROM_B10 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B10
    KEY_TYPE_EEPROM_B11 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B11
    KEY_TYPE_EEPROM_B12 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B12
    KEY_TYPE_EEPROM_B13 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B13
    KEY_TYPE_EEPROM_B14 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B14
    KEY_TYPE_EEPROM_B15 = _pyupm_sm130.SM130_KEY_TYPE_EEPROM_B15
    KEY_TYPE_A = _pyupm_sm130.SM130_KEY_TYPE_A
    KEY_TYPE_B = _pyupm_sm130.SM130_KEY_TYPE_B
    KEY_TYPE_A_AND_TRANSPORT_F = _pyupm_sm130.SM130_KEY_TYPE_A_AND_TRANSPORT_F

    def __init__(self, uart=0, reset=13):
        this = _pyupm_sm130.new_SM130(uart, reset)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_sm130.delete_SM130
    __del__ = lambda self: None

    def setBaudRate(self, baud=19200):
        return _pyupm_sm130.SM130_setBaudRate(self, baud)

    def getFirmwareVersion(self):
        return _pyupm_sm130.SM130_getFirmwareVersion(self)

    def reset(self):
        return _pyupm_sm130.SM130_reset(self)

    def hardwareReset(self):
        return _pyupm_sm130.SM130_hardwareReset(self)

    def select(self):
        return _pyupm_sm130.SM130_select(self)

    def waitForTag(self, timeout):
        return _pyupm_sm130.SM130_waitForTag(self, timeout)

    def authenticate(self, *args):
        return _pyupm_sm130.SM130_authenticate(self, *args)

    def readBlock16(self, block):
        return _pyupm_sm130.SM130_readBlock16(self, block)

    def readValueBlock(self, block):
        return _pyupm_sm130.SM130_readValueBlock(self, block)

    def writeBlock16(self, block, contents):
        return _pyupm_sm130.SM130_writeBlock16(self, block, contents)

    def writeValueBlock(self, block, value):
        return _pyupm_sm130.SM130_writeValueBlock(self, block, value)

    def writeBlock4(self, block, contents):
        return _pyupm_sm130.SM130_writeBlock4(self, block, contents)

    def writeKey(self, eepromSector, keyType, key):
        return _pyupm_sm130.SM130_writeKey(self, eepromSector, keyType, key)

    def adjustValueBlock(self, block, value, incr):
        return _pyupm_sm130.SM130_adjustValueBlock(self, block, value, incr)

    def setAntennaPower(self, on):
        return _pyupm_sm130.SM130_setAntennaPower(self, on)

    def readPorts(self):
        return _pyupm_sm130.SM130_readPorts(self)

    def writePorts(self, val):
        return _pyupm_sm130.SM130_writePorts(self, val)

    def haltTag(self):
        return _pyupm_sm130.SM130_haltTag(self)

    def setSM130BaudRate(self, baud):
        return _pyupm_sm130.SM130_setSM130BaudRate(self, baud)

    def sleep(self):
        return _pyupm_sm130.SM130_sleep(self)

    def getLastErrorCode(self):
        return _pyupm_sm130.SM130_getLastErrorCode(self)

    def getLastErrorString(self):
        return _pyupm_sm130.SM130_getLastErrorString(self)

    def getUIDLen(self):
        return _pyupm_sm130.SM130_getUIDLen(self)

    def getUID(self):
        return _pyupm_sm130.SM130_getUID(self)

    def getTagType(self):
        return _pyupm_sm130.SM130_getTagType(self)

    def tag2String(self, tag):
        return _pyupm_sm130.SM130_tag2String(self, tag)

    def string2HexString(self, input):
        return _pyupm_sm130.SM130_string2HexString(self, input)
SM130_swigregister = _pyupm_sm130.SM130_swigregister
SM130_swigregister(SM130)

# This file is compatible with both classic and new-style classes.


