User's Manual

Table Of Contents
Appendix C – Sample Programs________________________________ Boomer II User Manual & Integrator’s Guide
Wavenet Technology 168 BM210012WT27
Server Application
The server program is a Windows NT command line program that
connects to the DataTAC
®
network switch and waits to receive data
from wireless client devices. Any data received from wireless clients is
echoed back to the same client on the same session. The server
program can handle simultaneous connections from multiple clients.
All activity indications (data transfer, connections and disconnections)
are logged to the screen. The server program operates without requiring
any user input.
Communications to the RNG are established either via a TCP/IP or an
X.25 connection, based on command line parameters.
The server program is implemented in a single module: server.c.
The server program uses SCR API to decode, encode, and interpret the
messages from the network. The server program contains code to
communicate with the network switch or RNG via either X.25 or
TCP/IP. The X.25 connection code is written using the EICON X.25
Developer's Tools for Win32. To run the application over an X.25
connection, you must have an X.25 connection to the switch, as well as
an EICON X.25 card plus EICON WAN Services drivers for this card.
To run the sample application via TCP1IP, you must have a TCP/IP
connection to the network switch. For help in getting this connection
set up, contact your DataTAC network operator.
The following pseudo code outlines the implementation of the main() function.
main ()
{
Initialize application variables
Set default values for user configurable parameters
Process command line and update parameters
Initialize X.25 API or Winsock DLL (connection to
RNG)
Initialize SCR API using scr_Init()
Establish a connection to the DataTAC network
while (!terminate){
Read data from the network
Handle Message zHandleMessage()
}
Terminate connection to RNG
Clean up
}
Initialisation and Login
zEstablishConnection() establishes the connection to the RNG, using
either TCP/IP or X.25. When either a DataTAC(D 4000 or DataTAC
6000 network is used, this is all that is needed for the server to connect
to the DataTAC network.
When a DataTAC 5000 network is being used, the server application
must login to the RNG to identify itself. The login message is encoded