The text of a manual · part 31 of 36
Trakker Antares Application Development Tools System Manual: Part II - Trakker Antares Application Simulator User’s Manual, pages 287 to 296
Pages 287 to 296 of 340, from Trakker Antares Application Development Tools System Manual
The original document is the PDF (1.6 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.
Filed in the catalog under the Intermec 2420, Intermec 2425, Intermec 2435 and Intermec 2481
Page 287
Chapter 2, Working With the Application Simulator
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
Simulator TSR: This illustration shows how the Simulator TSR simulates incoming data.
❴
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 runs 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.
Trakker Antares Application Simulator User's Manual
9
Page 288
Chapter 2, Working With the Application Simulator
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. This section describes: • 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
10
Trakker Antares Application Simulator User's Manual
Page 289
Chapter 2, Working With the Application Simulator lines and columns based on the display size you specified by calling the im_set_display_mode function. Some display characteristics are represented on the PC in color, as shown in the next table. Text Display Characteristics Display Characteristics Normal
Background Color Black
Foreground Color Light gray
Reverse video
Light gray
Black
Underline
Black
Magenta
Blinking
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
Note: 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. Function Left and Function Right Keys To Simulate This Key
Press These Keys
) (Function Left) ( (Function Right)
Alt
Trakker Antares Application Simulator User's Manual
Alt Shift
11
Page 290
Chapter 2, Working With the Application Simulator
For example, to use viewport page down on a terminal, you press ) 3. 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.
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 set of steps, “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.
12
Trakker Antares Application Simulator User's Manual
Page 291
Chapter 2, Working With the Application Simulator
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.
Trakker Antares Application Simulator User's Manual
13
Page 292
Chapter 2, Working With the Application Simulator
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.
14
Trakker Antares Application Simulator User's Manual
Page 293
Chapter 2, Working With the Application Simulator
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.
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 the following features. Features That Are Not Simulated Feature Contrast level
Description 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 run 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 ) V keys. During a simulation, you simply press the comma key on the PC keyboard or you can press the Alt V keys sequentially. 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
The Simulator does not simulate double-byte symbologies nor does it simulate double-byte characters.
Trakker Antares Application Simulator User's Manual
15
Page 294
Chapter 2, Working With the Application Simulator
How PSK Functions Are Simulated Most PSK functions are automatically simulated by the Simulator. However, the Simulator can simulate some PSK functions only with the preset values in the INI file. The next table lists the functions that require the INI file configuration. Functions That Require the INI File Configuration PSK Function
INI File Parameter im_get_label_symbology label_symbology im_receive_buffer network_read_file portn_read_file serial_receive_mode im_receive_field keypad_type label_postamble label_postamble_string label_preamble label_preamble_string label_time_stamp network_read_file portn_read_file im_receive_file receive_file_return im_receive_input keypad_type label_postamble label_postamble_string label_preamble label_preamble_string label_symbology label_time_stamp network_read_file portn_read_file im_transmit_buffer network_write_file portn_write_file im_transmit_file transmit_file_return
For a complete list of PSK functions, see Part I, Trakker Antares PSK Reference Manual.
16
Trakker Antares Application Simulator User's Manual
Page 295
3
INI File Parameter Descriptions
This chapter explains why you should customize your INI file, describes the parameters in the INI file, and explains which PSK library functions will receive the INI parameters as return values and out parameters. This chapter covers these topics: • Why and how you customize INI files • Parameter descriptions
Trakker Antares Application Simulator User's Manual
17
Page 296
Chapter 3, INI File Parameter Descriptions
Why and How You Customize INI Files The INI parameters control how the Application Simulator simulates a Trakker Antares® terminal executing an application. You can customize the parameters so the Simulator mimics the conditions against which you want to test your Trakker Antares applications. Note: Customizing the INI file is optional. You do not have to customize the INI file if you are satisfied with the default values in IMT24SIM.INI. You can customize INI parameters using the Simulator Editor or any ASCII text editor: • The Editor provides a graphic environment for changing your INI files. Instead of typing the settings, you select them from menus, and dialog boxes. For help using the Editor, see Chapter 4, “Customizing INI Files With the Editor.” • If you create and edit INI files with an ASCII text editor, use a copy of the default INI file to make sure you conform to the formatting conventions.
Parameter Descriptions This section contains descriptions of the parameters in the INI file, in alphabetical order. The first description, “Sample,” illustrates the type of information presented for each parameter and is not a valid parameter. Note: Before setting a parameter that refers to the communications ports COM1, COM2, or NET, check your terminal user’s manual to make sure those ports are available on your terminal.
Sample Purpose
The purpose of the parameter.
Default
The default value for the parameter.
Values
The values you can set for the parameter.
Function The PSK library function that receives the parameter as a return value or out parameter. An out parameter specifies a value that is returned by the function. Some parameters do not have a PSK function associated with them. Notes
18
Optional information about the parameter.
Trakker Antares Application Simulator User's Manual