User's Manual

Table Of Contents
Boomer II User Manual & Integrator’s Guide ______________________________________________ SDK SCRAPI
BM210012WT27 163 Wavenet Technology
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
#include <scrapi.h>
{
SCRMsg lmsg; /* SCR message struct
*/
char *lreason; /* reason code string
*/
. . .
/* receive a message and decode it into lmsg */
. . .
if (lmsg.msg_type == SCR_DI) {
lreason = scr_DIReasonText(lmsg.u.di.reason_code);
if (lreason != (char *)NULL) {
printf(“Disconnection - LLI %08X – reason
'%s'\n”, lmag.u.di.lli, lreason);
}
}
}