![]() |
IDTech Windows SDK Guide
3.2.4.393
API reference for Visual Studio .Net
|
Public Member Functions | |
RETURN_CODE | device_getFirmwareVersion (ref string response) |
RETURN_CODE | device_StartRKI (int type) |
RETURN_CODE | device_sendDataCommand (string cmd, bool calcLRC, ref byte[] response) |
RETURN_CODE | device_sendDataCommand_ext (string cmd, bool calcLRC, ref byte[] response, int timeout, bool noResponse) |
RETURN_CODE | config_getModelNumber (ref string response) |
bool | config_setCmdTimeOutDuration (int newTimeOut) |
RETURN_CODE | pin_getEncryptedPIN (int keyType, string PAN, string message, int timeout, bool isAES=false, string ident="") |
RETURN_CODE | pin_getFunctionKey () |
RETURN_CODE | pin_sendBeep (int frequency, int duration) |
RETURN_CODE | device_rebootDevice () |
RETURN_CODE | pin_cancelPINEntry () |
RETURN_CODE | device_getKeyStatus (ref byte[] status) |
RETURN_CODE | pin_enableKeypad () |
RETURN_CODE | device_startRKI (bool isTest) |
RETURN_CODE | device_getDateTimeString (ref string str) |
RETURN_CODE | config_setBaudRate (int baud) |
RETURN_CODE | config_getBaudRate (ref int baud) |
RETURN_CODE | device_getRKIStatus (bool isProd, bool isMultiKey, ref string status, ref Dictionary< string, RKI_KEY_TYPE > keys, string ident="") |
RETURN_CODE | device_getAnyRKIStatus (bool isMultiKey, ref string status, ref Dictionary< string, RKI_KEY_TYPE > keys, string ident="") |
RETURN_CODE | device_updateFirmwareFromZip (byte[] zipfile, string ident="", bool isForeground=false) |
RETURN_CODE | device_sendConfigurationFromZip (byte[] zip, string filename, VC_OPERATION_TYPE type, bool matchFW, string ident="", bool isForeground=false) |
RETURN_CODE | device_sendConfiguration (string filename, VC_OPERATION_TYPE type, bool matchFW, string ident="", bool isForeground=false) |
RETURN_CODE | device_readConfigurationToMemory (string memo, Configs.InstallRules rules, List< Configs.DeviceCommand > cmds, string ident="", bool isForeground=false) |
RETURN_CODE | device_getConfigurationFromMemory (ref string json, string ident="") |
RETURN_CODE | device_RemoteKeyInjection (RKI_KEY_TYPE type, string keyName, string ident="", bool performOnForeground=false) |
Static Public Member Functions | |
static bool | useSerialPort (int port) |
static int | getCommandTimeout () |
static void | setCommandTimeout (int milliseconds) |
static bool | useSerialPort (int port, int baud) |
static bool | useSerialPortLinux (string path) |
static bool | useSerialPortLinux (string path, int baud) |
static bool | closeSerialPort () |
static bool | closeUSB () |
static void | initSC () |
static void | setCallback (CallBack my_Callback) |
static void | setCallback (IntPtr my_Callback, SynchronizationContext context) |
static String | SDK_Version () |
Properties | |
static IDT_K100 | SharedController [get] |
|
static |
Close Serial Port Interface
Instructs SDK to close the Serial Port if connected to K100
|
static |
Close USB
Instructs SDK to close the USB if connected to K100
RETURN_CODE IDTechSDK.IDT_K100.config_getBaudRate | ( | ref int | baud | ) |
Get Baud Rate
Gets the buad rate for RS-232 communication.
baud |
|
RETURN_CODE IDTechSDK.IDT_K100.config_getModelNumber | ( | ref string | response | ) |
Polls device for Model Number
response | Returns Model Number |
RETURN_CODE IDTechSDK.IDT_K100.config_setBaudRate | ( | int | baud | ) |
Set Baud Rate
Sets the buad rate for RS-232 communication.
baud |
|
bool IDTechSDK.IDT_K100.config_setCmdTimeOutDuration | ( | int | newTimeOut | ) |
Command Acknowledgement Timout
Sets the amount of seconds to wait for an {ACK} to a command before a timeout. Responses should normally be received under one second. Default is 3 seconds
newTimeOut | Timout value. Valid range 1 - 60 seconds |
RETURN_CODE IDTechSDK.IDT_K100.device_getAnyRKIStatus | ( | bool | isMultiKey, |
ref string | status, | ||
ref Dictionary< string, RKI_KEY_TYPE > | keys, | ||
string | ident = "" |
||
) |
Get RKI Status Polls the RKI servers to validate device RKI eligiblity. Note: if device type is known in advance (production or demo device), it is more efficient to use device_getRKIStatus instead
isMultiKey | True = MultiKey, False = SingleKey |
status | RKI status returned as a string |
keys | Returns all available keys |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
RETURN_CODE IDTechSDK.IDT_K100.device_getConfigurationFromMemory | ( | ref string | json, |
string | ident = "" |
||
) |
Read Device Configuration From Memory Retrieves the ViVOconfig configuration data from memory after a successful device_readConfigurationToMemory
json | Returns the .json file data that can be saved to disk |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
RETURN_CODE IDTechSDK.IDT_K100.device_getDateTimeString | ( | ref string | str | ) |
Get Date Time String
Gets current system date and time of the device.
str | The Date/Time string |
RETURN_CODE IDTechSDK.IDT_K100.device_getFirmwareVersion | ( | ref string | response | ) |
Polls device for Firmware Version
response | Response returned of Firmware Version |
RETURN_CODE IDTechSDK.IDT_K100.device_getKeyStatus | ( | ref byte[] | status | ) |
Get Key Status
Gets the status of loaded keys
status | Blocks of 4 bytes, format is {Key Index and Key Name} {key slot} {key status}: {Key Index and Key Name} is 1 byte.
|
RETURN_CODE IDTechSDK.IDT_K100.device_getRKIStatus | ( | bool | isProd, |
bool | isMultiKey, | ||
ref string | status, | ||
ref Dictionary< string, RKI_KEY_TYPE > | keys, | ||
string | ident = "" |
||
) |
Get RKI Status From Specified Server Polls the RKI server to validate device RKI eligiblity
isProd | TRUE = poll production RKI server, FALSE = poll demo RKI server |
isMultiKey | True = MultiKey, False = SingleKey |
status | RKI status returned as a string |
keys | Returns dictionary of available keys |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
RETURN_CODE IDTechSDK.IDT_K100.device_readConfigurationToMemory | ( | string | memo, |
Configs.InstallRules | rules, | ||
List< Configs.DeviceCommand > | cmds, | ||
string | ident = "" , |
||
bool | isForeground = false |
||
) |
Read Device Configuration To Memory Executes a ViVOconfig read of device settings and stores the results in memory
Once a ViVOconfig read starts, all messages will be returned to the callback as DeviceState.ViVOconfig. The ViVOconfig operation is complete when the return code from a DeviceState.ViVOconfig message is one of the following values:
RETURN_CODE_SDK_VIVOCONFIG_READ_CONFIG_FAILED = Read process FAILED.
memo | Optional: populates the memo field of the captured .json file |
rules | Optional: populates the .json file with available install rules |
cmds | Optional: populates the .json file with commands to execute |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
isForeground | If TRUE, will block program until update complete. Otherwise, FALSE performs update on background. |
RETURN_CODE IDTechSDK.IDT_K100.device_rebootDevice | ( | ) |
Reboot Device
Executes a command to restart the device.
Resetting firmware.
RETURN_CODE IDTechSDK.IDT_K100.device_RemoteKeyInjection | ( | RKI_KEY_TYPE | type, |
string | keyName, | ||
string | ident = "" , |
||
bool | performOnForeground = false |
||
) |
Remote Key Injection Performs a remote key injection for the device
type | Remote Key Injection Type |
keyName | Name of key (optional) |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
performOnForeground | TRUE = block during process (default is false) |
RETURN_CODE IDTechSDK.IDT_K100.device_sendConfiguration | ( | string | filename, |
VC_OPERATION_TYPE | type, | ||
bool | matchFW, | ||
string | ident = "" , |
||
bool | isForeground = false |
||
) |
Send Configuration Executes a ViVOconfig update or verify to a device
Once a ViVOconfig write or verify starts, all messages will be returned to the callback as DeviceState.ViVOconfig. The ViVOconfig operation is complete when the return code from a DeviceState.ViVOconfig message is one of the following values:
RETURN_CODE_SDK_VIVOCONFIG_WRITE_FAILED = Write process FAILED
filename | The .json configuration file to update the device with NOTE: You can also use this parameter to pass the path of where the .json file is located at on local storage instead |
filename | The name of the .json configuration file |
type | VC_OPERATION_TYPE |
matchFW | TRUE = Device FW must match file FW, FALSE = Don't validate device FW against file |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
isForeground | If TRUE, will block program until update complete. Otherwise, FALSE performs update on background. |
RETURN_CODE IDTechSDK.IDT_K100.device_sendConfigurationFromZip | ( | byte[] | zip, |
string | filename, | ||
VC_OPERATION_TYPE | type, | ||
bool | matchFW, | ||
string | ident = "" , |
||
bool | isForeground = false |
||
) |
Send Configuration From Zip Executes a ViVOconfig update or verify to a device using files from a .zip archive
Once a ViVOconfig write or update starts, all messages will be returned to the callback as DeviceState.ViVOconfig. The ViVOconfig operation is complete when the return code from a DeviceState.ViVOconfig message is one of the following values:
RETURN_CODE_SDK_VIVOCONFIG_WRITE_FAILED = Write process FAILED
zip | .Zip archive containing the .json configuration file and also any associated image assets NOTE: You can also use this parameter to pass the path of where the .zip file is located at on local storage instead |
filename | The name of the .json configuration file |
type | VC_OPERATION_TYPE |
matchFW | TRUE = Device FW must match file FW, FALSE = Don't validate device FW against file |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
isForeground | If TRUE, will block program until update complete. Otherwise, FALSE performs update on background. |
RETURN_CODE IDTechSDK.IDT_K100.device_sendDataCommand | ( | string | cmd, |
bool | calcLRC, | ||
ref byte[] | response | ||
) |
Send a data command to the device
Sends a command to the device.
cmd | String representation of command to execute |
calcLRC | If TRUE , this will wrap command with start/length/lrc/sum/end: '{STX}{Len_Low}{Len_High} data {CheckLRC} {CheckSUM} {ETX}' |
response | Response data |
RETURN_CODE IDTechSDK.IDT_K100.device_sendDataCommand_ext | ( | string | cmd, |
bool | calcLRC, | ||
ref byte[] | response, | ||
int | timeout, | ||
bool | noResponse | ||
) |
Send a data command to the device - extended
Sends a command to the device.
cmd | String representation of command to execute |
calcLRC | If TRUE , this will wrap command as NGA with start/length/lrc/sum/end: '{STX}{Len_Low}{Len_High} data {CheckLRC} {CheckSUM} {ETX}' |
response | Response data |
timeout | Timeout value waiting for response, in milliseconds (1000 = 1 second) |
noResponse | if TRUE, this will not wait for a response and immediately return SUCCESS |
calcITP | If TRUE , this will wrap command as ITP with start/end/lrc: '{STX} data {ETX}{CheckLRC}' |
RETURN_CODE IDTechSDK.IDT_K100.device_StartRKI | ( | int | type | ) |
Start Remote Key Injection
Starts a remote key injection request with IDTech RKI servers. Set/Get RKI url with IDT_Device.RKI_URL.
type | 0 = Symmetric RKI Demo Unit 1 = Symmetric RKI Production Unit 2 = PKI-RKI Demo Unit 3 = PKI-RKI Production Unit |
RETURN_CODE IDTechSDK.IDT_K100.device_startRKI | ( | bool | isTest | ) |
Start Remote Key Injection
Starts a remote key injection request with IDTech RKI servers.
isTest | TRUE = Demo Device, FALSE = Production Device |
RETURN_CODE IDTechSDK.IDT_K100.device_updateFirmwareFromZip | ( | byte[] | zipfile, |
string | ident = "" , |
||
bool | isForeground = false |
||
) |
Update Firmware From Zip
Performs one or more device firmware updates from firmware files passed as a compressed archive with a valid configuration file (.json format)
zipfile | Zip file containing on or more firmware update files and a .json configuration file |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
isForeground | If TRUE, will block program until firmware update complete. Otherwise, FALSE performs FW update on background. |
|
static |
Get Command Timeout
Gets the default timeout (in milliseconds) waiting for a blocking command response
time | Time |
RETURN_CODE IDTechSDK.IDT_K100.pin_cancelPINEntry | ( | ) |
Cancel PIN Entry
Cancel “Get Function Key” & “Get Encrypted PIN” & “Get Numeric” & “Get Amount”
RETURN_CODE IDTechSDK.IDT_K100.pin_enableKeypad | ( | ) |
Enable Keypad
Captures keypad button presses until Timeout reached, or pin_cancelPINEntry is executed, whichever comes first
Timeout is hardwired to 3 minutes
RETURN_CODE IDTechSDK.IDT_K100.pin_getEncryptedPIN | ( | int | keyType, |
string | PAN, | ||
string | message, | ||
int | timeout, | ||
bool | isAES = false , |
||
string | ident = "" |
||
) |
Get Encrypted PIN
Requests PIN Entry
keyType |
|
PAN | Account Number |
message | Message to display |
Timeout is hard wired 3 minutes
isAES | set to TRUE if PEK is AES, not TDES |
ident | Device ID to send command to. If not specified, current SDK default device will be used. |
RETURN_CODE IDTechSDK.IDT_K100.pin_getFunctionKey | ( | ) |
Get Function Key
Captures a function key
Timeout hard wired 3 minutes
RETURN_CODE IDTechSDK.IDT_K100.pin_sendBeep | ( | int | frequency, |
int | duration | ||
) |
Send Beep
Executes a beep request.
frequency | Frequency, range 200-20000Hz |
duration | Duration, range 16-65535ms |
|
static |
SDK Version
Returns the current version of SDK
|
static |
Set Callback
Sets the class callback
|
static |
Set Callback
Sets the class callback
my_Callback | The callback function to receive the response message from device. defined as follows. public unsafe delegate void MFCCallBack(Parameters parameters); |
context | The context of the UI thread |
|
static |
Set Command Timeout
Sets the default timeout (in milliseconds) waiting for a blocking command response
milliseconds | Time |
|
static |
Use Serial Port Interface
Instructs SDK to attempt to use the Serial Port for communication with K100 using default baud rate
port | Serial Port to use. Example COM1 = 1. |
|
static |
Use Serial Port Interface with baud rate K100
port | Serial Port to use. Example COM1 = 1. |
baud | Baud rate to override default. Example 115200; |
|
static |
Use Serial Port Interface on Linux
Instructs SDK to attempt to use the Serial Port for communication with BTMag using default baud rate on Linux implementations
path | Path to use. Example /dev/ttyUSB* |
|
static |
Use Serial Port Interface on Linux with baud rate
Instructs SDK to attempt to use the Serial Port for communication with BTPay on Linux implementations
path | Path to use. Example /dev/ttyUSB* |
baud | Baud rate to override default. Example 115200; |
|
staticget |