Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

The very step to avoid difficult integration times: unit test the external communication with ACE.

View file
nametutorial#1

Code Block
breakoutModewide
languagec
int main(int argc, char//---------------------------------------------------------
//            Main
//---------------------------------------------------------
int main(int argc, char** argv)
{
  	// Communication
  	int port, length;
  	char address[50]="";

  	// Get communicationCommunication parameters from ini file
  	xgpiIniSetFilename("agnos.ini");
  	xgpiIniGetString("COM", "Address", 50, address, &length);
  	xgpiIniGetNumeric("COM", "Port", &port);

  	// Initialize ACE
  	// Initialize generic communication interface
 
	assert(tcpInit(0) == TCP_NO_ERROR);

  // Device side is server fro ACE
  	assert(comtcpOpen(&gACEServerCOMTCP, TCP_SERVER, 0, port) == COM_NO_ERROR);
  // Device side is also an ACE client
  	assert(comtcpOpen(&gACEClientCOMTCP, TCP_CLIENT, address, 1979) == COM_NO_ERROR);

  	aceInitializeCommunication(&gACEServerCOMTCP.com,&gACEClientCOMTCP.com);
	
  	// Initialize running mode
  	aceSetMode(pmSDK);

	
  // Set ACE option
  	aceSetUIDisplay(bTRUE);

  	// Tutorial
  	aceOut("Training Session - BEGIN\n");
  	aceOut("Hello World!\n");
  	aceOut("Training Session - END\n");

	return 0;
}

Tutorial #2: initialize language and payment context

...