#include "example.h"
#define LOCAL
int main(void) {
uint32 rc;
HMXF_SERVER server=0;
HMXF_DEVICE device=0;
uint64 result=0;
char info[256]="";
char diagnostic[256]="";
uint64 port;
int testCnt=0;
int failCnt=0;
#ifdef LOCAL
#else
#endif
if(rc!=MAXT_SUCCESS) {
printf("Failed to connect; rc=0x%08x", rc);
getchar();
return 0;
}
if(!rc)
printf("Starting ...\n\n");
if(!rc)
if(!rc) {
for(port=0; !rc; port++) {
printf("mxfSelfTestARINC429(port #%"PRIu64") ... ", port);
rc=
mxfSelfTestARINC429(device, port, MXF_SELFTEST_LEVEL_QUICK, VMXF_DISABLE, &result, info, diagnostic);
if(rc==MAXT_ERROR_PORT_NOT_FOUND) { rc=0; printf("\r \r"); break; }
printf("\n");
testCnt++; if(rc || result) failCnt++;
if(rc) {
printf(" ERROR = 0x%08X \n", rc);
}
else {
printf(" info = %s \n", info);
printf(" Result = %s \n", result?"FAILED":"PASSED");
if(result)
printf(" diagnostic = %s \n", diagnostic);
}
printf(" \n");
}
printf(" --------------------------------------- \n");
printf(" TEST %s ", failCnt?"FAILED":"PASSED");
if(failCnt)
printf("(%u of %u tests failed) \n", failCnt, testCnt);
else
printf("\n");
printf(" --------------------------------------- \n");
printf("\n");
}
if(rc) {
char errorString[256];
printf("\n");
sprintf(errorString, "ERROR # 0x%X", rc);
printf("%s\n\r", errorString);
}
printf("\nPress a key to terminate\n");
getchar();
return rc;
}