GPI provides a wide set of primitives.
Primitives
Basics
Primitives | Module | Comments |
---|---|---|
User Interface | UI primitives are limited to a few set of functions. EMV processing doesn’t require sophisticated displays. However, a minimum set of functions is required to provide a feedback to the cardholder and the merchants. | |
gpiDisplayMessageByID | SPED | Display a string from the string table indexed by ID |
gpiSetPollingMessage | SPED | Set the message to be display at AgnosEP’s polling time |
gpiDisplayPollingMessage | SPED | Display the message - at AgnosEP’s polling time - that has been set from gpiSetPollingMessage |
Memory | Platform/Memory primitives are used to optimize the memory allocation for card processing. Hence, no dynamic allocation is performed within the framework. There a 6 different king of RAM memory slots: DEV_TOTAL_RAM (0x01): DEV_TAGS_RAM + DEV_UNKNOWN_TAGS_RAM + DEV_UNKNOWN_TAGS_RAM DEV_TAGS_RAM (0x02): all tags supporting the card processing coming from device configuration or the card DEV_UNKNOWN_TAGS_RAM (0x03): any tags coming out from the card and not supported by AgnosDB DEV_FREE_RAM (0x04): extra RAM to support any king of processing beyond AGF if shared RAM used beyond AGF DEV_SLOT_RAM (0x05): private RAM to store data to support a proprietary processing such as torn mechanism. As of tofay, C2/MCW and C5/JCB requires these pads. DEV_DO_RAM (0x06): all tags corresponding to the CL combination in progress. This RAM space is used to load ENTRY POINT data (for a given transaction type) in order to prepare entry point confugration data specific to the transaction in progress. Recommended sizes: DEV_TAGS_RAM = 11500 bytes DEV_UNKNOWN_TAGS_RAM = 2500 bytes DEV_FREE_RAM = 3000 bytes DEV_SLOT_RAM = 17100 bytes DEV_DO_RAM = 10000 bytes | |
gpiGetTotalRAM | Platform | |
gpiGetRAMForTags | Platform | |
gpiGetRAMForUnknownTags | Platform | |
gpiGetFreeRAM | ||
gpiGetPrivateScratchPAD | ||
gpiGetDataObjectRAM | ||
RTC | ||
gpiStartTimer | Device Management | |
gpiGetTimerTime | Device Management | |
gpiGetTimerState | Device Management | |
gpiFreeTimer | Device Management | |
HSM | ||
gpiGetChecksum | HSM Management | Provide the checksum corresponding to each L2 CT/CL kernel |
File Management | ||
gpiFileOpen | Platform | |
gpiFileClose | Platform | |
gpiFileRead | Platform | |
gpiFileWrite | Platform | |
gpiFileDelete | Platform | |
gpiFileRename | Platform | |
gpiFileGetSize | Platform |
Initialization
Primitives | Module | Comment |
---|---|---|
Initialization | ||
gpiMain | Platform | GPI specific |
gpiInitialize | Platform | Platform specific. Enable any initialization related to the plaftorm |
gpiInitPolling | CAD | Platform specific. Enable any initialization realted to the contactless reader |
gpiInitializeHSM | HSM | Platform specific. Enable any initialization related to the platform’s crypto |
Card Processing
Primitives | Module | Comment |
---|---|---|
Card Interfaces | ||
gpiSetTechnoToDetect | CAD | Set the type of technologies to be detected during a polling: Technologies to detect are in:
|
gpiTechnoPolling | CAD | Perform a polling on technologies previously set. gpiError are in:
|
gpiPowerOn | CAD | |
gpiPolling | CAD | Poll for a contactless card. Its implementation depends on the platform. It leverages on L1 API to detect a card, to detect a collision, and to activate a card. gpiError are in:
|
gpiExchangeAPDU | CAD | Send / Receive an APDU Command / Response |
gpiGetLastExchangedAPDU | CAD | Provide last APDU command/response |
gpiRemovalProcedure | CAD | As per EMVCo standard |
gpiCardSwiped | CAD | If a card is swiped, return msrCARD_SWIPED |
gpiCardInsterted | CAD | If a card is inserted, retunr scrCARD_INSERTED |
gpiReadMagstripe | CAD | Provide all card’s tracks after a swipe |
gpiPowerOff | CAD | |
gpiPowerOffAllDevices | CAD | Swirch off all devices |
gpiResetContactless | CAD | Reset antenna |
gpiSetContactlessTransactionInProgress | CAD | Indicates that a contactless transaction is in progress |
gpiSetContactTransactionInProgress | CAD | Indicates that a contact transaction is in progress |
gpiSetSwipeTransactionInProgress | CAD | Indicates that a swipe transaction is in progress |
IsSetContactlessTransactionInProgress | CAD | |
IsSetContactTransactionInProgress | CAD | |
IsSwipeTransactionInProgress | CAD |
PIN Management
Primitives | Module | Comment |
---|---|---|
PIN Management | ||
gpiPINEnter | SPED |