Class: PCSDK

PCSDK

PCSDK SDK main class

Methods

(async) getTokensInfo() → {Promise.<Array.<object>>}

Returns information about all connected tokens
Returns:
array of objects with properties {label, serial, leftSpace, deviceId}
Type
Promise.<Array.<object>>

(async) init(callbackopt, errorCallbackopt) → {Promise.<void>}

Lib initialization.
Parameters:
Name Type Attributes Description
callback function <optional>
The function is called when a token is connected or disconnected. An object with properties {connected, disconnected} is passed as arguments, which contains arrays with identifiers of disconnected and connected tokens
errorCallback function <optional>
The function is called when an error occurs during connection status polling
Throws:
PCError
Returns:
Type
Promise.<void>

isInitialized() → {boolean}

Whether PCSDK is properly initialized
Returns:
Type
boolean