Amadis
GPI CAD Primitives
gpiCardInserted
Description
Get smart card insertion status. Multiple smart card readers may be supported.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
tGPIError gpiCardInserted (const char* smartcardReaderName);
Parameters
const char* smartcardReaderName: in // Reader
Returned Values
tGPIError: scrNO_ERROR // No card inserted
tGPIError: scrCARD_INSERTED // Card inserted
tGPIError: scrSYSTEM_ERROR // Card reader error
Example
N/A
gpiCardSwiped
Description
Get magstripe card swipe status. Multiple magstripe card readers may be supported.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiExchangeAPDU
Description
Send a C-APDU and receive a R-APDU. Each APDU exchange is stored until the next exchange to allow a specific parsing in between on subsequent to a flow interruption.
Pre-Condition(s)
Reader and card must be powered on.
Post-Condition(s)
Last C-APDU and R-APDU have been set with the APDU exchange that has been performed.
Signature
Prototype
Parameters
Returned Values
Example
gpiGetCardStatus
Description
Get smart card status to know whether the card is mute or not (i.e. activated, not activated, or not present).
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiGetSerialNumber
Description
Get terminal's serial number (used to set 9F1E). This primitive is used by Agnos Framework to set terminal's profile in the scope of Level2 TA.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiInitPolling
Description
Initialize antenna before system's operations.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A (i.e. specific to any given hardware platform).
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiPolling
Description
initiate a polling on a contactless reader during a specific time duration. Multiple readers may be supported.
Pre-Condition(s)
N/A
Post-Condition(s)
If a card has been detected, gContactlessTransactionInProgress has been set to gpi_true.
Signature
Prototype
Parameters
Returned Values
Example
gpiPowerOff
Description
Power off a reader.
Pre-Condition(s)
N/A
Post-Condition(s)
gContactlessTransactionInProgress has been set to gpi_false.
Signature
Prototype
Parameters
Returned Values
Example
gpiPowerOff is always called from the entry point (contactless), or a payment application (contact). However, there is one exception. For performance reason, gpiPowerOff is also called from kernel C-3/Visa (SEE_PHONE cases - a.k.a. 0x6986 cases - requiring immediate field off). At that time. *device is set to “qVSDCPath” to notify that exception to the GPI (discrimination mean).
gpiPowerOffAllDevices
Description
Power off all readers at the same time.
Pre-Condition(s)
N/A
Post-Condition(s)
gContactlessTransactionInProgress has been set to gpi_false.
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiPowerOn
Description
Power on a reader (and the card) before initiating a transaction.
Pre-Condition(s)
N/A
Post-Condition(s)
A reader context has been initialized (i.e. specific to any given hardware platform).
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiReadMagstripe
Description
Get tracks from magstripe reader.
Pre-Condition(s)
A card must be swiped.
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiRemovalProcedure
Description
Initiate a CL removal procedure.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiResetContactless
Description
Reset reader's antenna.
Pre-Condition(s)
Antenna is powered on or off.
Post-Condition(s)
Antenna has been powered off.
Signature
Prototype
Parameters
Returned Values
Example
N/A
gpiSetTechnoToDetect
Description
Set technologies to detect.
Pre-Condition(s)
N/A
Post-Condition(s)
A list of technologies to poll on has been set.
Signature
Prototype
Parameters
Returned Values
Example
gpiTechnoPolling
Description
Poll for a specific set of technologies, for a specific time out.
Pre-Condition(s)
N/A
Post-Condition(s)
N/A
Signature
Prototype
Parameters
Returned Values
Example