User's Manual

Table Of Contents
Appendix C – Sample Programs________________________________ Boomer II User Manual & Integrator’s Guide
Wavenet Technology 170 BM210012WT27
scr_NakReasonText(); /* returns NULL if no error
occurred */
if (an error occurred){
Print reason text
}
else{
Report successful delivery of message
}
break;
case SCR_FROM_NET: /* Received inbound message*/
prepare message "TO_NET"
/*echo data back to the client*/
break;
case SCR_CI: /* Connect indication DataTAC 5000 only */
Report 'LLI x has connected'
break;
case SCR_DI: /* Disconnect indication DataTAC 5000 only
*/
Report 'LLI x has disconnected'
break;
default: /* Unknown message type*/
Report 'Unhandled message type'
break;
}
scr_FreeDecoding ();
/*free dynamically allocated buffers in API*/
/*when it decoded the current message*/
if ( a Response has to be sent ){
scr_Encode (); /*encode the response message*/
If (encoded successfully){
Send data to the network
}
else{
Report 'SCR encoding error'
}
}
}