Amadis

GPI Platform Primitives

gpiCleanUp

Description

Clean up device's specific stuff. A clean up should be performed only once during the system's life cycle.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A (i.e. specific to any given hardware platform).

Signature

Prototype

tGPIError gpiCleanUp (void);

Parameters

void

Returned Values

tGPIError: admNO_ERROR // Normal case of execution

Example

N/A

gpiCloseLibrary

Description

Close a dynamic library. Library closing is performed by the entry point to manage AFS services at disconnection time.

Pre-Condition(s)

A dynamic library must be loaded to working memory, and a valid library pointer is available (subsequently to a gpiOpenLibrary).

Post-Condition(s)

A dynamic library has been removed from working memory.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiFileClose

Description

Close a GPI file.

Pre-Condition(s)

A GPI file is opened, and a valid GPI file handler is available (subsequently to a gpiOpenFile).

Post-Condition(s)

A GPI file has been closed.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiFileDelete

Description

Delete a GPI file.

Pre-Condition(s)

A GPI file exits.

Post-Condition(s)

A GPI file has been deleted.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiFileGetSize

Description

Get a GPI file's size.

Pre-Condition(s)

A GPI file exists.

Post-Condition(s)

A GPI file's length has been provided.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiFileOpen

Description

Open a GPI file. Agnos persistent data model uses only BINARY files (TERMINAL, PROCESSING, ENTRY_POINT, CAKeys, CRL, and EFL). GPI files are used by Agnos Framework to manage configurations corresponding to acquirer/processor requirements.

Pre-Condition(s)

A GPI file exists.

Post-Condition(s)

A GPI file has been opened in a specific access mode, and a valid GPI file handler has been provided. File's seek cursor has been set to BEGIN.

Signature

Prototype

Parameters

Returned Values

Example

gpiFileRead

Description

Read a GPI file. Agnos persistent data model uses only BINARY files (TERMINAL, PROCESSING, ENTRY_POINT, CAKeys, CRL, and EFL). GPI files are used by Agnos Framework to manage configurations corresponding to acquirer/processor requirements.

Pre-Condition(s)

A GPI file is opened with read access, and a valid GPI file handler is available.

Post-Condition(s)

A buffer has been set from file' s data. GPI file's seek cursor has been updated to the last read position.

Signature

Prototype

Parameters

Returned Values

Example

gpiFileWrite

Description

Write a GPI file. Agnos persistent data model uses only BINARY files (TERMINAL, PROCESSING, ENTRY_POINT, CAKeys, CRL, and EFL). GPI files are used by Agnos Framework to manage configurations corresponding to acquirer/processor requirements.

Pre-Condition(s)

A GPI file is opened with write access, and a valid GPI file handler is available.

Post-Condition(s)

A GPI file has been set to buffer data. GPI file's seek cursor has been set to the last write position.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiFreeTimer

Description

Free a GPI timer.

Pre-Condition(s)

A valid GPI timer handler is available (subsequently to a gpiGetTimer).

Post-Condition(s)

A GPI timer has been freed.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetDataObjectRAM

Description

Get available RAM address in order to store CL combinations. This primitive is used by the framework to manage transient data model.

Pre-Condition(s)

Data object RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

gpiGetDate

Description

Get system's date. Date is mandatory to set a payment context prior to a transaction triggering.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A

Signature

Prototype

Parameters

Returned Values

Example

gpiGetFreeRAM

Description

Get available RAM address in order to store free. This primitive is used by the Level3 so that RAM can be mutualized.

Pre-Condition(s)

Free RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetLibraryFunction

Description

Get a dynamic library function's pointer. Library functions are managed by the entry point to support CL kernels activation.

Pre-Condition(s)

A dynamic library must be opened, and a valid library pointer is available (subsequently to a gpiOpenLibrary).

Post-Condition(s)

A pointer to a library's function has been provided (if function's name valid).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetMaxTimer

Description

Get maximum timer supported by the GPI.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetPrivateScratchPAD

Description

Get a private scratch pad to store proprietary and private information. This primitive is used by CL kernels to store torn information so that torn records are persistent between 2 different transactions.

Pre-Condition(s)

Scratch PAD RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

gpiGetRAMForTags

Description

Get available RAM address in order to store tags during a transaction (terminal's and card's EMV tags). This primitive is used by the framework when a new session is opened prior to an initiate.

Pre-Condition(s)

Tags RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetRAMForUnknownTags

Description

Get available RAM address in order to store unknown tags during a transaction (card's EMV tags). This primitive is used by the framework when a new session is opened prior to an initiate.

Pre-Condition(s)

Unknown tags RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetTerminalIdentification

Description

Get terminal's identification (used to set 9F1C). This primitive is used by Agnos Framework to set terminal's profile in the scope of EMV contact Level2 TA.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetTime

Description

Get system's time. Time is mandatory to set a payment context prior to a transaction triggering.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A

Signature

Prototype

Parameters

Returned Values

Example

gpiGetTimer

Description

Get a GPI timer handler. A timer is a mechanism used by Agnos to measure elapsed time and to control timeouts. As Agnos is a synchroneous stack, timeout detection is managed through polling.

Pre-Condition(s)

At least one GPI timer handler is statically available.

Post-Condition(s)

A valid GPI timer handler has been provided.

Signature

Prototype

Parameters

Returned Values

Example

ode>

gpiGetTimerState

Description

Get current timer's state.

Pre-Condition(s)

A GPI timer is running, and a valid timer handler is available (subsequently to a gpiGetTimer).

Post-Condition(s)

A GPI timer state has been provided.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetTimerTime

Description

Get current timer's elapsed time.

Pre-Condition(s)

A GPI timer is running, and a valid timer handler is available (subsequently to a gpiGetTimer).

Post-Condition(s)

A GPI timer elapsed time is provided: elasped seconds + elpased micro-seconds. If timer is above timeout then its state has been set to tsTIMEOUT.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiGetTotalRAM

Description

Get total available RAM address in order to store huge amount of data (depending of platform's constraints). This primitive is used by the Level3 so that RAM can be mutualized.

Pre-Condition(s)

Total RAM memory is statically available.

Post-Condition(s)

RAM has been reset to 0x00 (depends on GPI implementation).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiInitialize

Description

Initialize device's specific stuff and GPI internal mechanism (logger).

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

gpiMain

Description

Set GPI and corresponding device with proprietary parameters values.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A (i.e. specific to any given hardware platform).

Signature

Prototype

Parameters

Returned Values

Example

gpiOpenLibrary

Description

Open a dynamic library. Library opening is performed by the entry point to manage AFS services at connection time.

Pre-Condition(s)

N/A

Post-Condition(s)

A dynamic library has been opened, and a valid library pointer has been provided (if library's name valid).

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiRelease

Description

Release device's specific stuff and GPI internal mechanism (logger). This primitive may be called several times.

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

gpiResetTimers

Description

Reset all GPI timers.

Pre-Condition(s)

N/A

Post-Condition(s)

GPI timer(s) has(ve) been freed.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiSetDateTime

Description

Set system's date and time.

Pre-Condition(s)

N/A

Post-Condition(s)

New system's date and time have been set.

Signature

Prototype

Parameters

Returned Values

Example

gpiSleep

Description

Sleep during a specific time. This primitive is used to pace a transaction allocating enough time to allow the cardholder to read a message for example.

Pre-Condition(s)

N/A

Post-Condition(s)

N/A

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiStartTimer

Description

Start a GPI timer.

Pre-Condition(s)

A GPI timer is running, and a valid GPI timer handler is available (subsequently to a gpiGetTimer).

Post-Condition(s)

A GPI timer has been started, and its state is set to tsRUNNING.

Signature

Prototype

Parameters

Returned Values

Example

N/A

gpiStopTimer

Description

Stop a GPI timer.

Pre-Condition(s)

A GPI timer is running, and a valid GPI timer handler is available (subsequently to a gpiGetTimer).

Post-Condition(s)

A GPI timer has been stopped, and its state has been set to tsSTOPPED. If timer is above timeout then its state has been set to tsTIMEOUT.

Signature

Prototype

Parameters

Returned Values

Example

N/A