AG ISDN Messaging API Developer's Reference Manual (6272-17): Alphabetical Function Reference
(Page 4 of 6 in this chapter)
isdnSetMsgCapture
Description
- Sends tracing messages to the agmon monitor screen from the selected ISDN entity on the board associated with the specified CTA context.
Prototype
- DWORD isdnSetMsgCapture ( CTAHD ctahd,
DWORD enable,
DWORD nai,
Achar *entity_id_string )
- ctahd CTA context handle associated with a D channel, returned by ctaCreateContext.
- enable Toggle for tracing: 1 causes tracing messages to be generated by the ISDN protocol entity named by entity_id_string. 0 disables tracing.
- nai Network access identifier on which to enable or disable tracing.
- entity_id_string The NULL-terminated string of one-character names of ISDN protocol entities for which tracing is either enabled or disabled according to the enable parameter. The entity names are defined by the isdntype.h include file.
Return Values
Events
Details
- This function enables or disables tracing of messages generated by the ISDN protocol entities named by the entity_id_string. The board is implied by the specified ctahd.
- When the entity_id_string contains the string * (an asterisk), all entities are affected. By default, tracing is enabled for all entities.
- In order for messages to be sent to the agmon monitor screen, the flag passed to agtrace must be set to
0x801000.
Example
#define TRACE_ENABLE 1
#define TRACE_DISABLE 0
void mySetTrace( CTAHD ctahd, DWORD enable, char *list )
{
DWORD ret;
CTA_EVENT event;
char errortext[40];
ret = isdnSetMsgCapture( ctahd, enable, 0, trace_list );
if( ret != SUCCESS)
{
ctaGetText(ctahd, ret, errortext, 40);
printf("TRACE_FAIL: %s\n", errrortext);
return MY_ERROR_TRACE_FAILED;
}
myWaitForEvent( ctahd, &event)
if( event.value != SUCCESS)
{
ctaGetText(ctahd, event.value, errortext, 40);
printf("TRACE_FAIL: %s\n", errortext);
return MY_ERROR_TRACE_FAILED;
}
}
void do_trace (CTAHD ctahd)
{
char trace_list[20];
/*
** Disable all tracing first
*/
mySetTrace( ctahd, TRACE_DISABLE, "*" );
/*
** Enable tracing for Call control layer and the application
*/
sprintf(trace_list, "%c%c", ENT_CC, ENT_API );
mySetTrace( porthd, TRACE_ENABLE, trace_list );
}
(Page 4 of 6 in this chapter)
tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights
reserved.