Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This API is the second level of integration for Agnos Framework. Hence, It is recommended to unit test all the services below outside the execution of a transaction before starting functional tests.

Table of Contents

ACE Services

ACE Services

Description

Prerequisites to a Call

aceInitialize

aceSetMode

There are three running modes defined in ACE:

  • pmNONE

  • pmSDK

  • pmAUTO

Use pmSDK

aceGetMode

Get current ACE mode

aceInitializeCommunication

aceGetRequest

aceSendResponse

aceMsgToACE

aceClearScreen

aceDisplayMessage

aceEmptyKeyPadCache

aceLogAPDU

aceLogAllBatchedAPDU

acePlayBeep

Play a beep in ACE

aceGetKey

Get key from ACE

aceSwitchLED

Switch a LED on ACE

aceOut

aceSendAdvancedDisplayAsOutcome

aceSendAdvancedDisplay

Out in ACE’s Console Log

Code Block
aceOut("Hello World!"); // Open Console Log under ACE prior the unit test

Signals Services

Code Block
breakoutModefull-width
languagec
//---------------------------------------------------------
//				SIGNALS (paymenMW.h)
//---------------------------------------------------------
// These services has been implemented only to support certification sessions.

typedef void (*sgnSendOutcome)(tOutComeParameter *outcome);
typedef void (*sgnSendDR)(tPaymentContext *payment);
typedef void (*sgnSendDD)(tPaymentContext *payment);
typedef void (*sgnSendRawDD)(tByte *data, tWord dataLen);
typedef void (*sgnSendDEK)(tPaymentContext *payment, tByte ADPUState, tBoolean sendDataNeeded, tByte* outDET, tWord* lenOutDET);
typedef void (*sgnSendDET)(tPaymentContext *payment);
typedef void (*sgnSendTag)(tPaymentContext *payment);

#ifdef PACKING
#pragma pack(1)
#endif
typedef struct {
	sgnSendOutcome mSendOutcomeSignal;
	sgnSendDR mSendDRSignal;
	sgnSendDD mSendDDSignal;
	sgnSendRawDD mSendRawDDSignal;
	sgnSendDEK mSendDEKSignal;
	sgnSendDET mSendDETSignal;
	sgnSendTag mSendTagSignal;
} tSignal;
#pragma pack()

DLLEXPORT void pmwSetSignal(tSignal *signal);
DLLEXPORT void pmwSendOutcome	(tOutComeParameter 	*outcome);
DLLEXPORT void pmwSendDR (tPaymentContext *payment);
DLLEXPORT void pmwSendDD (tPaymentContext *payment);
DLLEXPORT void pmwSendRawDD (tByte *data, tWord dataLen);
DLLEXPORT void pmwSendDEK (tPaymentContext *payment, tByte ADPUState, tBoolean sendDataNeeded, tByte* outDET, tWord* lenOutDET);
DLLEXPORT void pmwSendDET (tPaymentContext *payment);
DLLEXPORT void pmwSendTag (tPaymentContext *payment);

Signals Services

Description

Prerequisites to a Call

aceGetSignal

Get all signals services from ACE in order to set signals callbacks defined in AgnosMW. These signals callbacks are called by Agnos components like AgnosEP and kernels to raise information at ACE level during a transaction

  • N/A

  • Example:

Code Block
languagec
#include "paymentMW.h"

//---------------------------------------------------------
//            setSignals
//---------------------------------------------------------
//  Set Signals used for CL certification
//
//  Visibility: Private
//  Hypothesis: --
//  Reference: --
//
void setSignals()
{
	tBoolean contactless = bTRUE;
	tBoolean signal = bTRUE;
	tSignal signal;

	if(contactless && signal)
		aceGetSignal(&signal);
	else
	{
		signal.mSendOutcomeSignal = 0;
		signal.mSendDRSignal =  0;
		signal.mSendDDSignal =  0;
		signal.mSendRawDDSignal = 0;
		signal.mSendDEKSignal = 0;
		signal.mSendDETSignal = 0;
		signal.mSendTagSignal = 0;
	}

	pmwSetSignal(&signal);
}

aceSendAdvancedDisplayAsOutcome

Send

  • Running mode = pmSDK (default value)

  • Example

Code Block
tUIRequestData data;

dtxInitializeUIRequestData(&data);
aceSetDigitalSignal(0);
aceSendAdvancedDisplayAsOutcome(&data);
aceSetDigitalSignal(1);
aceSendAdvancedDisplayAsOutcome(&data);

aceSendAdvancedDisplay

  • Running mode = pmSDK (default value)

  • Use Digital Signal to bTRUE and to bFALSE

  • Example

Code Block
tUIRequestData data;

dtxInitializeUIRequestData(&data);
aceSetDigitalSignal(0);
aceSendAdvancedDisplay(&data);
aceSetDigitalSignal(1);
aceSendAdvancedDisplay(&data);

aceSendOutcome

Send an Outcome signal to ACE

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • Example:

Code Block
tOutComeParameter outcome;

pmwInitializeOutComeParameter(&outcome);
aceSendOutcome(&outcome);

aceSendDR

Send a Data Record signal to ACE

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • gpiGetFreeRAM must be integrated

  • tPaymentContext mDataExchange.mDataRecord.mStream and tPaymentContext mDataExchange.mDataRecord.mLength must contained TLV data

aceSendDD

Send a Discretionary Data signal to ACE

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • gpiGetFreeRAM must be integrated

  • tPaymentContext mDataExchange.mDiscretionaryData.mStream and tPaymentContext mDataExchange.mDiscretionaryData.mLength must contained TLV data

aceSendRawDD

Send a Raw Discretionary Data signal to ACE

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • gpiGetFreeRAM must be integrated

aceSendDEK

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • gpiGetFreeRAM must be integrated

  • Example:

Code Block
languagec
tPaymentContext pay;
tByte outDET[50]="";
tWord lenOutDET=0;

pmwInitializePaymentContext(&pay);
aceSendDEK(pay,asGPO,bFALSE,outDET,&lenOutDET);

aceSendDET

N/A

N/A

aceSendTag

  • AgnosMW must be initialized from pmwSetSignal (use setSignals available in Kizis)

  • Running mode = pmSDK (default value)

  • gpiGetFreeRAM must be integrated

  • Example:

Code Block
languagec
tPaymentContext pay;
tTransactionalContext txnContext;
tSessionId session;

agnOpenSession("","","",&txnContext,bFALSE,bFALSE,&session,bFALSE,bFALSE);
pmwInitializePaymentContext(&pay);
aceSendTag(&pay);
agnCloseSession(session);

...