> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/nfc_8h_source.md).

# nfc.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/nfc_8h.md)

```cpp
 1 /****************************************************************************
 2 * Product: InFusion
 3 * Company: Verifone
 4 * Author: GSS R&D Germany
 5 * Content: SDI-Server
 6 ****************************************************************************/
 7 
 8 #ifndef _NFC_H_
 9 #define _NFC_H_
 10 
 11 #include <string>
 12 #include <vector>
 13 
 14 
 15 // appID storage for configuration cloning
 16 std::vector<std::string> &NFC_get_appID_Static();
 17 std::string &NFC_get_appID_Preload();
 18 
 19 bool NFC_getPreloadFileName(char* filename, unsigned buffersize, std::string appID);
 20 
 21 void NFC_deletePreloadFile();
 22 
 23 #define CLA_NFC 0x31 
 24 #define CLA_VAS 0x32 
 25 
 26 // General Commands
 27 #define INS_NFC_CLIENT_INIT 0x10 
 28 #define INS_NFC_PING 0x00 
 29 #define INS_NFC_GET_VERSION 0x11 
 30 #define INS_NFC_CONFIG_INIT 0x12 
 31 
 32 // Pass Through Commands
 33 #define INS_NFC_PT_OPEN 0x01 
 34 #define INS_NFC_PT_CLOSE 0x02 
 35 #define INS_NFC_PT_FIELDON 0x03 
 36 #define INS_NFC_PT_FIELDOFF 0x04 
 37 #define INS_NFC_PT_POLLING 0x05 
 38 #define INS_NFC_PT_CANCEL_POLLING 0x06 
 39 #define INS_NFC_PT_ACTIVATION 0x07 
 40 #define INS_NFC_PT_TXRX 0x08 
 41 #define INS_NFC_PT_FETCHBAUD 0x09 
 42 #define INS_NFC_PT_POLLINGFULL 0x13 
 43 #define INS_NFC_PT_POLLINGABF 0x1D 
 44 #define INS_NFC_PT_ADV_TXRX 0x1E 
 45 
 46 // Mifare Commands
 47 #define INS_NFC_MIFARE_AUTH 0x0A 
 48 #define INS_NFC_MIFARE_READ 0x0B 
 49 #define INS_NFC_MIFARE_WRITE 0x0C 
 50 #define INS_NFC_MIFARE_INCREMENT 0x0D 
 51 #define INS_NFC_MIFARE_DECREMENT 0x0E 
 52 #define INS_NFC_MIFARE_INCR_ONLY 0x15 
 53 #define INS_NFC_MIFARE_DECR_ONLY 0x16 
 54 #define INS_NFC_MIFARE_TRANSFER 0x17 
 55 #define INS_NFC_MIFARE_RESTORE 0x18 
 56 
 57 // Felica Commands
 58 #define INS_NFC_FELICA_EXCHANGE 0x0F 
 59 #define INS_NFC_FELICA_POLLING 0x14 
 60 
 61 // APDU Commands
 62 #define INS_NFC_APDU_EXCH 0x1C 
 63 
 64 // Target Mode
 65 #define INS_NFC_TARGET_ACTION 0x20 
 66 #define INS_NFC_CREATE_NDEF 0x21 
 67 
 68 // VAS Commands
 69 #define INS_VAS_NFC_TERM_CONFIG 0x00 
 70 #define INS_VAS_NFC_TERM_READ_CONFIG 0x01 
 71 #define INS_VAS_READ_CONFIG 0x02 
 72 #define INS_VAS_ACTIVATE 0x03 
 73 #define INS_VAS_CANCEL 0x04 
 74 #define INS_VAS_UPDATE_CONFIG 0x05 
 75 #define INS_VAS_CANCEL_CONFIG 0x06 
 76 #define INS_VAS_PRELOAD 0x07 
 77 #define INS_VAS_CANCEL_PRELOAD 0x08 
 78 #define INS_VAS_DECRYPT 0x09 
 79 #define INS_VAS_ACTION 0x0A 
 80 
 81 // Tags
 82 #define EMB_APP_F0_TEMPLATE_TAG 0xF0 
 83 #define EMB_APP_PING_TAG 0xDFA200
 84 #define EMB_APP_VERSION_TAG 0xDFA201
 85 #define EMB_APP_TECH_BITMAP_TAG 0xDFA202
 86 #define EMB_APP_POLL_TIMEOUT_TAG 0xDFA203
 87 #define TAG_DFA204_NFC_APDU_CMD 0xDFA204
 88 #define TAG_DFA205_NFC_APDU_RSP 0xDFA205
 89 #define EMB_APP_TXRX_DATA_TAG 0xDFA206
 90 #define EMB_APP_CUSTOM_POLL_DATA_TAG 0xDFA207
 91 #define EMB_APP_MIFARE_BLOCK_NUM_TAG 0xDFA208
 92 #define EMB_APP_MIFARE_KEY_TYPE_TAG 0xDFA209
 93 #define EMB_APP_MIFARE_KEY_TAG 0xDFA20A
 94 #define EMB_APP_MIFARE_CARD_TYPE_TAG 0xDFA20B
 95 #define EMB_APP_MIFARE_START_BLOCK_TAG 0xDFA20C
 96 #define EMB_APP_MIFARE_BLOCK_AMOUNT_TAG 0xDFA20D
 97 #define EMB_APP_MIFARE_READ_DATA_TAG 0xDFA20E
 98 #define EMB_APP_MIFARE_WRITE_DATA_TAG 0xDFA20F
 99 #define EMB_APP_MIFARE_AMOUNT_TAG 0xDFA210
 100 #define EMB_APP_FELICA_POLL_TIMEOUT_TAG 0xDFA211
 101 #define EMB_APP_FELICA_RECIVE_TIMEOUT_TAG 0xDFA212
 102 #define EMB_APP_FELICA_SYS_CODE_TAG 0xDFA213
 103 #define EMB_APP_FELICA_REQ_CODE_TAG 0xDFA214
 104 #define EMB_APP_FELICA_TIME_SLOT_TAG 0xDFA215
 105 #define EMB_APP_FELICA_UID_TAG 0xDFA216
 106 #define EMB_APP_FELICA_PAD_TAG 0xDFA217
 107 #define EMB_APP_FELICA_TIMEOUT_TAG 0xDFA218
 108 #define TAG_DFA219_NFC_APDU_SW12 0xDFA219
 109 #define TAG_DFA21A_NFC_DUTY_CYCLE_TAG 0xDFA21A
 110 #define TAG_DFA21B_NFC_TARGET_ACTION 0xDFA21B
 111 #define TAG_DFA21C_NFC_TIMEOUT 0xDFA21C
 112 #define TAG_DFA21D_NFC_IN_DATA 0xDFA21D
 113 #define TAG_DFA21E_NFC_OUT_DATA 0xDFA21E
 114 #define TAG_DFA21F_NFC_NDEF_TYPES 0xDFA21F
 115 #define TAG_DFA220_NFC_ADV_TXRX_TECH 0xDFA220 
 116 #define TAG_DFA221_NFC_ADV_TXRX_RSP_TIMEOUT 0xDFA221 
 117 #define TAG_DFA222_NFC_ADV_TXRX_CRC 0xDFA222 
 118 #define TAG_DFA223_NFC_ADV_TXRX_PARITY 0xDFA223 
 119 #define TAG_DFA224_NFC_ADV_TXRX_COM_TIMEOUT 0xDFA224 
 120 #define TAG_DFA225_NFC_ADV_TXRX_INVALID_FRM 0xDFA225 
 121 
 122 
 123 
 124 
 125 #define TAG_DFA300_NFC_VAS_IN_OUT_DATA 0xDFA300
 126 #define TAG_DFA301_NFC_VAS_APP_ID 0xDFA301
 127 #define TAG_DFA302_NFC_VAS_ACTION 0xDFA302
 128 
 129 
 130 #ifdef __cplusplus
 131 extern "C"
 132 {
 133 #endif
 134 
 135 
 136 void handleNFC(unsigned short msgBufSize, unsigned char *msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char *rsp, unsigned short *rspSize);
 137 void handleVAS(unsigned short msgBufSize, unsigned char *msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char *rsp, unsigned short *rspSize);
 138 
 139 #ifdef __cplusplus
 140 }
 141 #endif
 142 
 143 #endif // _NFC_H_
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/nfc_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
