# 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_zfm20
else:
    import _pyupm_zfm20

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_zfm20.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_zfm20.uint8Array_swiginit(self, _pyupm_zfm20.new_uint8Array(nelements))
    __swig_destroy__ = _pyupm_zfm20.delete_uint8Array

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

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

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

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

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

def uint8Array_frompointer(t):
    return _pyupm_zfm20.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_zfm20.uint16Array_swiginit(self, _pyupm_zfm20.new_uint16Array(nelements))
    __swig_destroy__ = _pyupm_zfm20.delete_uint16Array

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

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

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

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

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

def uint16Array_frompointer(t):
    return _pyupm_zfm20.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_zfm20.uint32Array_swiginit(self, _pyupm_zfm20.new_uint32Array(nelements))
    __swig_destroy__ = _pyupm_zfm20.delete_uint32Array

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

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

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

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

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

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


def new_intp():
    return _pyupm_zfm20.new_intp()

def copy_intp(value):
    return _pyupm_zfm20.copy_intp(value)

def delete_intp(obj):
    return _pyupm_zfm20.delete_intp(obj)

def intp_assign(obj, value):
    return _pyupm_zfm20.intp_assign(obj, value)

def intp_value(obj):
    return _pyupm_zfm20.intp_value(obj)
ZFM20_DEFAULT_UART = _pyupm_zfm20.ZFM20_DEFAULT_UART
ZFM20_START1 = _pyupm_zfm20.ZFM20_START1
ZFM20_START2 = _pyupm_zfm20.ZFM20_START2
ZFM20_MAX_PKT_LEN = _pyupm_zfm20.ZFM20_MAX_PKT_LEN
ZFM20_TIMEOUT = _pyupm_zfm20.ZFM20_TIMEOUT
ZFM20_DEFAULT_PASSWORD = _pyupm_zfm20.ZFM20_DEFAULT_PASSWORD
ZFM20_DEFAULT_ADDRESS = _pyupm_zfm20.ZFM20_DEFAULT_ADDRESS
class ZFM20(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    CMD_GEN_IMAGE = _pyupm_zfm20.ZFM20_CMD_GEN_IMAGE
    CMD_IMG2TZ = _pyupm_zfm20.ZFM20_CMD_IMG2TZ
    CMD_MATCH = _pyupm_zfm20.ZFM20_CMD_MATCH
    CMD_SEARCH = _pyupm_zfm20.ZFM20_CMD_SEARCH
    CMD_REGMODEL = _pyupm_zfm20.ZFM20_CMD_REGMODEL
    CMD_STORE = _pyupm_zfm20.ZFM20_CMD_STORE
    CMD_LOAD_TMPL = _pyupm_zfm20.ZFM20_CMD_LOAD_TMPL
    CMD_UPLOAD_TMPL = _pyupm_zfm20.ZFM20_CMD_UPLOAD_TMPL
    CMD_DOWNLOAD_TMPL = _pyupm_zfm20.ZFM20_CMD_DOWNLOAD_TMPL
    CMD_UPLOAD_IMAGE = _pyupm_zfm20.ZFM20_CMD_UPLOAD_IMAGE
    CMD_DOWNLOAD_IMAGE = _pyupm_zfm20.ZFM20_CMD_DOWNLOAD_IMAGE
    CMD_DELETE_TMPL = _pyupm_zfm20.ZFM20_CMD_DELETE_TMPL
    CMD_EMPTYDB = _pyupm_zfm20.ZFM20_CMD_EMPTYDB
    CMD_SET_SYSPARAMS = _pyupm_zfm20.ZFM20_CMD_SET_SYSPARAMS
    CMD_GET_SYSPARAMS = _pyupm_zfm20.ZFM20_CMD_GET_SYSPARAMS
    CMD_SET_PASSWORD = _pyupm_zfm20.ZFM20_CMD_SET_PASSWORD
    CMD_VERIFY_PASSWORD = _pyupm_zfm20.ZFM20_CMD_VERIFY_PASSWORD
    CMD_GET_RANDOM_NUMBER = _pyupm_zfm20.ZFM20_CMD_GET_RANDOM_NUMBER
    CMD_SET_ADDRESS = _pyupm_zfm20.ZFM20_CMD_SET_ADDRESS
    CMD_GET_TMPL_COUNT = _pyupm_zfm20.ZFM20_CMD_GET_TMPL_COUNT
    CMD_GET_INDEX_TABLE = _pyupm_zfm20.ZFM20_CMD_GET_INDEX_TABLE
    ERR_OK = _pyupm_zfm20.ZFM20_ERR_OK
    ERR_PACKET_RX_ERROR = _pyupm_zfm20.ZFM20_ERR_PACKET_RX_ERROR
    ERR_NO_FINGER = _pyupm_zfm20.ZFM20_ERR_NO_FINGER
    ERR_FP_IMAGE_FAILED = _pyupm_zfm20.ZFM20_ERR_FP_IMAGE_FAILED
    ERR_FP_TOO_MESSY = _pyupm_zfm20.ZFM20_ERR_FP_TOO_MESSY
    ERR_FP_IMAGE_FEW_FEATURES = _pyupm_zfm20.ZFM20_ERR_FP_IMAGE_FEW_FEATURES
    ERR_FP_NOMATCH = _pyupm_zfm20.ZFM20_ERR_FP_NOMATCH
    ERR_FP_NOTFOUND = _pyupm_zfm20.ZFM20_ERR_FP_NOTFOUND
    ERR_FP_ENROLLMISMATCH = _pyupm_zfm20.ZFM20_ERR_FP_ENROLLMISMATCH
    ERR_BAD_LOCATION = _pyupm_zfm20.ZFM20_ERR_BAD_LOCATION
    ERR_DB_ERROR = _pyupm_zfm20.ZFM20_ERR_DB_ERROR
    ERR_UPLOAD_FEAT_FAILED = _pyupm_zfm20.ZFM20_ERR_UPLOAD_FEAT_FAILED
    ERR_NO_MORE_PACKETS = _pyupm_zfm20.ZFM20_ERR_NO_MORE_PACKETS
    ERR_UPLOAD_IMG_FAILED = _pyupm_zfm20.ZFM20_ERR_UPLOAD_IMG_FAILED
    ERR_RM_TMPL_FAILED = _pyupm_zfm20.ZFM20_ERR_RM_TMPL_FAILED
    ERR_EMPTY_DB_FAILED = _pyupm_zfm20.ZFM20_ERR_EMPTY_DB_FAILED
    ERR_INVALID_PWD = _pyupm_zfm20.ZFM20_ERR_INVALID_PWD
    ERR_INVALID_IMAGE = _pyupm_zfm20.ZFM20_ERR_INVALID_IMAGE
    ERR_RW_FLASH_ERROR = _pyupm_zfm20.ZFM20_ERR_RW_FLASH_ERROR
    ERR_INVALID_REG = _pyupm_zfm20.ZFM20_ERR_INVALID_REG
    ERR_INVALID_ADDR = _pyupm_zfm20.ZFM20_ERR_INVALID_ADDR
    ERR_NEEDS_PWD = _pyupm_zfm20.ZFM20_ERR_NEEDS_PWD
    ERR_INTERNAL_ERR = _pyupm_zfm20.ZFM20_ERR_INTERNAL_ERR
    PKT_COMMAND = _pyupm_zfm20.ZFM20_PKT_COMMAND
    PKT_DATA = _pyupm_zfm20.ZFM20_PKT_DATA
    PKT_ACK = _pyupm_zfm20.ZFM20_PKT_ACK
    PKT_END_DATA = _pyupm_zfm20.ZFM20_PKT_END_DATA

    def __init__(self, *args):
        _pyupm_zfm20.ZFM20_swiginit(self, _pyupm_zfm20.new_ZFM20(*args))
    __swig_destroy__ = _pyupm_zfm20.delete_ZFM20

    def readData(self, buffer, len):
        return _pyupm_zfm20.ZFM20_readData(self, buffer, len)

    def writeData(self, buffer, len):
        return _pyupm_zfm20.ZFM20_writeData(self, buffer, len)

    def setupTty(self, baud=57600):
        return _pyupm_zfm20.ZFM20_setupTty(self, baud)

    def writeCmdPacket(self, pkt, len):
        return _pyupm_zfm20.ZFM20_writeCmdPacket(self, pkt, len)

    def verifyPacket(self, pkt, len):
        return _pyupm_zfm20.ZFM20_verifyPacket(self, pkt, len)

    def getMillis(self):
        return _pyupm_zfm20.ZFM20_getMillis(self)

    def initClock(self):
        return _pyupm_zfm20.ZFM20_initClock(self)

    def setAddress(self, addr):
        return _pyupm_zfm20.ZFM20_setAddress(self, addr)

    def setPassword(self, pw):
        return _pyupm_zfm20.ZFM20_setPassword(self, pw)

    def getResponse(self, pkt, len):
        return _pyupm_zfm20.ZFM20_getResponse(self, pkt, len)

    def verifyPassword(self):
        return _pyupm_zfm20.ZFM20_verifyPassword(self)

    def getNumTemplates(self):
        return _pyupm_zfm20.ZFM20_getNumTemplates(self)

    def setNewPassword(self, pwd):
        return _pyupm_zfm20.ZFM20_setNewPassword(self, pwd)

    def setNewAddress(self, addr):
        return _pyupm_zfm20.ZFM20_setNewAddress(self, addr)

    def generateImage(self):
        return _pyupm_zfm20.ZFM20_generateImage(self)

    def image2Tz(self, slot):
        return _pyupm_zfm20.ZFM20_image2Tz(self, slot)

    def createModel(self):
        return _pyupm_zfm20.ZFM20_createModel(self)

    def storeModel(self, slot, id):
        return _pyupm_zfm20.ZFM20_storeModel(self, slot, id)

    def deleteModel(self, id):
        return _pyupm_zfm20.ZFM20_deleteModel(self, id)

    def deleteDB(self):
        return _pyupm_zfm20.ZFM20_deleteDB(self)

    def search(self, slot):
        return _pyupm_zfm20.ZFM20_search(self, slot)

    def match(self):
        return _pyupm_zfm20.ZFM20_match(self)

# Register ZFM20 in _pyupm_zfm20:
_pyupm_zfm20.ZFM20_swigregister(ZFM20)



