Table of Contents |
---|
Agnos - along with AgnosDB - provides a set of EMV core primitives which support EMV transaction flow. These primitives are used by:
CT payment applications (see emvco.c as example)
CL card processing applications (alias CL kernels)
Agnos encapsulates an EMV tags database. This API is usually not accessed from payment application exception to manage “unknow tags’', alias proprietary tags (see below).
Agnos provides three modes of execution (see Training modules for more details):
Direct Execution (meant for contact): an EMV transaction is peformed from Final Select to Generate AC1
Granular Calls (meant for contactless): an EMV transaction is performed step-by-step depending on a specific logic. Each EMV step is directly called (Final Select, GPO, Read Record, ODA (SDA,DDA, CDA), CVM, Terminal Action Analysis, Card Action Analysis) and the control is implemented outside the core engine
State Machine (meant for contact and contactless): an EMV transaction can be formed performed step-by-step with the control inside and outside the core engine (a mix between to 2 previous modes to reduce the complexity of granular calls sequence)
C Structures
tTransactionalContext (agnos.h)
...
Names | Comments | ||
---|---|---|---|
Initialization | |||
agnGetVersionNumber | Provide EMV core engine version | ||
agnOpenSession | Open a CT session to initiate an EMV transaction flow | ||
agnOpenSessionCL | Open a CL session to initiate an EMV transaction flow | ||
agnInititateEMVTransaction | Initiate/Resume an EMV transaction | ||
agnCompleteEMVTransaction | Complete a transaction as per EMVCo definition | ||
agnCloseSession | Close a transaction flow | ||
Setters and Getters | |||
agnSetAgnosDatabase | Add a series of tags. Each tag is statically indexed and ruled by an update condition. Use an appropriate update condition to store tags directly into Agnos database | ||
agnSetKernelStatus | Set core engine to a specific state. Use this primitive to skip a state in State Machine mode | ||
agnSetEMVTag | Add a tag into Agnos database without checking tag’s update condition | ||
agnOverwriteTag | Overwrite an existing tag. If it doesn’t exist, create it (no garbage collection if sizes don’t match) | ||
agnRemoveTag | Remove a tag from Agnos database (no garbage collection) | ||
agnGetEMVTag | Get a specific tag from Agnos database | ||
agnGetAllTags | Get all tags from Agnos database | ||
agnGetDatabase | Get the current database | ||
agnIsEMVTagKnown | Return bTRUE is tag statically known | ||
agnIsEMVTagPresent | Return bTRUE if tag is present whatever its length | ||
agnIsEMVTagEmpty | Return bTRUE if tag’s length is 0 | ||
agnIsEMVTagNotEmpty | Return bTRUE if tag’s length is not 0 | ||
agnORTVR | OR a specific TVR’s bit to 1 | ||
agnORAgnosTVR | OR a specific Agnos TVR’s bit to 1 | ||
agnSetAgnosTVR | Set a specific Agnos TVR byte value | ||
AgnosDB Primitives | |||
adbGetVersionNumber | Provide Agnos database version. Get all pointers on shared RAM spaces provided by SAL/HAL and set adbAddTag strategy to STANDARD (i.e. EMVCo rule where update conditions are not checked) | ||
adbResetDataBase | Reserved to Agnos Core Enginecore engine. Reset database structure | ||
adbSetStrategy | Reserved to Agnos Core Engine core engine and contactless card processing. By default, Agnos databse uses EMVco tags storage strategy where no check is performed on tags' update conditions. If a storage strategy is defined (by a contactless card processing) then:
| ||
adbAddTag | Reserved to Agnos Core Enginecore engine. Check whether a tag may be added into EMV tags database. In order to store EMV tags directly into Agnos database, use agnSetAgnosDataBase primitive instead | ||
adbAddUnknownTag | Add any tags into EMV tags database in “UnknowTag” bucket | ||
adbGetUnknowTags | Get all tags stored into unknown tags bucket | ||
adbGetUnknownTagsLength | Get the bucket’s length | ||
adbGetUnknownTagsCount | Get tags count from the bucket | ||
adbGetAllTLV | Get all TLV stored in AgnosDB
|
C Example
See emvco.c. and canadianselection.h. They provide good examples on agnos.h and selection.h integration in the scope of contact card processing.