Constructor
new NFCReader(serveraddress)
Parameters:
| Name | Type | Description |
|---|---|---|
serveraddress |
String | NFCプロキシのサーバーアドレス |
Example
const ncob = new NFCReader("http://localhost:9235")
Methods
accessible() → {boolean}
サーバーが動いているかの確認を行うメソッド
Returns:
サーバーに到達可能か、True/Falseを返す
- Type
- boolean
Example
ncob.accessible();
(async) scan() → {string}
スキャンを実行するメソッド
Returns:
NFCタグに書き込まれたレコードを返す
- Type
- string
Example
ncob.scan();
(async) write(content) → {string}
NFCタグへの書き込みを行うメソッド
Parameters:
| Name | Type | Description |
|---|---|---|
content |
String | 書き込む内容 |
Returns:
NFCタグに書き込まれたレコードを返す
- Type
- string
Example
ncob.write("Hello World!");