(Page 8 of 15 in this chapter) Version


briGetContextInfo

Description

Retrieves configuration information about a specified CTA context.

Prototype

DWORD briGetContextInfo ( CTAHD ctahd,
BRI_CONTEXT_INFO *info,
unsigned size )

ctahd CTA context handle returned by ctaCreateContext.

info Buffer to receive the information. The BRI_CONTEXT_INFO structure is shown below:

typedef struct

{ /* 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 */

DWORD channel; /* BX 2000 channel */

DWORD board; /* BX 2000 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 */

/* (not used) */

DWORD maxbufsize; /* Maximum board buffer size (not used) */

DWORD state; /* Port state */

DWORD stream95; /* MVIP-95 base stream number (not used) */

char tcpname[12]; /* Current protocol */

} BRI_CONTEXT_INFO;

size Amount of memory available at info, which must be large enough to receive the BRI_CONTEXT_INFO size return value.

Return Values

Events

None.

Details

This function returns information about the current state of a specified CTA context. To obtain information concerning other services that may be opened on the CTA context, call the corresponding function in that service. For example, for the Voice Message service, call vceGetContextInfo.

Up to size bytes of the BRI_CONTEXT_INFO structure are copied to the address at info. If size is greater than or equal to sizeof(BRI_CONTEXT_INFO), the complete structure is copied. The number of bytes actually copied is returned in the BRI_CONTEXT_INFO size field.

The following table summarizes the BRI_CONTEXT_INFO structure. Many of these CTA context characteristics are described in other functions, as noted:

Field

Description

Related Functions

size

The returned size.

N/A

queueid

Not used.

N/A

userid

Not used.

N/A

channel

NMS internal.

N/A

board

The board number on which the CTA context's DSP resides.

ctaCreateContext

stream

The base MVIP stream for the CTA context.

ctaCreateContext

timeslot

The CTA context's MVIP-95 timeslot.

ctaCreateContext

mode

The CTA context's MVIP mode.

ctaCreateContext

maxbufsize

Not used.

N/A

tcpname

The protocol executing on the CTA context.

briStartProtocol

state

The CTA context state.

N/A

stream95

The base MVIP-95 stream.

N/A

Example


int  myShowContextState( CTAHD ctahd )
{
    BRI_CONTEXT_INFO info;

    if( briGetContextInfo( ctahd, &info, sizeof info ) != SUCCESS )
        return MYFAILURE;

    printf( "        Queue ID = %d\n",      info.queueid    );
    printf( "         User ID = %08Xh\n",   info.userid     );
    printf( "        Protocol = %s\n",      info.tcpname    );
    printf( "    Board Number = %d\n",      info.board      );
    printf( "Stream:Slot      = %d:%d",    info.stream, info.timeslot );
    printf("\n");
    return SUCCESS;
}


(Page 8 of 15 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.