#include "example.h"
struct RESPONSE_INFO {
uint64 a;
uint64 fc;
uint64 checksum;
uint64 crc;
uint64 l;
};
#define NUM_RESPONSE 4
const struct RESPONSE_INFO responseInfo[NUM_RESPONSE] = {
{0x1B,0,1,0,36},
{0x02,1,1,0,74},
{0x03,1,1,0,74},
{0x70,1,1,0,76} };
int main(void)
{
HMXF_SERVER server;
HMXF_DEVICE device;
HMXF_MODULE module=0;
HMXF_CHANNEL users[NUM_RESPONSE];
HMXF_BUFFER userBuf[NUM_RESPONSE][4]={0};
uint32 rc;
int i;
int doInit=1;
if (rc != MAXT_SUCCESS)
{
printf("Failed to connect; rc=0x%08x", rc);
getchar();
return 0;
}
printf("Starting ...\n");
if (!rc)
{
if (rc == MAXT_ERROR_ANOTHER_PROCESS_RUNNING)
{
doInit = 0;
}
}
if (!rc)
rc =
mxfChannelGet(server, MXF_CLASS_ASCB, MXF_SCLASS_RT_CHANNEL, MXF_MODULE_ALL, 0x9B-0x80, &users[0]);
if(!rc)
rc =
mxfChannelGet(server, MXF_CLASS_ASCB, MXF_SCLASS_RT_CHANNEL, MXF_MODULE_ALL, 0x82-0x80, &users[1]);
if (!rc)
rc =
mxfChannelGet(server, MXF_CLASS_ASCB, MXF_SCLASS_RT_CHANNEL, MXF_MODULE_ALL, 0x83-0x80, &users[2]);
if (!rc)
rc =
mxfChannelGet(server, MXF_CLASS_ASCB, MXF_SCLASS_RT_CHANNEL, MXF_MODULE_ALL, 0xF0-0x80, &users[3]);
if (!rc)
if (!rc)
if (!rc && doInit)
for(i=0; i<NUM_RESPONSE && !rc; i++)
{
if(!rc)
if (!rc)
if (!rc)
if (!rc)
if (!rc)
if (!rc)
if (!rc)
{
fc.
enable = responseInfo[i].fc;
}
if(!rc)
{
if(rc == MAXT_ERROR_BUFFER_ALLOCATED)
if (!rc)
{
if(rc == MAXT_ERROR_ALREADY_ATTACHED)
{
if(!rc)
}
}
}
if (!rc)
{
}
if(!rc)
{
if(responseInfo[i].a == 0x70)
{
if(rc == MAXT_ERROR_BUFFER_ALLOCATED)
if (!rc)
{
if(rc == MAXT_ERROR_ALREADY_ATTACHED)
{
if(!rc)
}
}
if (!rc)
{
}
}
}
if(!rc)
}
if(!rc)
for(i=0; i<NUM_RESPONSE && !rc; i++)
{
if (!rc)
{
if (responseInfo[i].a == 0x70)
{
}
}
}
if (!rc)
for(i=0; i<NUM_RESPONSE && !rc; i++)
{
if(!rc)
{
if(userBuf[i][0])
{
if(!rc)
}
if (userBuf[i][3])
{
if (!rc)
}
}
}
if (rc)
{
char errorString[200];
sprintf(errorString, "ERROR # 0x%X", rc);
printf("%s\n\r", errorString);
}
printf("Terminating ...\n");
if(rc == MAXT_ERROR_ANOTHER_PROCESS_RUNNING)
printf("\nPress a key to terminate\n");
getchar();
return rc;
}