#include "example.h"
int main(void)
{
uint32 rc;
HMXF_SERVER server=0;
HMXF_DEVICE device=0;
uint64 rotarySw=0, db9=0, relay=0;
if(rc)
{
printf("Failed to connect; rc=0x%08x", rc);
printf("\nPress a key to terminate\n");
getchar();
return 0;
}
printf("\nStarting\n");
if (!rc)
if(!rc)
if(!rc)
{
printf("Relays currently set to 0x%016"PRIX64"\n", relay);
if(rotarySw || db9)
printf("Rotary switch and DB9 configuration will override software configuration\n");
}
if(!rc)
if(!rc)
{
uint16 i, A, B, C, D;
uint16 mask;
printf("Relays now set to 0x%016"PRIX64"\n", relay);
A = relay & 0xFFFF;
B = (relay >> 16) & 0xFFFF;
C = (relay >> 32) & 0xFFFF;
D = (relay >> 48) & 0xFFFF;
for(i=0; i<16; i++)
{
printf("%02u: ", i);
mask = 1<<i;
if(A & mask)
printf("A");
if(B & mask)
printf("B");
if(C & mask)
printf("C");
if(D & mask)
printf("D");
if((A|B|C|D) & mask)
printf("\n");
else
printf("-\n");
}
}
if (rc)
{
char buffer[256];
printf("%s\n", buffer);
}
printf("\nTerminating\n");
printf("\nPress enter to terminate\n");
getchar();
return rc;
}