Chapter 5
Before you begin programming…
The “Application Host Program” or “Server Program” is a program designed and written by the user that incorporates the WD802Term ActiveX control. When an 802 RF Terminal is turned on and “Signs In” to the host, the WD802Term control reports a terminal ID number to the host application that is unique to that terminal. The IP address of a particular terminal can also be obtained.
Once an 802 RF Terminal is signed in, it receives messages from the host user program. The terminal responds back to the host application program with data that was keyed or scanned by the terminal's user. The host application program processes the data and sends back the next prompt. Each 802 RF Terminal has a unique IP address (or at least a unique Mac address). The host program can obtain any terminal’s IP address or, for the sake of compatibility with programs written for 70/700 series terminals, resolve terminal addresses to a single character Terminal ID
The dialog between 802 RF Terminal and Application Host is established when a terminal connects to the 802.11 RF network. The host computer application waits until a terminal SIGNS ON, then begins its processing by sending the first prompt out to the terminal via an 802.11/b Access Point.
Before you begin programming, there are some factors you should take into consideration during the planning process.
•Plan for system failures. This includes hardware failures, software failures and operator failures. In order to create an efficient application, you must put some thought into what you will do when different parts of the system fail.
•Look for All Errors. Be sure your program is trapping all possible error conditions that the Server may return to you. The list includes:
Sequence Errors detected
Illegal Command detected
Server
Addressing a Terminal Not Signed In
Command without an ID
All of these error conditions are detailed in the next chapter. Don’t forget to program for them; this is a common mistake. Failure to trap them will give create very strange, unpredictable results.
Even though you don’t think your code will ever make a mistake, take advantage of feedback that the Server provides. Failure to do so is a common mistake that eventually results in serious program failure, sometimes due to hardware problems that go undetected.