Concepts - tcp/ip com – Worth Data RF Terminal 7000 User Manual

Page 62

Advertising
background image

Before making any

WDIPterm

method calls in your application, make sure to set the

ServerOn

property to

"true".

Test For Good Communication

Implement an event handler for

OnTermBaseRegister

that causes a beep or displays a message when called. If

communication between the host PC and the base station is good, your event handler will fire when your
program is running and you power up an attached base station.

Multiple Base Stations

For installations using multiple base stations attached to a single client PC, simply use the four "channels"
provided by the Client Utility program.

Terminal Tracking

Since you get only one set of event handlers, you will need some scheme for keeping track of where each
terminal (up to 64 per base station, up to 4 base stations per client) is in its transaction sequence. One
possible solution is to use a "state" variable for each terminal (perhaps stored in an array). Test the state
variable to determine the next prompt for any given terminal. See the samples for more ideas.

It is very important to keep track of "login status" for each terminal. Every SignOut event should have an
associated SignIn event and a given terminal should not be allowed to SignIn twice without and an
intervening SignOut. Multiple SignIns from one terminal without appropriate SignOuts indicate either:

A terminal going out of range and having its power cycled before returning within range OR

Two (or more) terminals using the same ID (terminal ID conflict).

Concepts - TCP/IP COM

Drop-in components are tools that are added to your programming environment "tool kit". Only the ActiveX
variety are widely compatible with almost all development environments. When you use drop-in
components in your program you will follow the standard object-oriented programming paradigm that uses
properties, methods, and events to implement the functionality of the drop-in component.

Properties are the various configuration variables used by the drop-in component. An example of a property
is the

ServerOn

setting.

Methods are function calls used to issue commands and access features of the drop-in component. An
example of a method is sending an

Input

command to the terminal.

Events are function definitions placed in your application’s source code. The function definitions in your
source code are called Event Handlers. The skeleton structure of the event handler’s source code is
automatically generated. The code in the Event Handler is called ("fired") by the drop-in component when a
specific event occurs. An example of an event is when a terminal returns data and the

OnTermData

event is

fired.

The details of how to access Properties/Methods/Events varies between development platforms. Details of
how it works in some of the most popular platforms is illustrated in the samples included with the RF
Utilities CD or available for download from our website at:

http://www.barcodehq.com/downloads.html

Advertising