Constructor
new Iso15693(rfReader)
构造Iso15693操作对象
Name | Type | Description |
---|---|---|
rfReader | RfReader | 读卡器设备对象 |
- Source
Members
ERR_Block
块不可用
- Source
ERR_Buffer
缓冲区不足
- Source
ERR_DevInvalid
设备无效不支持
- Source
ERR_Fail
通讯失败
- Source
ERR_LockFail
块锁定失败
- Source
ERR_LockWrite
块已锁定无法写入
- Source
ERR_Locked
块已锁定
- Source
ERR_NotSupport
命令不支持
- Source
ERR_Option
不支持此选项
- Source
ERR_Param
命令无法识别
- Source
ERR_Program
块编程失败
- Source
ERR_Unknown
未知错误
- Source
MAX_BLOCK_COUNT
最大块数量
- Source
MAX_BLOCK_SIZE
最大块大小
- Source
OK
无错误
- Source
(static, readonly) ExecMode :number
指令执行模式
- number
Name | Type | Description |
---|---|---|
NonAddressed | number | 无地址广播任意执行 仅少部分特殊指令支持 |
Addressed | number | 寻址匹配UID执行 支持所有指令 |
Select | number | 仅最后选择状态的执行 仅需额外传入uid参数的特殊指令不支持 |
- Source
Methods
(async) getBlockState(firstBlockAddr, blockNum) → {Promise}
获取多块的安全状态
Name | Type | Description |
---|---|---|
firstBlockAddr | number | 起始块地址 |
blockNum | number | 块数量 |
- Source
err/msg + retval/data
- Type:
- Promise
(async) getSysInfo() → {Promise}
获取系统信息
- Source
err/msg + retval/flags/dsfid/uid/afi/blockNum/byteSize/icRef
- Type:
- Promise
(async) lockAFI() → {Promise}
锁AFI
- Source
err/msg + retval
- Type:
- Promise
(async) lockBlock(blockAddr) → {Promise}
锁块
Name | Type | Description |
---|---|---|
blockAddr | number | 有效块地址 |
- Source
err/msg + retval
- Type:
- Promise
(async) lockDSFID() → {Promise}
锁DSFID
- Source
err/msg + retval
- Type:
- Promise
(async) readBlock(getState, blockAddr) → {Promise}
读单块
Name | Type | Description |
---|---|---|
getState | boolean | 是否包含块属性状态 |
blockAddr | number | 有效块地址 |
- Source
err/msg + retval/data
- Type:
- Promise
(async) readBlocks(mode, getState, firstBlockAddr, blockNum) → {Promise}
读多块
Name | Type | Description |
---|---|---|
mode | number | 操作模式0=芯片原生命令,1=单块命令循环,2=优先尝试原生命令,>=3优先尝试单块命令 |
getState | boolean | 是否包含块属性状态 |
firstBlockAddr | number | 起始块地址 |
blockNum | number | 块数量 |
- Source
err/msg + retval/data
- Type:
- Promise
(async) resetToReady() → {Promise}
重置到准备就绪状态 可解除安静与选中状态
- Source
err/msg + retval
- Type:
- Promise
(async) select(uid) → {Promise}
选择 在感应区内选择UID 注意多次选择仅最后一次有效且离开感应区后选择自动失效
Name | Type | Description |
---|---|---|
uid | string | 十六进制UID字符串 |
- Source
err/msg + retval
- Type:
- Promise
(async) setFlags(mode, uid, dataRate, subCarrier) → {Promise}
设置指令执行前标记
Name | Type | Default | Description |
---|---|---|---|
mode | number | 参考Rokato.Iso15693.ExecMode | |
uid | string | 0000000000000000 | 仅Addressed模式必须 其他模式忽略 |
dataRate | boolean | true | 是否使用高数据速率 默认true |
subCarrier | boolean | false | 是否使用两个副载波 默认false |
- Source
err/msg + retval
- Type:
- Promise
(async) stayQuiet(uid) → {Promise}
保持安静 进入安静状态后不在响应查找Id
Name | Type | Description |
---|---|---|
uid | string | 十六进制UID字符串 |
- Source
err/msg + retval
- Type:
- Promise
(async) writeAFI(afi) → {Promise}
写AFI
Name | Type | Description |
---|---|---|
afi | number | 有效范围0x00~0xFF |
- Source
err/msg + retval
- Type:
- Promise
(async) writeBlock(blockAddr, data) → {Promise}
写单块
Name | Type | Description |
---|---|---|
blockAddr | number | 有效块地址 |
data | string | 十六进制块数据 |
- Source
err/msg + retval
- Type:
- Promise
(async) writeBlocks(mode, firstBlockAddr, blockNum, data) → {Promise}
写多块 注意大部分芯片原生命令可能并不支持写多块因此不建议操作模式使用0
Name | Type | Description |
---|---|---|
mode | number | 操作模式0=芯片原生命令,1=单块命令循环,2=优先尝试原生命令,>=3优先尝试单块命令 |
firstBlockAddr | number | 起始块地址 |
blockNum | number | 块数量 |
data | string | 十六进制块数据 |
- Source
err/msg + retval
- Type:
- Promise
(async) writeDSFID(dsfid) → {Promise}
写DSFID
Name | Type | Description |
---|---|---|
dsfid | number | 有效范围0x00~0xFF |
- Source
err/msg + retval
- Type:
- Promise
(static) errStr()
获取错误码字符串含义
- Source