User Manual

SDK - SCR API
________________________________
____________
Boomer II User Manual & Integrator’s Guide
Wavenet Technology 76 BM210012WT09
q scr_DIReasonText()
Prototype:
char *scr_DIReasonText(char *l_reason_code)
Description
For DataTAC 5000 Dynamic Routed Sessions Only
This routine converts a reason code from a Disconnect Indication (DI)
message into a text string describing that code. The returned pointer is
a pointer to a static text string within the library. This string must not
be overwritten or freed. This string pointer stays valid for the duration
of the program's execution. The text strings correspond to the text
given in the DataTAC 5000 System Host Application Programmer's
Manual.
Input:
Ø *l_reason code The reason code from the DI message
Output:
× Return !NULL Operation successful. Value a char pointer to a text string buffer
containing an English description for the meaning of the given
response code.
× Return NULL Operation failed.
Example
#i n c l ude <s c r a p i . h >
{
SCRMs g l ms g; / * SCR me s s a ge s t r u c t
*/
c ha r * l r e a s on; / * r e a s on c od e s t r i ng
*/
. . .
/ * r e c e i ve a me s s a g e a n d d e c ode i t i nt o l ms g * /
. . .
i f ( l ms g. ms g_ t yp e == SCR_ DI ) {
l r e a s on = s c r _DI Re a s onTe xt ( l ms g . u . di . r e a s on_c o de ) ;
i f ( l r e a s on ! = ( c h a r *) NULL) {
pr i nt f ( Di s c onn e c t i on - LLI %08X r e a s on
' %s ' \ n , l ma g. u. d i . l l i , l r e a s on) ;
}
}
}