The text of a manual · part 9 of 19
Worth Data R/F Terminal Owner's Guide, pages 81 to 90
Pages 81 to 90 of 180
The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Worth TriCoder LT71
Page 81
user to "break out" of scanner only mode by pressing the end key on the terminal. A termID+CR will be sent to the host. InputYesNo
Parameters: Function:
line, position, prompt This instructs the ActiveTerminal to display the prompt at line and position and wait for a Yes (Enter key or C key) or a No (0 key or B key) from the terminal keypad. Note: C and B keys are used to facilitate keypad entry while scanning with the integrated laser.
InputPassword
Parameters: Function:
line, position, prompt, shifted This instructs the ActiveTerminal to display the prompt at line and position and wait for data to be entered from the terminal keypad only. The entered data is not displayed on the terminal.
InputSerial
Parameters: Function:
line, position, prompt This instructs the ActiveTerminal to display the prompt at line and position and wait for data to be received through the terminal serial port. Waiting for serial input can be bypassed by pressing the enter key on the terminal which will send an empty data string to the host (fires the OnTermData event handler).
OutputSerial
Parameters: Function:
data This instructs the ActiveTerminal to send data to the terminal’s serial port. Data must be less than 248 characters in length for each call to OutputSerial. If you are sending data to a printer attached to the terminal, make sure to set the Protocol parameter in the RF Terminal to XON/XOFF. See the RF Terminal Manual for details.
SendDisplay
Parameters: Function:
line, position, prompt This instructs the ActiveTerminal to display the prompt at line and position. Must be followed by an "Input" method call to take effect.
ClearScreen
Function:
This instructs the ActiveTerminal to clear its display. Must be followed by an "Input" method call to take effect.
6-17
Page 82
ClearLine
Parameters: Function:
line This instructs the ActiveTerminal to clear the specified line on its display. Must be followed by an "Input" method call to take effect.
SendDate
Parameters: Function:
line This instructs the ActiveTerminal to display date and time on the specified line number. Must be followed by an "Input" method call to take effect.
Beep
Parameters: Function:
count This instructs the ActiveTerminal to beep count times. Count may be a value from 1 to 9. Must be followed by an "Input" method call to take effect.
PlayVoice
Parameters: Function:
msgnum This instructs the ActiveTerminal to play voice message number msgnum. Msgnum may be a value from 1 to 99. Must be followed by an "Input" method call to take effect.
ReInit
Function:
This instructs the ActiveTerminal to re-initialize. Must be followed by an "Input" method call to take effect. NOTE: Base Stations using EEPROM versions prior to 9079 will cause the message "Base Reinitialized.." to be displayed on the terminal. Only the terminal has actually been re-initialized. Later Base Stations use the message "Buffer Reinitialized..." to indicate a single terminal reinitialization.
ReInitAll
Function:
Instructs all attached terminals to re-initialize.
6-18
Page 83
Events WDterm events occur when a specific condition is met. When an event is "fired", an event handler function in your application is called. Though the details of exactly how it is done varies from one programming environment to the next, the source code skeletons for the various event handlers are automatically generated and inserted into your source code for you. See the samples for more specific information. Each event passes relevant information to your event handler function. The only event that does not pass any data is OnTermBaseRegister. All others pass at least the Terminal ID on which the event occurred. OnTermData also passes the data that was keyed or scanned into the terminal. Terminal ID is always passed as 0-15. A Terminal ID value of 99 indicates an error. Once you have the event handler skeletons, you can proceed to add whatever functionality you desire to each event. You must call the OpenDevice method before any events can be fired. OnTermBaseRegister
Event:
An attached base station has successfully powered up and communicated with the host computer via the serial connection.
OnTermSignIn6
Data passed: Event:
terminal A six-line terminal has signed in. Terminal ID is passed in terminal.
OnTermSignIn4
Data passed: Event:
terminal A four-line terminal has signed in. Terminal ID is passed in terminal.
OnTermSignOut
Data passed: Event:
terminal A terminal has signed out. Terminal ID is passed in terminal.
OnTermData
Data passed: Event:
terminal, data A terminal has sent data in response to an Input method call.
OnTermNotSignedIn
Data passed: Event:
terminal A command has been sent to a terminal that is not signed in.
6-19
Page 84
OnTermSequenceError
Data passed: Event:
terminal The one-for-one host prompt/terminal response protocol has been violated. The host cannot send a second Input command until it has received a response from the first Input command. If a base station receives 5 sequence errors in a row, a Host Logic error is generated and the base shuts itself down. While PromptCom/ActiveX will intercept and prevent most logic errors, they are still possible so you should implement this event handler!
OnTermIllegalCommand
Data passed: Event:
terminal An illegal command has been sent to a terminal. PromptCom/ActiveX is designed to prevent illegal commands but software is not always perfect and we may not have imagined all the ways in which our customers will want to use it!
OnTermUpArrow
Data passed: Event:
terminal The up-arrow button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
OnTermDownArrow
Data passed: Event:
terminal The down-arrow button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
OnTermLeftArrow
Data passed: Event:
terminal The left-arrow button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
OnTermRightArrow
Data passed: Event:
terminal The right-arrow button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
OnTermBeginKey Data passed: terminal Event: The BEGIN button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal. 6-20
Page 85
OnTermEndKey
Data Passed: Event:
terminal The END button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
OnTermSearchKey
Data passed: Event:
terminal The SEARCH button has been pressed on a terminal. You must issue another Input method call before WDterm can respond to another keypress on the terminal.
PromptNET TCP/IP Active X Controls PromptNET/ActiveX is a drop in COM component that allows programmers to easily add the ability to send prompts to and receive data from their R/F Terminal via an RF Base Station across a TCP/IP network connection. PromptNET requires a "Client" computer on a TCP/IP network (to which up to 4 serial Base Stations can be attached) and a "Server" computer visible on the network to the Client. The client computer runs the PromptNET Client Utility program as a background task. The server computer runs your application which uses the PromptNET ActiveX component to communicate with the Client. The ActiveX component is compatible with Visual Basic, Visual C++, Delphi, and most other 32-bit development platforms. The client program requires Windows 98 or later. See the help file for installation instructions.
Programming Considerations Network Setup • The network settings on both client and server must support TCP/IP communications. • It is critical that the client and server computers are "visible" to each other across your network. Both computers must have an IP address in the same subnet. The server requires a static IP address while the Client can either have a static address or use an assigned IP address via a DHCP server or equivalent. Refer to your Windows networking administration utility in the Control Panel to configure computer IP address settings. • PromptNET uses ports 54123 (server) and 54124 (client). • You can link server and client through a dial-up or DSL internet link as long as the server has a static IP address and your router passes the above ports.
6-21
Page 86
• If you are unsure of how to set up your IP configuration properly, refer to your network administrator for help. Client Utility • Make sure the Client Utility is properly installed on the client computer and communicating with at least one Base Station. Test the Client by cycling power on the Base Station. You should see a "Base SignOn" message in the monitor window. Server Communications • Run the Server Test Utility on the server computer. Now go to the client computer, set the IP address for the server computer and a unique "Base Name" for the Client Utility and attempt to connect to the Server Test Utility. If the Client Utility connects, you are configured properly. Go to the server computer, shut down the Server Test Utility and begin work on your PromptNET server application. • For Client/Server communications, the Client Utility is required to be running on the PC that the serial Base Stations are attached to. • 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 16 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:
6-22
Page 87
1.
A terminal going out of range and having its power cycled before returning within range OR
2.
Two (or more) terminals using the same ID (terminal ID conflict).
Concepts 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/wdterminal.exe
6-23
Page 88
Properties Properties are the various configuration variables used by the WDIPterm control. They are directly assignable in your application (eg. "WDIPterm.ServerOn = true") and can be set in your development environment’s object browser. Note that your development environment may show more properties for the WDIPterm control than are listed here. This is normal. You may ignore properties you see listed in your development environment that are not listed here. ServerOn
Valid values: Function:
True, False Set to True to enable the server. Set to false to turn the server off. You should leave this off unless your program is actually running. Setting it to True at design-time can cause problems.
Quiet
Valid values: Function:
True, False If Quiet is set to True then any status and error message generated by WDIPterm will be suppressed.
LogFile
Valid values: Function:
blank or a valid file name If the file does not exist it will be created. If it exists, it will be appended to. If LogFile is blank, no log file is maintained.
ClientList
Valid Values: Function:
Read Only. Returns a formatted string listing all attached client BaseNames and associated IP numbers. Format is "basename CR/LF ip address CR/LF basename…".
Methods Methods are commands that you issue to the WDIPterm control. All of the "Inputxxx" commands cause the terminal to wait for operator input. Note that your development environment may show more available methods for the WDIPterm control than are listed here. This is normal. You may ignore methods you see that are not listed here. InputAny
Parameters: Function:
basename, channel, terminal, line, position, prompt, shifted, timestamped This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for data to be entered from either terminal keypad or 6-24
Page 89
scanner. If shifted is set to "true", the terminal will start in shifted mode. Timestamped appends a (hhmmss) prefix to the returned data. InputKeyBd
Parameters: Function:
basename, channel, terminal, line, position, prompt, shifted, timestamped This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for data to be entered from the terminal keypad only. If shifted is set to "true", the terminal will start in shifted mode. Timestamped appends a (hhmmss) prefix to the returned data..
InputScanner
Parameters: Function:
basename, channel, terminal, line, position, prompt, allowbreakout, timestamped This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for data to be entered from the terminal scanner only. Setting allowbreakout to true allow user to "breakout" of scanner only mode by pressing the end key on the terminal. A termID+CR will be sent to the host.
InputYesNo
Parameters: Function:
basename, channel, terminal, line, position, prompt This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for a Yes (Enter key or C key) or a No (0 key or B key) from the terminal keypad. Note: C and B keys are used to facilitate keypad entry while scanning with the integrated laser.
InputPassword
Parameters: Function:
basename, channel, terminal, line, position, prompt, shifted This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for data to be entered from the terminal keypad only. The entered data is not displayed on the terminal.
InputSerial
Parameters: Function:
basename, channel, terminal, line, position, prompt This instructs the terminal attached to client basename on channel to display the prompt at line and position and wait for data to be received through the terminal serial port. Waiting for serial input can be bypassed by pressing the enter key on the terminal which will send an empty data string to the host (fires the OnTermData event handler). 6-25
Page 90
OutputSerial
Parameters: Function:
basename, channel, terminal, data This instructs the terminal attached to client basename on channel to send data to the terminal’s serial port. Data must be less than 248 characters in length for each call to OutputSerial. If you are sending data to a printer attached to the terminal, make sure to set the Protocol parameter in the RF Terminal to XON/XOFF. See the RF Terminal Manual for details.
SendDisplay
Parameters: Function:
basename, channel, terminal, line, position, prompt This instructs the terminal attached to client basename on channel to display the prompt at line and position. Must be followed by an "Input" method call to take effect.
ClearScreen
Parameters: Function:
basename, channel, terminal This instructs the terminal attached to client basename on channel to clear its display. Must be followed by an "Input" method call to take effect.
ClearLine
Parameters: Function:
basename, channel, terminal, line This instructs the terminal attached to client basename on channel to clear the specified line on its display. Must be followed by an "Input" method call to take effect.
SendDate
Parameters: Function:
basename, channel, terminal, line This instructs the terminal attached to client basename on channel to display date and time on the specified line number. Must be followed by an "Input" method call to take effect.
Beep
Parameters: Function:
basename, channel, terminal, count This instructs the terminal attached to client basename on channel to beep count times. Count may be a value from 1 to 9. Must be followed by an "Input" method call to take effect.
PlayVoice
Parameters: Function:
basename, channel, terminal, msgnum This instructs the terminal attached to client basename on channel to play voice message number msgnum. Msgnum may be a value from 1 to 99. Must be followed by an "Input" method call to take effect.
6-26