Contactless API: Difference between revisions

From wizarPOS
No edit summary
No edit summary
Line 27: Line 27:
*define ''CONTACTLESS_CARD_MODE_TYPE_B ''2
*define ''CONTACTLESS_CARD_MODE_TYPE_B ''2
*define ''CONTACTLESS_CARD_MODE_TYPE_C ''3
*define ''CONTACTLESS_CARD_MODE_TYPE_C ''3
You can terminate it using function search_target_end.
You can terminate it using function [[#search_target_end|search_target_end]].




Line 51: Line 51:
Stop the process of searching card.
Stop the process of searching card.


The [[search_target_begin]] and [[search_target_end ]] apis are pair operations.
The [[#search_target_begin|search_target_begin]] and [[#search_target_end|search_target_end]] apis are pair operations.


'''Parameters'''
'''Parameters'''

Revision as of 08:43, 12 April 2018

Functions

open

 void* contactless_card_open(CONTACTLESS_CARD_NOTIFIER fNotifier, void* pUserData, int* pErrorCode)

Initialize the contactless card reader.

Parameters

fNotifier Notifier of contactless card
pUserData User data
pErrorCode error code if return value is equals to 0

Returns

The result code, != 0, success, value is the handle of contactless card device; <0 failed.

search_target_begin

 int contactless_card_search_target_begin(int nHandle, int nCardMode, int nFlagSearchAll, int nTimeout_MS)

Start searching the contactless card. If you set the nCardMode is auto, reader will try to activate card in type A, type B and type successively; If you set the nCardMode is type A, type B, or type C, reader only try to activate card in the specified way. Possible value of nCardMode :

  • define CONTACTLESS_CARD_MODE_AUTO 0
  • define CONTACTLESS_CARD_MODE_TYPE_A 1
  • define CONTACTLESS_CARD_MODE_TYPE_B 2
  • define CONTACTLESS_CARD_MODE_TYPE_C 3

You can terminate it using function search_target_end.


Parameters

nHandle Handle of this device, returned from open
nCardMode Mode to search
nFlagSearchAll Not used
nTimeout_MS Time out in millseconds. If it is less than 0, then wait forever.

Returns

The result code, >= 0, success; <0 error code.


search_target_end

 int contactless_card_search_target_end(int nHandle)

Stop the process of searching card.

The search_target_begin and search_target_end apis are pair operations.

Parameters

nHandle Handle of this device, returned from open

Returns

The result code, >= 0, success; <0 error code.

close

query_info

attach_target

detach_target

transmit

verify

read

write

write_value

read_value

increment

decrement

restore

transfer