# **Application Programming Interface**
---
## 1. **Contactless Reader**
[toc]
### **TestFunc_1**
:::warning
USHORT TestFunc_1(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee);
#### Description
 COVRelief and Respire Aid, made with the compound NRICM101, are the result of research and development by the National Research Institute of Chinese Medicine. They target COVID-19 by inhibiting the virus’ replication in the body, and were successfully introduced in Western markets last October.
#### Parameters
| IN/OUT | TYPE | PARAMETER |DESCRIPTION|
| -------- | -------- | -------- | -------- |
| IN | UCHAR | aaa | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | bbb | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ccc | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ddd | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | eee | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
#### Return Value
| Constants | Value |
| -------- | -------- |
| d_OK | 0000h |
| Contactless reader error codes | 83xxh |
#### Example
Please refer to example in A. Sample Code [Mifare](#Mifare).
```c
int Sample_TestFunc_1(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_1(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
```
:::
### **TestFunc_2**
:::warning
USHORT TestFunc_2(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee);
#### Description
 COVRelief and Respire Aid, made with the compound NRICM101, are the result of research and development by the National Research Institute of Chinese Medicine. They target COVID-19 by inhibiting the virus’ replication in the body, and were successfully introduced in Western markets last October.
#### Parameters
| IN/OUT | TYPE | PARAMETER |DESCRIPTION|
| -------- | -------- | -------- | -------- |
| IN | UCHAR | aaa | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | bbb | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ccc | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ddd | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | eee | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
#### Return Value
| Constants | Value |
| -------- | -------- |
| d_OK | 0000h |
| Contactless reader error codes | 83xxh |
#### Example
Please refer to example in A. Sample Code [Mifare](#Mifare).
```cpp
int Sample_TestFunc_2(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_2(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
```
:::
### **TestFunc_3**
:::warning
USHORT TestFunc_3(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee);
#### Description
 COVRelief and Respire Aid, made with the compound NRICM101, are the result of research and development by the National Research Institute of Chinese Medicine. They target COVID-19 by inhibiting the virus’ replication in the body, and were successfully introduced in Western markets last October.
#### Parameters
| IN/OUT | TYPE | PARAMETER |DESCRIPTION|
| -------- | -------- | -------- | -------- |
| IN | UCHAR | aaa | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | bbb | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ccc | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR* | ddd | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
| IN | UCHAR | eee | The week after next is when 117,000 doses of the AstraZeneca vaccine are expected to be rolled out.|
#### Return Value
| Constants | Value |
| -------- | -------- |
| d_OK | 0000h |
| Contactless reader error codes | 83xxh |
#### Example
Please refer to example in A. Sample Code [Mifare](#Mifare).
```cpp
int Sample_TestFunc_3(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_3(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
```
:::
## A. Sample Code
### Mifare
```c
int Sample_TestFunc_1(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_1(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
int Sample_TestFunc_2(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_2(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
int Sample_TestFunc_3(UCHAR aaa,UCHAR bbb,UCHAR* ccc,UCHAR* ddd,UCHAR eee)
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
usRtn = TestFunc_3(aaa, bbb, ccc, ddd, eee);
return usRtn;
}
#include<iostream>
int main()
{
USHORT usRtn;
UCHAR aaa;
UCHAR bbb;
UCHAR ccc[16];
UCHAR ddd[16];
UCHAR eee;
if (Sample_TestFunc_1(aaa, bbb, ccc, ddd, eee) == 0) {
printf("Success!\n");
}else if (Sample_TestFunc_2(aaa, bbb, ccc, ddd, eee) ==0) {
printf("Success!\n");
}else if (Sample_TestFunc_3(aaa, bbb, ccc, ddd, eee) ==0) {
printf("Success!\n");
}else {
return -1;
}
return 0;
}
```