The text of a manual · part 3 of 8
Trakker Antares Application Simulator User's Manual, pages 21 to 30
Pages 21 to 30 of 80
The original document is the PDF (353 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Intermec 2420, Intermec 2425 and Intermec 2481
Page 21
2 Working With the Application Simulator
Page 22
Trakker Antares Application Simulator User’s Manual
Page 23
Working With the Application Simulator
2
This chapter describes how the Simulator works and how it simulates various terminal features and PSK functions.
How the Simulator Works The Application Simulator consists of three parts: Simulator The Simulator terminate and stay resident (TSR) program runs in the background on your PC. The Simulator captures terminal-specific system interrupts and makes your PC mimic a Trakker Antares terminal. INI file The initialization (INI) file specifies how the Simulator simulates terminal features such as communications. IMT24SIM.INI is the default INI file. To learn about the parameters in the INI file, see Chapter 3. Simulator Editor The Simulator Editor is a Windows-based tool that you use to set the parameters that are stored in the IMT24SIM.INI file. For help using the Editor, see Chapter 4. The Simulator uses the parameters in the INI file to simulate some terminal features and PSK functions, as described in “Simulated Features and Functions“ later in this chapter. For example, you can use INI parameters to test how the Trakker Antares application handles incoming serial communications.
Example: How to Simulate Incoming Serial Communications 1. In the INI file, set the serial_port_emulation parameter to 1 to indicate that you are simulating serial communications through an ASCII file. 2. In the INI file, set the port_read_file parameter to ORDERS.RCV to identify the ASCII file that contains the data to be input as if received on the terminal’s COM1 port. 3. Create the ORDERS.RCV file and fill it with data. The data will be input to the application as if received on the terminal’s COM1. For help formatting the data, see Step 1 in the “To simulate data input to the application through NET” procedure in “Communications Input and Output” later in this chapter. 4. Start the Simulator and run your Trakker Antares application. When the application issues the im_receive_buffer PSK function, the Simulator reads from ORDERS.RCV to simulate incoming serial communications. 5. Test how the application responds to the incoming communication.
2-3
Page 24
Trakker Antares Application Simulator User’s Manual
This illustration shows how the Simulator TSR simulates incoming data:
Simulator TSR
Parameter serial_port_emulation port_read_file
1
Value 1 ORDERS. RCV
3
2
ORDERS .RCV File
INI File 4
Trakker Antares Application
//Read DATA from COM1 file. status = im_receive_buffer (IM_COM1, 1024, Buffer, BufferLength); printf ("DATA=%s",Buffer);
TASS003.eps
➊ When you start the Simulator, it reads the parameters from the INI file, parses the parameter names, and saves the values into variables in memory. ➋ The Trakker Antares application executes on the PC. To read incoming data, the application executes the im_receive_buffer function, which issues a terminal-specific interrupt. ➌ The Simulator TSR captures the interrupt. Because serial_port_emulation is enabled, the Simulator TSR reads data from the port_read_file until it reaches a CR/LF. The Simulator TSR uses this data to assemble the response to the im_receive_buffer function. ➍ The Simulator passes the response to the application, which accepts the information as the status and return values of the im_receive_buffer function. The application continues executing.
2-4
Page 25
Working With the Application Simulator
2
Understanding the Limitations of the Simulator Read these notes to understand the limitations of the Application Simulator: •
Start the Simulator before you run any Trakker Antares applications on your PC. Otherwise, you receive an error message and the application does not run.
•
The Simulator does not help you test the application’s user interface or performance. You can test those characteristics far better with a Trakker Antares terminal. Always test your application by running it on a terminal after you have finished debugging the logic.
•
Intermec provides you with the LLIBCA.LIB library to link to when you are creating applications for terminals that are not running in DOS mode. If you link to the Microsoft LLIBCA.LIB library instead, you may find that an application containing an erroneous input combination will fail on the Trakker Antares terminal, but will not be detected by the Simulator.
Simulated Features and Functions The Simulator automatically simulates many features of the Trakker Antares terminal’s performance as well as many PSK functions. Other features and functions are simulated according to values you set for parameters in an initialization (INI) file. To learn how each feature and function is simulated, read these sections: •
Features That Are Automatically Simulated
•
Features That Are Configured With an INI File
•
Features That Are Not Simulated
•
How PSK Functions Are Simulated
Features That Are Automatically Simulated The Simulator can reproduce these terminal features: •
Text Display
•
Function Left and Function Right Keys
•
Viewport
Text Display If the application calls the im_set_input_mode function to select the programmer input mode, the Simulator limits character echoing to the lines and columns based on the display size you specified by calling the im_set_display_mode function.
2-5
Page 26
Trakker Antares Application Simulator User’s Manual
Some display characteristics are represented on the PC in color, as shown in the next table. Display Characteristics
Background Color
Foreground Color
Blinking*
Normal
Black
Light gray
Reverse video
Light gray
Black
Underline
Black
Magenta
Underline and reverse video
Magenta
Black
Normal and blinking
Black
Light gray
Yes
Reverse video and blinking
Light gray
Black
Yes
Underline and blinking
Black
Magenta
Yes
Underline, reverse video, and blinking
Magenta
Black
Yes
Bold
Black
White
Bold and reverse video
Light gray
Dark gray
Bold and underline
Black
Magenta
Bold, underline, and reverse video
Magenta
White
Bold and blinking
Black
White
Yes
Bold, reverse video, and blinking
Light gray
Dark gray
Yes
Bold, underline, and blinking
Black
Magenta
Yes
Bold, underline, reverse video, and blinking
Magenta
White
Yes
* Text will blink only in the DOS environment.
Function Left and Function Right Keys The Simulator simulates the terminal’s Function Left ( ) and Function Right ( ) keys as follows: To Simulate This Key
Press These Keys
(Function Left)
Alt
(Function Right)
Alt Shift
For example, to use viewport page down on a terminal, you press . To use viewport page down on a PC using the Simulator, you sequentially press Alt 3 (you must press the 3 on the number pad).
Viewport The Simulator simulates the viewport for the terminal.
2-6
Page 27
Working With the Application Simulator
2
Features That Are Configured With an INI File If you set the corresponding parameters in the INI file, the Simulator can reproduce these features: •
Bar Code Input
•
Communications Input and Output
•
File Transfer
•
International Characters
•
Terminal Emulation Keypad or Programmable Keypad
Bar Code Input You can simulate bar code input using either of these two methods: •
By pressing a special key sequence and typing “bar code” data.
•
By configuring an Intermec wedge and scanning actual bar code labels.
To simulate bar code input with a keyboard 1. Press the key sequence specified by the sim_wand_key in the INI file. (The default key sequence is Ctrl–G.) Note: You specify the symbology of the simulated bar code label with the label_symbology parameter in the INI file. 2. Type the data you want entered into the application as if it were bar code input from a scanner or wand. 3. Press Enter to terminate the simulated bar code input. To simulate bar code input with an Intermec wedge 1. Attach an Intermec wedge to your PC. 2. Set the first preamble characters to match the sim_wand_key value. For help, see the next procedure, “To determine how to set the preamble for the Intermec wedge.” 3. Use the wedge to scan bar code labels. The bar code data is entered into the Trakker Antares application. 4. Scan Enter or have a Return in the postamble to terminate the bar code input.
2-7
Page 28
Trakker Antares Application Simulator User’s Manual
To determine how to set the preamble for the Intermec wedge •
See your wedge or scanner documentation for help setting the preamble. Also, consider this example: Your sim_wand_key is Ctrl–G, so you must set the preamble to Ctrl–G. Because the wedge is in Set Preamble mode, you cannot scan the BEL character, even though it represents Ctrl–G in the full ASCII chart. Instead, you must consult the PC/Workstation Keyboard Mapping table (in your wedge or scanner documentation) to learn which characters to scan for Ctrl and G. According to the table, you must scan the SO character for Ctrl and the lowercase g character for G. (If you were to scan SO and uppercase G, the preamble would be set to Ctrl–Shift–G.)
Communications Input and Output The Simulator can simulate input and output data through the terminal’s COM1, COM2, and network port (NET). The next two procedures illustrate how to simulate I/O through NET. To simulate data input to the application through NET 1. Type sample data in an ASCII file. You need to know which PSK function you will use in the Trakker Antares application to read data from the file. For example, both im_receive_buffer and im_receive_input read a line of data from the file each time they are called. A line of data is either: •
A data string that ends in a <CR><LF>
•
A data string that is 1024 bytes long (without a <CR><LF>)
With each subsequent call, both functions continue reading data where they left off in the file until they reach an EOF. If the functions are called again after reaching the EOF, they respond differently: im_receive_buffer
This function starts reading data at the top of the file.
im_receive_input This function does not start reading data at the beginning of the file. This practice allows keyboard, scanner, or wand input. 2. Specify the path and filename of the ASCII file in the network_read_file INI parameter. 3. Set the network_emulation INI parameter to 1 to enable the Simulator to conduct its network communications through ASCII data files. 4. Load the Simulator and run the application. 5. Verify that the application read the data correctly from the ASCII file.
2-8
Page 29
Working With the Application Simulator
2
To simulate data output from the application through NET 1. Specify the path and filename of the output file in the network_write_file INI parameter. 2. Set the network_emulation INI parameter to 1 to enable the Simulator to conduct its network communications through ASCII data files. 3. Load the Simulator and run the application. 4. The application creates the ASCII file and writes data to it when the im_transmit_buffer or im_transmit_file functions execute. 5. Verify that the application wrote the data correctly to the ASCII file. 6. Test the application on a Trakker Antares terminal to make sure that the application is handling the input and output communications protocols correctly.
File Transfer The Simulator can simulate the return values for im_receive_file and im_transmit_file functions, which let you transfer files between the terminal and a DCS 300. However, the Simulator does not transfer or simulate transferring the file specified in the im_receive_file and im_transmit_file functions.
International Characters You can configure the Simulator to support Western European characters (such as é, ü, and õ). To configure the Simulator to support international characters 1. Set the keypad_type INI parameter to 1 for the programmable keypad. 2. Set your PC’s display to Code Page 850 by adding these commands to your AUTOEXEC.BAT and CONFIG.SYS files: •
AUTOEXEC.BAT nlsfunc mode con cp prep=((850)c:\windows\command\ega.cpi) chcp 850
•
CONFIG.SYS country=001, ,c:\windows\command\country.sys device=c:\windows\command\display.sys con=(ega,850,1)
3. Make sure you run the Simulator in a true DOS window, not a DOS screen. The international characters will not be displayed in a DOS screen. If you start the Simulator by selecting Simulator for Trakker from the Tools menu of Microsoft Visual C/C++, you are running the Simulator in a DOS screen and international characters will not be displayed. Windows 95 users can press Alt– Enter to change the DOS screen to a true DOS window.
2-9
Page 30
Trakker Antares Application Simulator User’s Manual
Terminal Emulation Keypad or Programmable Keypad You can simulate either the terminal emulation keypad or the programmable keypad by setting the keypad_type parameter in the INI file. You should choose the keypad that will be used on the terminals that will run the application being tested with the Simulator. Setting the keypad_type parameter is equivalent to selecting Configuration Menu, Terminal Menu, and Keypad from the TRAKKER Antares 2400 Menu System and then setting the keypad type for the terminal.
Features That Are Not Simulated The Simulator cannot reproduce these features: Feature
Description
Contrast level
The Simulator does not simulate the contrast set for the terminal.
Speed and performance
The Simulator does not simulate the speed or performance of a Trakker Antares terminal. Your Trakker Antares applications run as fast as your PC can execute them.
Special key sequences
The terminal’s keypad contains fewer keys than a standard PC-AT keyboard, but you can produce all 102 PC-AT keys with the terminal by pressing a variety of key combinations. The special key sequences are listed in your Trakker Antares terminal user’s manual. When using the Simulator to run Trakker Antares applications on a PC, you do not use special key sequences because your PC keyboard contains all 102 PC-AT keys. For example, to type a comma (,) on a terminal, you press the keys. During a simulation, you simply press the comma key on the PC keyboard or you can press the Alt V keys sequentially.
5
Note: As described in “Function Left and Function Right Keys” earlier in this chapter, you can press Alt on your PC keyboard to simulate the key. Double-byte functions
2-10
The Simulator does not simulate double-byte symbologies nor does it simulate double-byte characters.