(Page 39 of 80 in this chapter)
adiQuerySignalState
Description
- Queries the current state of the out-of-band signaling bits.
Prototype
- DWORD adiQuerySignalState( CTAHD ctahd )
- ctahd Context handle returned by adiOpenPort.
Return Values
Events
DSP File Requirement
- This function requires that signal.dsp has been loaded by agmon.
Details
- Queries the out-of-band signaling detector for the current state of the signaling bits. These signaling bits may be the actual T1/E1 digital carrier signaling bits or may relate to specific detectors of analog interface boards (e.g., a ring detector). In both cases, AG Access recognizes four signaling bits: A, B, C, and D, often written as ABCD, and defined by the constants ADI_A_BIT, ADI_B_BIT, ADI_BIT, and ADI_D_BIT.
Note: This function may only be called if the current protocol has reserved use of the signaling bits, or if you have started detection using adiStartSignalDetector.
See Also
- adiStartSignalDetector, adiSearchSignal
Example
int myShowMVIP( CTAHD ctahd )
{
ADI_EVENT event;
if( adiQuerySignalState( ctahd ) != SUCCESS )
return MYFAILURE;
while( 1 )
{
myGetEvent( &event ); /* see adiFetchAndProcess example */
switch( event.id )
{
case ADIEVN_QUERY_SIGNAL_DONE:
printf( "MVIP signalling bits = 0x%x (%c%c%c%c)\n",
(event.value&0xf),
(event.value&0x8)?'A':'-', (event.value&0x4)?'B':'-',
(event.value&0x2)?'C':'-', (event.value&0x1)?'D':'-' );
break;
/* ... */
}
}
}
(Page 39 of 80 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights
reserved.