![]() |
SPI
1.2403.0
Secured Payment Interface
|
This class contains all the input data and output data of Device.ReadCard(). All data in this class is reachable through various methods which define the behaivor of the operation. More...
#include <ReadCardData.h>
Public Member Functions | |
| SPILIBRARY_API | ~ReadCardData () |
| Class desrstructor. | |
| APIHandle | GetReadCardDataHandle () const |
| Handle get - reserved for internal useage. | |
Input parameters | |
Those methods should be called before Device.ReadCard is executed. | |
| SPILIBRARY_API | ReadCardData () |
| Class constructor. | |
| SPILIBRARY_API void | ReadMsr () |
| Enable MSR interface to read card. | |
| SPILIBRARY_API void | ReadMifare () |
| Enable NFC interface to read Mifare card. | |
| SPILIBRARY_API void | SetTimeout (TimeOutType Timeout) |
| Set timeout for the request in seconds. The timeout is handeled on the device side and not on client side. If timeout occured SPI_TIME_OUT is returned from Device.ReadCard() deafult is 60 seconds. | |
| SPILIBRARY_API void | SetNonCancelable () |
| Disable/Hide cancel button on the device while polling for card. | |
| SPILIBRARY_API void | SetDisplayMessage (std::vector< string > Msg) |
| Set a vector of strings to be displayed on Device screen while polling for card All strings must be UTF-8 encoded. | |
| SPILIBRARY_API void | AddMifareProperty (string Key, string Value) |
| Add Mifare property when Reading Mifare. | |
Output parameters | |
Those methods can be called after ReadCard is executed. | |
| SPILIBRARY_API ReadCardEntry | GetReadCardEntry () const |
| If ReadCard retuns SPI_SUCCESS than a card was discovered in one of the enabled interfaces. | |
| SPILIBRARY_API string | GetTrack2 () const |
| Get track2 of MSR card. | |
| SPILIBRARY_API string | GetCardId () const |
| Get Card serial if card read using NFC. | |
| SPILIBRARY_API string | GetFileData () const |
| Get data read from file for DESFire EV2. Data is in HEX-String. | |
This class contains all the input data and output data of Device.ReadCard(). All data in this class is reachable through various methods which define the behaivor of the operation.
Definition at line 29 of file ReadCardData.h.
| SPILIBRARY_API void Modularity::SPI::ReadCardData::AddMifareProperty | ( | string | Key, |
| string | Value | ||
| ) |
Add Mifare property when Reading Mifare.
| [in] | Key | to add as listed below |
| [in] | Value | as listed below to each key. Integer values requieres "L" as suffix to value string. E.g: ("commType","2L") |
The Following properties are supported:
type - String - Mandatory when ReadMifare() is enabled | Value | Description |
|---|---|
defireev2 | Mifare DESFire EV2 |
classic | Mifare Classic (Only CID) |
ultralight | Mifare Ultralight (Only CID) |
expectedDataLen - Int - Mandatory for DESFire EV2 "4L"`commType - String - Mandatory for DESFire EV2 | Value | Description |
|---|---|
| 0 | Plain |
| 1 | MAC |
| 2 | Encrypted |
appId - HEX String - Mandatory for DESFire EV2 "A12345"`appKey - HEX String - Mandatory for DESFire EV2 appId E.g: "00000000000000000000000000000123"`appKeyNo - Int - Mandatory for DESFire EV2 "0L"`appCryptoMethod - Int - Mandatory for DESFire EV2 | Value | Description |
|---|---|
| 0 | None |
| 1 | AES |
| 2 | 2TDEA |
| 3 | 3TDEA |
fileNo - Int - Mandatory for DESFire EV2 "0L"`fileType - Int - Mandatory for DESFire EV2 fileNo. | Value | Description |
|---|---|
| 0 | Std Data |
| 1 | Backup Data |
| 2 | Cyclic Record |
| 3 | Linear Record |
| 4 | Value |
| SPILIBRARY_API string Modularity::SPI::ReadCardData::GetCardId | ( | ) | const |
Get Card serial if card read using NFC.
| SPILIBRARY_API string Modularity::SPI::ReadCardData::GetFileData | ( | ) | const |
Get data read from file for DESFire EV2. Data is in HEX-String.
| SPILIBRARY_API ReadCardEntry Modularity::SPI::ReadCardData::GetReadCardEntry | ( | ) | const |
If ReadCard retuns SPI_SUCCESS than a card was discovered in one of the enabled interfaces.
| SPILIBRARY_API string Modularity::SPI::ReadCardData::GetTrack2 | ( | ) | const |
Get track2 of MSR card.
| SPILIBRARY_API void Modularity::SPI::ReadCardData::ReadMifare | ( | ) |
Enable NFC interface to read Mifare card.
1.8.2