(Page 12 of 69 in this chapter) Version
{ /* User accessible CONTEXT INFO structure: */
DWORD size; /* returned size of this structure */
DWORD queueid; /* not used in CT Access */
DWORD userid; /* not used in CT Access */
INT32 agliberr; /* last error code after calling AGLIB */
DWORD channel; /* AG Channel */
DWORD board; /* AG Board number */
DWORD stream; /* MVIP stream of this port */
DWORD timeslot; /* MVIP slot of this port */
DWORD mode; /* MVIP mode of operation of this port */
DWORD maxbufsize; /* maximum board buffer size */
char tcpname[12]; /* Current Protocol */
DWORD state; /* port state */
DWORD stream95; /* MVIP-95 base stream number */
} ADI_CONTEXT_INFO;
int myShowContextState( CTAHD ctahd )
{
ADI_CONTEXT_INFO info;
if( adiGetContextInfo( ctahd, &info, sizeof info ) != SUCCESS )
return MYFAILURE;
printf( " Queue ID = %d\n", info.queueid );
printf( " User ID = %08Xh\n", info.userid );
printf( " AG Channel = %08Xh\n", info.channel );
printf( "Last AGLIB Error = %d \n", info.agliberr );
printf( " AG Buffer Size = %d\n", info.maxbufsize );
printf( " Protocol = %s\n", info.tcpname );
printf( " Board Number = %d\n", info.board );
printf( "Stream:Slot,Mode = %d:%d,", info.stream, info.timeslot );
switch( info.mode )
{
case ADI_FULL_DUPLEX : puts("ADI_FULL_DUPLEX" ); break;
case ADI_VOICE_DUPLEX : puts("ADI_VOICE_DUPLEX" ); break;
case ADI_SIGNAL_DUPLEX : puts("ADI_SIGNAL_DUPLEX" ); break;
default:
if( info.mode & ADI_VOICE_INPUT ) printf( "+ADI_VOICE_INPUT" );
if( info.mode & ADI_VOICE_OUTPUT ) printf( "+ADI_VOICE_OUTPUT" );
if( info.mode & ADI_SIGNAL_INPUT ) printf( "+ADI_SIGNAL_INPUT" );
if( info.mode & ADI_SIGNAL_OUTPUT) printf( "+ADI_SIGNAL_OUTPUT");
printf( "\n" );
break;
}
printf("\n");
return SUCCESS;
}
(Page 12 of 69 in this chapter) Version