Intermec Janus 2010, Janus 2020, Janus Application Simulator User Manual

User's Manual
P/N 062778-001
®
JANUS
Application Simulator
Intermec Corporation 6001 36th Avenue West P.O. Box 4280 Everett, WA 98203-9280
U.S. technical and service support: 1-800-755-5505 U.S. media supplies ordering information: 1-800-227-9947
Canadian technical and service support: 1-800-688-7043 Canadian media supplies ordering information: 1-800-268-6936
Outside U.S. and Canada: Contact your local Intermec service supplier.
The information contained herein is proprietary and is provided solely for the purpose of allowing customers to operate and/or service Intermec manufactured equipment and is not to be released, reproduced, or used for any other purpose without written permission of Intermec.
Information and specifications in this manual are subject to change without notice. 1995 by Intermec Corporation
All Rights Reserved
The word Intermec, the Intermec logo, JANUS, IRL, Duratherm, Virtual Wedge, and CrossBar are trademarks of Intermec Corporation.
Throughout this manual, trademarked names may be used. Rather than put a trademark () symbol in every occurrence of a trademarked name, we state that we are using the names only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringement.
Contributors
Author Karen Granger Ross
Editor Craig Thompson
Technical Illustrator George Wilson
Technical Reviewers Roy Chrisop
Roy Law Yong-Qin Lu
Contents
Contents
Before You Begin xi
Warranty Information xi Cautions xi About This Manual xii Other Intermec Manuals xiv
Getting Started
1
Introduction to the JANUS Application Simulator 1-3
Hardware and Software Requirements 1-4
Installing the JANUS Application Simulator 1-5
Learning About the JANUS Application Simulator 1-6
How the JANUS Application Simulator Works 1-6 If You Are Not Using JANUS PSK Library Functions 1-8 Integrating the Simulator Into Your Development Process 1-9 Using the Simulator With Other Products 1-9 JANUS Features That Are Simulated 1-10
Text Display 1-10 Bar Code Input 1-10 Power Management 1-12 Communications Input and Output 1-12
JANUS Features That Are Not Simulated 1-13
Character Height 1-13 Viewport 1-14 Contrast Level 1-14 Special JANUS Key Sequences 1-14 Speed and Performance 1-14
v
Running and Debugging an Application
2
3
Deciding Where to Start the Simulator TSR 2-3
Starting the Simulator TSR 2-3
Running and Debugging a JANUS Application 2-4
Understanding the Limitations of the Simulator TSR 2-5
Exiting the Simulator TSR 2-6
Learning About the INI File
How to Customize the Parameters 3-3
How the Parameters Are Organized in This Chapter 3-3
Overview of Parameters 3-5
portn_read_file 3-6 portn_write_file 3-8 rx_check_status_return 3-9 protocol_ext_status_return 3-9 cancel_rx_buff_return 3-10 cancel_tx_buff_return 3-10 UART_status 3-11 expanded_keyboard_status 3-12 kb_insert_string_status 3-13 kb_insert_string_capacity 3-14 flush_exp_keyboard_status 3-15 warmboot_status 3-16 power_status_line 3-17 power_status_battery 3-18 power_status_backup 3-18 power_status_batt_life 3-19 power_status_return 3-19 display_contrast_level 3-20
vi
display_size_mode 3-21 display_video_mode 3-22 display_scroll_mode 3-23 display_viewport_lock 3-24 display_x_pos 3-25 display_y_pos 3-26 display_backlight 3-27 display_char_height 3-28 appl_break_status 3-29 follow_cursor 3-29 control_key 3-30 keyclick 3-31 numeric_keypad_switching 3-32 numeric_keypad_status 3-33 label_symbology 3-34 sim_wand_key 3-35 clear_abort_callback_return 3-36 command_return 3-36 link_comm_return 3-37 serial_protocol_control_return 3-37 standby_wait_return 3-38 unlink_comm_return 3-38
Contents
Communications Standard Return Values 3-39
Reader Wedge Standard Return Values 3-40
vii
Customizing INI Files With the Editor
4
Why Customize INI Files? 4-3
Starting the Editor 4-5
Using Online Help 4-6
Creating a New INI File 4-7
Opening an Existing INI File 4-8
Setting Parameters 4-9
Setting Communications Parameters 4-10
Naming portn_read_file and portn_write_file 4-11
Specifying a Path for portn_read_file and portn_write_file 4-11 Setting Keyboard Parameters 4-12 Setting Power Management Parameters 4-13 Setting Display Parameters 4-14 Setting Keypad Parameters 4-15 Setting Reader Wedge Parameters 4-16
Saving Changes 4-17
Discarding Changes 4-20
Restoring the Default Values 4-20
Updating the Simulator TSR With the Current INI File 4-21
Setting Up the Printer 4-22
Printing INI Files 4-22
Exiting the Editor 4-23
viii
Troubleshooting
Contents
5
I
Running an Application Without the Simulator TSR 5-3
Simulating Bar Code Input With an Intermec Wedge 5-3
Error and Status Messages for the Simulator TSR 5-3
Error and Status Messages for the Editor 5-4
Index
ix
Before You Begin
This section introduces you to standard warranty provisions, cautions, document formatting conventions, and sources of additional product information.
Warranty Information
To receive a copy of the standard warranty provision for this product, contact your local Intermec sales organization. In the U.S. call (800) 755­5505, and in Canada call (800) 688-7043. Otherwise, refer to the Worldwide Sales & Service list shipped with this manual for the address and telephone number of your Intermec sales organization.
Cautions
The cautions in this manual use the following format.
Before You Begin
CAUTION
Caution
A caution alerts you to an operating procedure, practice, condition, or statement that must be strictly observed to prevent equipment damage or destruction, or corruption or loss of data.
Conseil
Une précaution vous avertit d’une procédure de fonctionnement, d’une méthode, d’un état ou d’un rapport qui doit être strictement respecté pour empêcher l’endommagement ou la destruction de l’équipement, ou l’altération ou la perte de données.
xi
JANUS Application Simulator User’s Manual
g
g
g
g
g
About This Manual
This manual describes how to install, customize, and use the JANUS Application Simulator. You should see the online README file for important information that was not available when this manual was printed.
Use this manual in conjunction with the JANUS PSK Reference Manual, which describes the PSK library functions and JANUS-specific system interrupts that the JANUS Application Simulator captures and simulates.
Intended Audience
This manual is intended for experienced PC programmers who already understand return values, know how to program in their chosen language, and know how to use their application development and debugging software. They have already read the JANUS PSK Reference Manual so they understand how to create programs for the JANUS.
How This Manual Is Organized
The JANUS Application Simulator User's Manual is divided into five chapters:
xii
Chapter What you'll find
1
2
3
4
5
Gettin
Started
Introduces the JANUS Application Simulator and explains how to install the software. Also describes which JANUS features the Simulator can make your development PC mimic.
Runnin
Explains how to start and exit the Simulator TSR, and gives hints for debugging a JANUS application.
Learnin
Lists the parameters in the initialization file.
Customizin
Describes how to use the Editor to customize the parameters in the initialization file.
Troubleshootin
Describes how to recover if you run a JANUS application on your PC without first starting the Simulator TSR. Also lists and describes the status and error messages you may see.
and Debugging an Application
About the INI File
INI Files With the Editor
Before You Begin
Terms and Conventions
In this manual, the JANUS 2010 and JANUS 2020 are referred to as “the JANUS” or “the reader.” Also, the Intermec-specific library functions described in the JANUS PSK Reference Manual are referred to as “PSK functions.”
This manual uses the following conventions to emphasize keyboard input, screen messages, and command syntax.
Keyboard Input
Keystrokes are emphasized in bold. For example, “press Enter” means you press the key labeled “Enter” on your keyboard.
If you must press more than one key at the same time, the keys are connected by a dash in the text. For example, press Ctrl-Alt-Del to perform a warm boot on a PC. When the keys are connected by a dash, it is important that you press and hold the keys in the order they are listed in the text.
Commands
Command syntax is shown in the text as you should type it. For example, to see a listing of directories on the PC, type this command and press Enter:
dir
If a command line includes keywords in italics, the italics indicates that you must enter a real value in place of the keyword. For example, this command directs you to type the janussim command, specify the name of the INI file, and press the Enter key:
janussim
filename
.ini Enter
xiii
JANUS Application Simulator User’s Manual
Other Intermec Manuals
You may need to refer to the JANUS manuals listed below while using the JANUS Application Simulator. To order manuals, contact your local Intermec representative or distributor.
Manual
JANUS Programmer's Software Kit Reference Manual JANUS 2010 Hand-Held Data Collection Computer User's Manual JANUS 2020 Hand-Held Data Collection Computer User's Manual
Also, you should see the online README file provided with the software. This README file contains important information that was not available when this manual was printed, such as operating guidelines or software development packages that are compatible with the JANUS Application Simulator.
Intermec Part No.
062133 058426 059951
xiv
1
Getting Started
Getting Started
This chapter introduces the JANUS Application Simulator, explains how to install the software, and describes how to make your PC mimic a JANUS reader.
Introduction to the JANUS Application Simulator
Applications created for JANUS readers may contain JANUS PSK library functions and JANUS-specific system interrupts that—when run on a PC instead of a reader—cause a PC to lock up.
With the JANUS Application Simulator, however, you can run JANUS applications on a PC. The Simulator captures those functions and interrupts before they can disrupt the PC. The Simulator then uses those functions and interrupts to make the PC mimic a JANUS reader, allowing you to run and debug any JANUS application on your PC.
The JANUS Application Simulator operates as shown in this illustration. Briefly, while a JANUS
application is processing on a PC, it may issue a JANUS­specific system interrupt.
INI FILE
1
The Simulator TSR captures the interrupt, uses values from the INI file to assemble a response, and then sends the response to the JANUS application.
The JANUS application acccepts the response and continues processing.
For a detailed technical description, see “How the JANUS Application Simulator Works” later in this chapter.
Janus Application Processing
S
i
m
u
l
a
t
R
S
T
r
o
5700U-002
1-3
JANUS Application Simulator User’s Manual
With the JANUS Application Simulator, you can debug the logic and syntax of a JANUS application, but not the user interface or performance:
The Simulator helps you debug logic and coding errors by allowing you
to use development tools and debuggers common in the software industry. For example, if you are using Microsoft Visual C++ to create JANUS applications, you can use Microsoft Codeview for DOS to test the applications. The Simulator runs in the background, transparent to your development software.
The Simulator does not help you test the user interface or performance of
the application. You can test those characteristics of the application far better on a JANUS reader than on any simulation program. You should always test your application by running it on a JANUS reader after you have finished debugging the logic.
Because JANUS applications are DOS applications, you must use a DOS­application debugger, not a Windows-application debugger. For example, you can use Codeview for DOS, but not Codeview for Windows.
Use the JANUS Application Simulator and this manual in conjunction with the programming software and documentation provided with your reader.
Hardware and Software Requirements
To run the JANUS Application Simulator, you need a PC with this hardware:
Intel 386 or 486 CPU
3.5 inch floppy disk drive
1.2 MB available on the hard drive
VGA monitor
Mouse or other pointing device
You must have already installed this software on your PC:
MS-DOS 5.0 or higher
MS-Windows 3.0 or higher
Application development software, such as Microsoft Visual C++ 1.5
Professional Edition
1-4
Getting Started
Note: Because JANUS applications are DOS applications, you must use DOS­application debugging software, such as Codeview for DOS. You cannot use Windows-application debugging software, such as Codeview for Windows.
Installing the JANUS Application Simulator
The Simulator includes a Windows-based installation program to help you install the software. During the installation, you choose the directory in which to install the software.
To start the installation
1. Insert the JANUS Application Simulator disk into your floppy drive.
2. Start Windows.
3. From the Program Manager File menu, choose Run.
4. Start the installation with either of these commands:
If the disk is in Drive A, type this command: a:setup
1
If the disk is in Drive B, type this command: b:setup
5. Choose the OK button.
6. Follow the instructions displayed by the installation program.
The installation program creates an Intermec group on your Windows desktop.
The group contains the icon for the Editor, the Editor's help files, and the README file.
Read the README file before you use the Simulator. The README file may contain important information that was not available when this manual was printed, such as operating guidelines or the names of software development packages that are compatible with the Simulator.
For help using the Editor and its online help, see Chapter 4, “Customizing INI Files With the Editor.”
1-5
JANUS Application Simulator User’s Manual
Learning About the JANUS Application Simulator
To learn more about the JANUS Application Simulator, read these sections:
• How the JANUS Application Simulator Works
• If You Are Not Using the JANUS PSK
• Using the Simulator During Development
• Using the Simulator With Other Products
• JANUS Features That Are Simulated
• JANUS Features That Are Not Simulated
How the JANUS Application Simulator Works
The JANUS Application Simulator consists of three parts: Simulator TSR The Simulator terminate and stay resident (TSR) program
runs in the background on your PC. The Simulator TSR captures JANUS­specific system interrupts and makes your PC mimic a JANUS reader. For instructions, see Chapter 2.
1-6
INI File The initialization (INI) file specifies how the Simulator TSR
simulates JANUS features such as bar code input and battery status. JANUSSIM.INI is the default INI file. For a description of the parameters in the file, see Chapter 3.
Editor The Editor is a Windows-based tool for setting the parameters stored in the JANUSSIM.INI file. For instructions, see Chapter 4.
The Simulator TSR uses the parameters in the INI file as out parameters and return values for any JANUS PSK library functions and JANUS-specific system interrupts that a JANUS application contains.
For example, consider the JANUS battery. The status of the battery is very important because it may be the reader’s only power source. JANUS applications may check the battery’s status to make sure that sufficient power is available for the application. There is no battery to check on the PC. Therefore, the Simulator TSR must simulate the JANUS battery.
The following illustration shows how the Simulator TSR simulates a JANUS battery when a JANUS application issues the im_power_status function.
Getting Started
1
INI File
1
JANUS Application
/*Check the status of /* the power supply. status = im_power_status (&ac_line, &battery, &backup, &fuel); printf ("Status: %4X\n", status);
4
2
Simulator TSR
Parameter Value
power_status_line 0 power_staus_battery 0 power_status_backup 0 power_status_batt_life 100 power_status_return 0800H
3
5700U-001
When you start the Simulator TSR, it reads the parameters from the INI
file, parses the parameter names, and saves the values into variables in memory.
The JANUS application executes on the PC. To check the status of the
power supply, the JANUS application issues the im_power_status function, which causes the INT 5EH interrupt to be sent to the Simulator TSR.
The Simulator TSR uses the variables related to the interrupt and returns
their values in the appropriate parameters.
The Simulator TSR passes the values to the application. The application
accepts the information as the status and return values of the im_power_status function call. The application continues executing.
1-7
JANUS Application Simulator User’s Manual
If You Are Not Using JANUS PSK Library Functions
If you are programming with JANUS-specific system interrupts instead of JANUS PSK library functions, you can use the JANUS Application Simulator and this manual. Simply ignore all mention of the PSK functions.
The Simulator TSR services all the JANUS-specific system interrupts listed in the PSK reference manual. Some interrupts, such as INT 7CH, do not use the values stored in the INI parameters. This table lists the interrupts that do use the values stored in INI parameters:
Interrupt Related INI Parameters
INT 14H portn_read_file
portn_write_file rx_check_status_return protocol_ext_status_return
INT 16H expanded_keyboard_status
kb_insert_string_status kb_insert_string_capacity
INT 5EH power_status_line
power_status_battery power_status_backup
INT 79H display_contrast_level
display_size_mode display_video_mode display_scroll_mode display_viewport_lock
INT 7EH appl_break_status
follow_cursor control_key
INT 7DH label_symbology
clear_abort_callback_return command_return link_comm_return serial_protocol_control_return
cancel_rx_buff_return cancel_tx_buff_return UART_status
flush_exp_keyboard_status warmboot_status
power_status_batt_life power_status_return
display_x_pos display_y_pos display_backlight display_char_height
keyclick numberpad_switching numberpad_status
standby_wait_return unlink_comm_return portn_read_file portn_write_file
See Chapter 3 to learn more about INI parameters.
1-8
Getting Started
1
Integrating the Simulator Into Your Development Process
The JANUS Application Simulator can be an integral part of your development process. For example, if you use Visual C++ to develop applications, you can follow these steps:
1. From MS-DOS, start the Simulator TSR with this command:
janussim
2. Start Windows.
3. Run the Visual C++ compiler. Create or edit a JANUS application.
4. Run and debug the JANUS application.
5. Repeat Steps 3 and 4 as necessary.
6. Shut down Windows and return to MS-DOS.
7. Stop the Simulator TSR with this command:
janussim -d
Using the Simulator With Other Products
You can use the JANUS Application Simulator with other products, including application development software such as Microsoft Visual C++
1.5 Professional Edition. You can install an Intermec Wedge on your PC to simulate bar code input.
For help configuring a wedge, see “Bar Code Input” later in this chapter. The Simulator TSR should not interfere with the normal operation of other
software on your PC. Therefore, you can start the Simulator TSR in your AUTOEXEC.BAT file and leave it running if you have sufficient RAM available.
You can use the JANUS Application Simulator to run JANUS applications that use the JANUS PSK library functions and JANUS-specific system interrupts, as described in Chapter 3.
You cannot use the JANUS Application Simulator to run JANUS programs such as the configuration application (IC.EXE) and the IRL Desktop (IRLDESK.EXE) on your PC. Those programs use low-level interrupts that the JANUS Application Simulator does not support.
1-9
JANUS Application Simulator User’s Manual
JANUS Features That Are Simulated
The Simulator TSR can reproduce these JANUS features:
• Text display
• Bar code input
• Power management
• Communications input and output For more information, read the following sections.
Text Display
If the application calls the im_set_input_mode function to select the programmer input mode, the Simulator TSR limits character echoing to the lines and columns based on the display size you specified by calling the im_set_display_mode function or by setting the display_size_mode parameter in the INI file.
The Simulator TSR has no control of the application’s output; however, the JANUS reader wraps output in some display modes. See your JANUS documentation for details.
1-10
Note: All human factors and usability analysis of your JANUS applications should be performed on a JANUS reader, not with the Simulator TSR.
Bar Code Input
You can simulate bar code input using either of these two methods:
• By pressing a special key sequence that lets you type “bar code” data.
• By configuring an Intermec Wedge and wanding actual bar code labels. These methods are described in the following paragraphs.
To simulate bar code input with a keyboard
You can simulate bar code input by pressing the key sequence specified by the sim_wand_key in the INI file. After you press the key sequence, the Simulator TSR captures all keyboard input and presents it to the JANUS application as if it were bar code input from a wand. The simulated bar code input is terminated when you press Enter.
Getting Started
Note: You specify the symbology of the simulated bar code label with the label_symbology parameter in the INI file.
By default, the key sequence is Ctrl–G. You can change the key sequence by editing the sim_wand_key parameter. The key sequence consists of one or more control keys (Ctrl, Alt, Shift) and a character key (A to Z). Here are sample key sequences:
Alt–L
Alt–Shift–B
Ctrl–Shift–C
Ctrl–Alt–Shift–W
Note: The INI file displays a slash in the key sequence (Ctrl/G) instead of a hyphen. By convention, this manual uses a hyphen to indicate that you must press multiple keys simultaneously.
To simulate bar code input with an Intermec Wedge
You can also simulate bar code input by attaching an Intermec Wedge to your PC. After you set the first preamble characters to match the sim_wand_key value, you can use the wedge to enter bar code data into the JANUS application. The bar code input is terminated when you scan Enter or have a Return in the postamble.
1
See your wedge documentation for help setting the preamble. To decide how to scan the sim_wand_key value as the data for the preamble, 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 to learn which characters to scan for Ctrl and G. You learn that you must scan the SO character for Ctrl and the lowercase g character for G. (If you scan SO and uppercase G, the preamble is set to Ctrl–Shift–G.)
1-11
JANUS Application Simulator User’s Manual
Power Management
The initialization file contains parameters that help simulate the power management features of the JANUS reader. For example, the power_status_line parameter specifies if the simulated JANUS is connected to an AC power source.
If your JANUS application calls the im_power_status function or the INT 5EH interrupt, the Simulator TSR passes the preset AC power status to the JANUS application.
Communications Input and Output
The Simulator TSR can simulate input and output data through the JANUS communications ports, COM1 to COM4.
To simulate data input to the application
1. Type sample data in an ASCII file. The format of the data in the file depends on the function you use to receive the data. For example:
im_receive_byte The im_receive_byte function reads one byte of data from the file each time it is called. Carriage return (CR) or line feed (LF) characters are returned as data to the JANUS application.
1-12
im_receive_buffer The im_receive_buffer function reads a buffer of data
each time it is called. Therefore, your RCV file should contain a data string terminated by a CR/LF character. The CR/LF indicates the end of the buffer. If there is no CR/LF, the function reads up to 256 bytes of data.
With each subsequent call, either function would continue reading data where it left off until it reached an EOF. If the function was called after reaching an EOF, it would start reading data at the top of the file again.
2. Specify the ASCII file’s path and filename in the portn_read_file parameter in the INI file, where n is the COM port from which the application expects to read the data.
3. Load the TSR and run the application.
4. Test if the application read the data correctly from the ASCII file.
Getting Started
To simulate data output from the application
1. Specify the ASCII file’s path and filename in the portn_write_file parameter in the INI file, where n is the COM port to which the application expects to write the data.
2. Load the TSR and run the application.
3. The application creates the ASCII file and writes data to it.
4. Test if the application wrote the data correctly to the ASCII file.
Note: You must test the application on a JANUS reader to make sure that the application is handling the input and output communications protocols correctly.
1
JANUS Features That Are Not Simulated
The Simulator TSR cannot reproduce these JANUS features:
• Character height
• Viewport
• Contrast level
• Special JANUS key sequences
• Speed and performance
For more information, read the following sections.
Character Height
The Simulator TSR does not simulate the character height set for the JANUS reader. The characters appear in the standard font and size for the PC.
You can, however, store a character height value in the display_char_height parameter in the INI file. If your JANUS application calls the im_get_display_mode function or the INT 79H interrupt, the Simulator passes the preset character height to the JANUS application.
1-13
JANUS Application Simulator User’s Manual
Viewport
The JANUS viewport is not simulated in this release, but out parameters and return values for related function calls and interrupts are supported:
• You can specify if the viewport is locked (unmoving) with the display_viewport_lock parameter in the INI file.
• You can specify the horizontal and vertical offset for the viewport with the display_x_pos and display_y_pos parameters in the INI file.
• You can specify if the viewport will follow the cursor with the follow_cursor parameter in the INI file.
Contrast Level
The Simulator TSR does not simulate the level of contrast set for the reader. The simulated display appears at the contrast level set for your PC.
You can, however, store a contrast value in the display_contrast_level parameter in the INI file. If your JANUS application calls the im_get_contrast function or the INT 79H interrupt, the Simulator TSR passes the preset contrast level to the JANUS application.
1-14
Special JANUS Key Sequences
The JANUS keypad contains fewer keys than a standard PC-AT keyboard, but you can produce all 102 PC-AT keys with the reader by pressing a variety of key combinations. The special key sequences are listed in your JANUS user’s manual.
When using the Simulator TSR to run JANUS applications on a PC, you do not use special key sequences because your PC keyboard contains all 102 PC-AT keys. For example, to enter the F11 key on a reader, press During a simulation, simply press the F11 key on the PC keyboard.
Note: The Simulator does not let you test how easily users can press the key sequences that your JANUS application expects. You should test the application’s user interface by running it on a reader after you finish debugging the logic.
E E L.
Speed and Performance
The Simulator TSR does not simulate the speed or performance of a JANUS reader. Your JANUS applications runs as fast as your PC can execute them.
2
Running and Debugging an Application
Running and Debugging an Application
This chapter describes how to use the Simulator TSR when you run and debug a JANUS application with application development software.
Deciding Where to Start the Simulator TSR
The Simulator TSR is a terminate and stay resident program. TSRs are small programs that are loaded into DOS memory and run in the background. Therefore, it is important that you start the TSR from MS-DOS.
It is recommended that you start the Simulator TSR from MS-DOS without Windows running. That way, you can be sure that the Simulator TSR remains in memory until you exit the Simulator TSR or shut down you PC.
You can start the Simulator TSR if you are in an MS-DOS session from Windows or an MS-DOS shell spawned from your application development software. However, when you exit the session or shell, the Simulator TSR is removed from memory.
Starting the Simulator TSR
2
You can add a command to your AUTOEXEC.BAT file to start the TSR whenever you reboot, or you can perform the following procedure.
To start the Simulator
1. At the MS-DOS prompt, change to the directory where the Simulator files are stored. For example:
cd c:\janussim
2. Start the Simulator TSR with either of these commands:
• To start the TSR with the default INI file, JANUSSIM.INI, type this
command at the DOS prompt and press Enter:
janussim
• To start the TSR with a customized INI file, type this command at the
DOS prompt and press Enter:
janussim
Where filename.ini is the name of your customized INI file.
filename.ini
2-3
JANUS Application Simulator User’s Manual
3. This message may appear:
Environment variable JANUSSIM not found
If so, type this command at the MS-DOS prompt and press Enter, or add this command to your AUTOEXEC.BAT file and reboot your PC:
set janussim=
Where path is the drive and directory where the JANUS Application Simulator software is installed. The path must have a terminating backslash. For example:
set janussim=c:\janussim\
4. When the Simulator TSR is loaded into memory, it displays this message:
The Simulator has been loaded!
You can now use your application development software to run and debug JANUS applications. For help, see the next section.
path
\
Running and Debugging a JANUS Application
Once you start the Simulator TSR, your next task is to start Windows and use your application development software to run and debug the JANUS application.
Your application development software executes as usual because the Simulator TSR does not affect it. You can use standard debugging techniques. Here are some suggestions:
• If you are editing JANUS application with the Microsoft Visual C++ editor, you can select the Tools menu and choose Codeview for DOS. The software displays the source code for your application in a DOS session. You can set break points, set watching, and step through the application using PSK library calls as well as standard library calls.
• JANUS applications are DOS applications, so make sure you use a DOS-
• Follow the instructions in the documentation provided with your
2-4
application debugger, such as Codeview for DOS. You cannot use a Windows-application debugger, such as Codeview for Windows.
application development software.
Running and Debugging an Application
2
Understanding the Limitations of the Simulator TSR
Read these notes to understand the limitations of the Simulator TSR:
• Be sure to start the Simulator TSR before you run a JANUS application on your development PC.
If you run a JANUS application on your PC without first starting the Simulator TSR, the application may lock up your PC. If this happens, reboot your PC immediately.
• The JANUS Application Simulator does not help you test the application’s user interface or performance. You can test those characteristics far better on a JANUS reader than on any simulation program. You should always test your application by running it on a JANUS reader after you have finished debugging the logic.
• An application containing an erroneous input combination will fail on the JANUS reader, but will not be detected by the Simulator TSR. Specifically, if a JANUS application performs the following two steps, it generates an error condition when it is run on a JANUS reader:
1. The application calls the im_set_input_mode function and sets the input mode to IM_PROGRAMMER or IM_DESKTOP.
2. The application calls a stdlib function (such as getch or gets) or iostream input function (such as cin) to read input from the keyboard.
The JANUS reader does not receive the keyboard input from the stdlib or iostream function. Instead the application hangs because the reader waits for input that it cannot receive.
However, if you run this application on your PC with the Simulator TSR, the PC receives the keyboard input. The Simulator TSR does not detect that this combination causes an error condition on the reader.
Make sure your JANUS applications do not combine a non-Reader Wedge input mode with a stdlib or iostream keyboard input function. Also, make sure you test your applications on a reader after you finish debugging them.
2-5
JANUS Application Simulator User’s Manual
Exiting the Simulator TSR
To unload the Simulator TSR from memory, type this command at the DOS prompt and press Enter:
janussim -d
This message appears:
Simulator has been unloaded.
2-6
3
Learning About the INI File
Learning About the INI File
This chapter describes the parameters in the JANUS Application Simulator’s initialization file. It also explains which JANUS PSK library functions and JANUS­specific system interrupts will receive the INI parameters as return values and out parameters.
3
How to Customize the Parameters
You can customize the parameters in the initialization file using the Editor or an ASCII text editor:
• The Editor is more of a configuration tool than an editor. It helps you create INI files and customize their parameters. For help using the Editor, see Chapter 4.
• You can create and edit INI files with any text editor. Use a copy of the JANUSSIM.INI file to make sure you conform to the formatting conventions. Read this chapter to learn the values for each parameter.
How the Parameters Are Organized in This Chapter
The parameters in this chapter are listed in the order they follow in the INI file. For reference, here is the JANUSSIM.INI file with all the parameters set to their default values:
; ; Filename: JANUSSIM.INI ; port1_read_file = comport1.rcv port2_read_file = comport2.rcv port3_read_file = comport3.rcv port4_read_file = comport4.rcv port1_write_file = comport1.trx port2_write_file = comport2.trx port3_write_file = comport3.trx port4_write_file = comport4.trx rx_check_status_return = 0600H - Comm Operation successful protocol_ext_status_return = 0600H - Comm Operation successful cancel_rx_buff_return = 0600H - Comm Operation successful cancel_tx_buff_return = 4603H - Comm util no PH for config UART_status = 37H
3-3
JANUS Application Simulator User’s Manual
expanded_keyboard_status = 0 - command complete kb_insert_string_status = 0 - success kb_insert_string_capacity = 255 flush_exp_keyboard_status = 0 - success warmboot_status = 0 - warmboot disabled power_status_line = 1 - AC line connected power_status_battery = 2 - critical battery power_status_backup = 1 - backup low power_status_batt_life = 93 power_status_return = 0800H - Power management success display_contrast_level = 16 display_size_mode = 0 - 80 x 25 display_video_mode = 3 - std video mode 3 (80x25) display_scroll_mode = 1 - scroll at 16 display_viewport_lock = 0 - locked display_x_pos = 0 display_y_pos = 0 display_backlight = 0 - backlight off display_char_height = 0 - standard height characters appl_break_status = 0 - break not been made follow_cursor = 1 - follow cursor mode on control_key = 0 - control key disabled keyclick = 0 - keyclick off numeric_keypad_switching = 0FFH - numeric keypad switching permitted numeric_keypad_status = 0FFH - number pad enabled label_symbology = 1 - Code 39 sim_wand_key = CTRL/G clear_abort_callback_return = 0500H - Reader Wedge success command_return = 0500H - Reader Wedge success link_comm_return = 0500H - Reader Wedge success serial_protocol_control_return = 0500H - Reader Wedge success standby_wait_return = 0500H - Reader Wedge success unlink_comm_return = 0500H - Reader Wedge success
Note: This example JANUSSIM.INI file shows the text message for each value as it appears in the INI file, in the software, and on the JANUS. However, the rest of this manual shows messages without abbreviations to make them more readable.
3-4
Overview of Parameters
This section contains the following information about each parameter in the JANUS Application Simulator’s initialization file:
parameter name
Description The purpose of the parameter.
Default The default value for the parameter.
Values The values you can set for the parameter.
Function The JANUS 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.
Learning About the INI File
3
In this manual, the JANUS PSK library functions are called by their C library function names. The QuickBasic library function names are similar, except they use capitalization instead of underscores to make the names readable.
Interrupt The JANUS-specific system interrupt that triggers the
Simulator TSR. Developers who are not using the JANUS PSK can use the interrupts in their JANUS applications.
Notes More information about the parameter.
For example, this section may specify the name of the PSK function’s out parameter that will contain the value of this INI parameter. The JANUS PSK documentation describes each PSK function and lists its out parameters and return values.
The Notes section is optional.
3-5
JANUS Application Simulator User’s Manual
portn_read_file
Description Names the ASCII file that contains data to be read by
Default comportn.rcv, where n is the COM port number (1 to 4)
Values Any filename
Function im_receive_buffer
the JANUS application as if it were received on a COM port. The n in portn_read_file is the port number (1 to
4).
im_receive_buffer_no_wait im_receive_buffer_noprot im_receive_byte im_receive_input im_irl_v im_irl_y
3-6
Interrupt INT 14H
Notes Do not set this parameter to comn.rcv. Your PC will
expect data from its COMn port.
You must test the application on a JANUS reader to make sure that the application is handling the input communications protocols correctly.
If you use the Editor to specify a new file for the portn_read_file parameter, the Editor lets you select an RCV file in any directory or on any drive that is accessible from your PC. However, the Editor saves only the filename to the INI file.
If the RCV file will not be in the current directory when you run the JANUS application on your PC (or in a directory listed in the PATH statement in your AUTOEXEC.BAT file), you must edit the INI file to add the file’s path to the RCV filename.
Learning About the INI File
For example:
port1_read_file = c:\payroll\temp\data1.rcv port2_read_file = d:\sales\test2.rcv port3_read_file = d:\sales\test3.rcv port4_read_file = f:\mis\beta\sample4.rcv
The PSK function you use to read data from the RCV file affects how you format the data in the file. For example:
im_receive_byte This function reads one byte of data from the file each time it is called. Carriage return (CR) or line feed (LF) characters are returned as data to the JANUS application.
With each subsequent call, im_receive_byte continues reading data where it left off in the file until it reaches an end-of-file (EOF) character. If im_receive_byte is called again after reaching an EOF, the function starts reading data at the beginning of the file again.
3
im_receive_buffer This function reads a buffer of data each time it is called. Therefore, your RCV file should contain a data string terminated by a CR/LF character. The CR/LF indicates the end of the buffer. If there is no CR/LF, the function reads up to 256 bytes of data.
With each subsequent call, im_receive_buffer continues reading data where it left off in the file until it reaches an EOF. If im_receive_buffer is called again after reaching an EOF, the function starts reading data at the beginning of the file again.
im_receive_input This function reads a line at a time, similar to im_receive_buffer. However, because im_receive_input accepts input from multiple sources, when the function reaches the EOF, it does not start reading data at the beginning of the file again. This practice allows keyboard and wand input.
3-7
JANUS Application Simulator User’s Manual
portn_write_file
Description Specifies the file that will receive data the JANUS
Default comportn.trx, where n is the COM port number (1 to 4)
Values Any filename
Function im_transmit_buffer
Interrupt INT 14H
Notes Do not set this parameter to comn.trx. Your PC will try
application writes to a COM port. The n in portn_write_file is the port number (1 to 4).
im_transmit_buffer_no_wait im_transmit_buffer_noprot im_transmit_byte
to send data to its COMn port.
3-8
You must test the application on a JANUS reader to make sure that the application is handling the output communications protocols correctly.
If you use the Editor to specify a new file for the portn_write_file parameter, the Editor lets you select a TRX file in any directory or on any drive that is accessible from your PC. However, the Editor saves only the filename to the INI file.
If the TRX file will not be in the current directory when you run the JANUS application on your PC (or in a directory listed in the PATH statement in your AUTOEXEC.BAT file), you must edit the INI file to add the file’s path to the TRX filename. For example:
port1_write_file = c:\payroll\temp\data1.trx port2_write_file = d:\sales\test2.trx port3_write_file = d:\sales\test3.trx port4_write_file = f:\mis\beta\sample4.trx
Learning About the INI File
3
rx_check_status_return
Description Specifies the return value for the simulated
im_rx_check_status function.
Default 0600H – Communication operation successful
Values See the “Communications Standard Return Values List”
on page 3-39.
Function im_rx_check_status
Interrupt INT 14H
protocol_ext_status_return
Description Specifies the return value for the simulated
im_protocol_extended_status function.
Default 0600H – Communication operation successful
Values See the “Communications Standard Return Values List”
Function im_protocol_extended_status
Interrupt INT 14H
on page 3-39.
3-9
JANUS Application Simulator User’s Manual
cancel_rx_buff_return
Description Specifies the return value for the simulated
Default 0600H – Communication operation successful
Values See the “Communications Standard Return Values List”
Function im_cancel_rx_buffer
Interrupt INT 14H
cancel_tx_buff_return
Description Specifies the return value for the simulated
im_cancel_rx_buffer function.
on page 3-39.
im_cancel_tx_buffer function.
Default 0600H – Communication operation successful
Values See the “Communications Standard Return Values List”
Function im_cancel_tx_buffer
Interrupt INT 14H
3-10
on page 3-39.
Learning About the INI File
3
UART_status
Description Specifies the return value for the simulated DOS UART
function.
Default 30H – Bit 4 clear to send and Bit 5 data set ready
Values 01H – Change in clear to send
02H – Change in data set ready 30H – Bit 4 clear to send and Bit 5 data set ready 04H – Trailing edge ring detector 08H – Change in receive line 10H – Clear to send 20H – Data set ready 40H – Ring indicator 80H – Receive line detected
Function None
Interrupt INT 14H
3-11
JANUS Application Simulator User’s Manual
expanded_keyboard_status
Description Specifies if the expanded keyboard is enabled or
Default 0 – Success
Values 0 – Success
Function im_get_expanded_keyboard
Interrupt INT 16H
Notes Intermec recommends that you do not use PSK
disabled.
1 – Expanded keyboard buffer is enabled 2 – Expanded keyboard buffer is disabled 3 – Expanded buffer cannot be disabled
expanded keyboard functions in your JANUS application.
3-12
The im_get_expanded_keyboard function always returns 1000H (Expanded keyboard buffer success) as its return value.
If you select 2 for the expanded_keyboard_status parameter, im_get_expanded_keyboard returns IM_DISABLE as its first parameter.
If you select 0, 1, or 3 for the expanded_keyboard_status parameter, im_get_expanded_keyboard returns IM_ENABLE as its first parameter.
Learning About the INI File
3
kb_insert_string_status
Description Specifies if the string was inserted into the expanded
keyboard buffer.
Default 0 – Success
Values 0 – Success
1 – Expanded keyboard buffer not installed 2 – Keyboard buffer is full (entire string rejected) 3 – Invalid mode value was passed
Function im_kb_insert_string
im_kb_insert_string_keycodes
Interrupt INT 16H
Notes Intermec recommends that you do not use PSK
expanded keyboard functions in your JANUS application.
This value is returned at the interrupt level:
If you select 0 as the return value, the
im_kb_insert_string function returns 1000H (Expanded keyboard buffer success) to the application.
If you select 1 as the return value, the
im_kb_insert_string function returns 9004H (Expanded keyboard buffer not installed) to the application.
If you select 2 as the return value, the
im_kb_insert_string function returns 9003H (Keyboard buffer is full (entire string rejected)) to the application.
If you select 3 as the return value, the
im_kb_insert_string function returns 9005H (Invalid mode value was passed) to the application.
3-13
JANUS Application Simulator User’s Manual
kb_insert_string_capacity
Description Specifies the remaining number of characters that can
Default 255
Values Numeric value from 0 to 256
Function im_kb_insert_string
Interrupt INT 16H
Notes Intermec recommends that you do not use PSK
be inserted into the expanded keyboard buffer.
im_kb_insert_keycodes
expanded keyboard functions in your JANUS application.
The value of this INI parameter is returned to the JANUS application in the *remaining_capacity parameter of the im_kb_insert_string and im_kb_insert_keycodes function calls.
3-14
Learning About the INI File
3
flush_exp_keyboard_status
Description Specifies the status after deleting all characters from the
expanded keyboard buffer.
Default 0 – Success
Values 0 – Success
1 – Failure
Function im_flush_expanded_keyboard
Interrupt INT 16H
Notes Intermec recommends that you do not use PSK
expanded keyboard functions in your JANUS application.
This value is returned at the interrupt level:
If you select 0 as the return value, the
im_flush_expanded_keyboard function returns 1000H (Expanded keyboard buffer success) to the application.
If you select 1 as the return value, the
im_flush_expanded_keyboard function returns 9006H (Expanded keyboard flush not successful) to the application.
3-15
JANUS Application Simulator User’s Manual
warmboot_status
Description Specifies the return value of the im_get_warmboot
Default 0 – Warmboot disabled
Values 0 – Warmboot disabled
Function im_get_warm_boot
Interrupt INT 16H
Notes The value of this INI parameter is returned to the
function, which lets users press Ctrl–Alt–Del to warm boot the JANUS.
1 – Warmboot enabled
JANUS application in the *warm_boot parameter of the im_get_warm_boot function call.
3-16
The value held in memory by the Simulator TSR can be modified by the im_set_warm_boot function.
Learning About the INI File
power_status_line
Description Specifies the line status of the simulated
im_power_status function.
Default 0 – AC line not connected
Values 0 – AC line not connected
1 – AC line connected 255 – Unknown AC line
Function im_power_status
Interrupt INT 5EH
Notes The value of this INI parameter is returned to the
JANUS application in the *line_status parameter of the im_power_status function call.
3
3-17
JANUS Application Simulator User’s Manual
power_status_battery
Description Specifies the simulated condition of the battery.
Default 0 – High battery
Values 0 – High battery
Function im_power_status
Interrupt INT 5EH
Notes The value of this INI parameter is returned to the
1 – Low 2 – Critical 3 – Charging 255 – Unknown status
JANUS application in the *battery_status parameter of the im_power_status function call.
power_status_backup
Description Specifies the simulated condition of the backup battery.
Default 0 – Backup OK
Values 0 – Backup OK
Function im_power_status
Interrupt INT 5EH
Notes The value of this INI parameter is returned to the
3-18
1 – Backup low
JANUS application in the *backup_status parameter of the im_power_status function call.
Learning About the INI File
3
power_status_batt_life
Description Specifies the simulated percentage of the battery’s full
charge.
Default 100
Values Numeric value from 0 to 100
Function im_power_status
Interrupt INT 5EH
Notes The value of this INI parameter is returned to the
JANUS application in the *fuel_gauge parameter of the im_power_status function call.
power_status_return
Description Specifies the return value for the im_power_status
Default 0800H – Power management success
Values 0800H – Power management success
Function im_power_status
Interrupt INT FEH
function.
8821H – Cannot change state 8822H – Invalid state manager command 8842H – Invalid IPM interface command 8843H – Parameter out of range 8844H – Semaphore maximum value exceeded
3-19
JANUS Application Simulator User’s Manual
display_contrast_level
Description Specifies the contrast level for the JANUS display.
Default 16
Values Numeric value from 0 to 31
Function im_get_contrast
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
JANUS application in the *display_contrast_level parameter of the im_get_contrast function call.
The value held in memory by the Simulator TSR can be modified by the im_set_contrast function.
3-20
Learning About the INI File
display_size_mode
Description Specifies the size mode of the JANUS display.
Default 0 – 80 x 25
Values 0 – 80 x 25
1 – 20 x 16 2 – 20 x 8 3 – 10 x 16 4 – 10 x 8
Function im_get_display_mode
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
JANUS application in the *size_mode parameter of the im_get_display_mode function call.
3
The value held in memory by the Simulator TSR can be modified by the im_set_display_mode function.
3-21
JANUS Application Simulator User’s Manual
display_video_mode
Description Specifies the video mode of the JANUS display.
Default 3 – Standard video mode 3 (80 x 25)
Values 0 – Standard video mode 0 (40 x 25)
Function im_get_display_mode
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
1 – Standard video mode 1 (40 x 25) 2 – Standard video mode 2 (80 x 25) 3 – Standard video mode 3 (80 x 25) 4 – Video mode 4 (graphics) 5 – Video mode 5 (graphics) 6 – Video mode 6 (graphics)
JANUS application in the *video_mode parameter of the im_get_display_mode function call.
3-22
The value held in memory by the Simulator TSR can be modified by the im_set_display_mode function.
Learning About the INI File
3
display_scroll_mode
Description Specifies the line number at which the JANUS display
will scroll when the display size is set to 80 x 25.
Default 1 – Scroll at 16
Values 0 – Scroll at line 25
1 – Scroll at 16 2 – Scroll at line 8
Function im_get_display_mode
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
JANUS application in the *scroll_mode parameter of the im_get_display_mode function call.
This parameter is in effect only when the display size is set to 80 x 25.
The value held in memory by the Simulator TSR can be modified by the im_set_display_mode function.
3-23
JANUS Application Simulator User’s Manual
display_viewport_lock
Description Specifies if the JANUS viewport is locked or unlocked.
Default 0 – Locked
Values 0 – Locked
Function im_get_viewport_lock
Interrupt INT 79H
Notes If you choose 0 for this parameter, 1 - IM_LOCKED is
1 – Unlocked
returned in the *viewport_lock parameter of the im_get_viewport_lock function call.
If you choose 1 for this parameter, 0 - IM_UNLOCKED is returned in the *viewport_lock parameter of the im_get_viewport_lock function call.
3-24
The value held in memory by the Simulator TSR can be modified by the im_set_viewport_lock function.
Learning About the INI File
display_x_pos
Description Specifies the horizontal offset for the left side of the
simulated viewport.
Default 0
Values Numeric value from 0 to 60
Function im_viewport_getxy
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
JANUS application in the *col parameter of the im_viewport_getxy function call.
The Simulator TSR does not simulate viewport movement, but it does return the X and Y values to the im_viewport_getxy function:
3
The X and Y parameters represent the position
where the upper left corner of the JANUS viewport appear on the PC screen.
You cannot set X to a value larger than 60. If you
could, the viewport would be positioned beyond the left edge of the PC screen.
You can change the X value in memory by calling:
im_viewport_end
im_viewport_home
im_viewport_move
im_viewport_setxy
im_viewport_to_cursor
im_viewport_page_up
im_viewport_page_down
3-25
JANUS Application Simulator User’s Manual
display_y_pos
Description Specifies the vertical offset for the left side of the
Default 0
Values Numeric value from 0 to 9
Function im_viewport_getxy
Interrupt INT 79H
Notes: The value of this INI parameter is returned to the
simulated viewport.
JANUS application in the *row parameter of the im_viewport_getxy function call.
The Simulator TSR does not simulate viewport movement, but it does return the X and Y values to the im_viewport_getxy function:
3-26
The X and Y parameters represent the position
where the upper left corner of the JANUS viewport appear on the PC screen.
You cannot set X to a value larger than 60. If you
could, the viewport would be positioned beyond the left edge of the PC screen.
You can change the Y value in memory by calling:
im_viewport_end
im_viewport_home
im_viewport_move
im_viewport_setxy
im_viewport_to_cursor
im_viewport_page_up
im_viewport_page_down
Learning About the INI File
3
display_backlight
Description Specifies the starting state of the JANUS backlight.
Default 0 – Backlight off
Values 0 – Backlight off
1 – Backlight on
Function im_backlight_toggle
Interrupt INT 79H
Notes You can change the backlight status by calling these
functions:
im_backlight_on
im_backlight_off
im_backlight_toggle
3-27
JANUS Application Simulator User’s Manual
display_char_height
Description Specifies if the characters are displayed at standard
Default 0 – Standard height characters
Values 0 – Standard height characters
Function im_get_display_mode
Interrupt INT 79H
Notes The value of this INI parameter is returned to the
height or double height.
1 – Double height characters
JANUS application in the *char_ht parameter of the im_get_display_mode function call.
This parameter does not affect the characters displayed on the development PC.
3-28
The value held in memory by the Simulator TSR can be modified by the im_set_display_mode function.
Learning About the INI File
3
appl_break_status
Description Specifies if the user entered the application break key
sequence to interrupt applications running on the JANUS.
Default 0 – Request for break has not been made
Values 0 – Request for break has not been made
0FFH – Request for break has been made
Function im_appl_break_status
Interrupt INT 7EH
follow_cursor
Description Specifies if the viewport will follow the cursor as it
moves around the simulated display.
Default 1 – Follow cursor mode on
Values 0 – Follow cursor mode off
1 – Follow cursor mode on
Function im_get_follow_cursor
Interrupt INT 7EH
Notes The value of this INI parameter is returned to the
JANUS application in the *follow_cursor parameter of the im_get_follow_cursor function call.
The value held in memory by the Simulator TSR can be modified by the im_set_follow_cursor function.
3-29
JANUS Application Simulator User’s Manual
control_key
Description Specifies if the Control key is enabled or disabled for
Default 0 – Control key disabled
Values 0 – Control key disabled
Function im_get_control_key
Interrupt INT 7EH
Notes The value of this INI parameter is returned to the
the simulated im_get_control_key function.
0FFH – Control key enabled
JANUS application in the *control_key parameter of the im_get_control_key function call.
The im_get_control_key function does not enable or disable the control key on the development PC.
3-30
The value held in memory by the Simulator TSR can be modified by the im_set_control_key function.
Learning About the INI File
3
keyclick
Description Specifies if the JANUS emits a click each time a key is
pressed.
Default 0 – Keyclick off
Values 0 – Keyclick off
0FFH – Keyclick on
Function im_get_keyclick
Interrupt INT 7EH
Notes The value of this INI parameter is returned to the
JANUS application in the *keyclick parameter of the im_get_keyclick function call.
The value held in memory by the Simulator TSR can be modified by the im_set_keyclick function.
3-31
JANUS Application Simulator User’s Manual
numeric_keypad_switching
Description Specifies if the user can switch the numeric keypad
Default 0FFH – Numeric keypad switching permitted
Values 0 – Numeric keypad switching prohibited
Function None
Interrupt INT 7EH
Notes This parameter is provided for interrupt level support
from numeric to function keys.
0FFH – Numeric keypad switching permitted
only; there is no JANUS PSK library function associated with this parameter.
The value held in memory by the Simulator TSR can be modified by the im_number_pad_on and im_number_pad_off functions.
3-32
Learning About the INI File
3
numeric_keypad_status
Description Specifies if the numeric keypad is in numeric or
function key mode.
Default 0 – Numeric keypad disabled
Values 0 – Numeric keypad disabled
0FFH – Numeric keypad enabled
Function None
Interrupt INT 7EH
Notes This parameter is provided for interrupt level support
only; there is no JANUS PSK library function associated with this parameter.
The value held in memory by the Simulator TSR can be modified by the im_number_pad_on and im_number_pad_off functions.
3-33
JANUS Application Simulator User’s Manual
label_symbology
Description Specifies the symbology of the last simulated scanned
Default 1 – Code 39
Values 0 – Unknown
label.
1 – Code 39 2 – Code 93 3 – Code 49 4 – Interleaved 2 of 5 (I 2 of 5) 5 – Codabar 6 – UPC/EAN 7 – Code 128 8 – Code 16K 9 – Plessey 10 – Code 11 11 – MSI
3-34
Function im_get_label_symbology
im_receive_input im_irl_a im_irl_n, im_irl_y
Interrupt INT 7DH
Notes The value of this INI parameter is returned to the
JANUS application in the *symbology parameter of the function calls that use this INI parameter.
When testing a JANUS application, you can simulate the act of scanning a label by pressing the key sequence specified in the sim_wand_key parameter. The label_symbology parameter specifies the symbology for the simulated label.
Learning About the INI File
3
sim_wand_key
Description Specifies the key sequence that causes the JANUS
application to accept subsequent keyboard input as if it were wand input.
Default Ctrl–G
Values A key combination that includes one or more control
keys (Ctrl, Alt, Shift) and a character key (A to Z).
Function None
Interrupt None
Notes The user presses this key sequence and types data that
the application accepts as input from a wand. The user presses Enter to indicate the end of the simulated wand input.
You can set the sim_wand_key parameter equal to one or more control keys (Ctrl, Alt, Shift) and a character key (A to Z). Here are some sample key sequences:
Alt–L
Alt–Shift–B
Ctrl–Shift–C
Ctrl–Alt–Shift–W
The INI file displays a slash in the key sequence (Ctrl/G) instead of a hyphen. By convention, this manual uses a hyphen to indicate that you must press multiple keys simultaneously.
3-35
JANUS Application Simulator User’s Manual
clear_abort_callback_return
Description Specifies the return value upon clearing the abort
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
Function im_clear_abort_callback
Interrupt INT 7DH
command_return
Description Specifies the return value after issuing a configuration
callback routine.
on page 3-40.
command.
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
Function im_command
Interrupt INT 7DH
3-36
on page 3-40.
Learning About the INI File
3
link_comm_return
Description Specifies the return value after the application attempts
to link a Reader Wedge and a designated COM port.
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
on page 3-40.
Function im_link_comm
Interrupt INT 7DH
Notes Once a JANUS application calls the im_link_comm PSK
function, other PSK functions that require a link or unlink will operate as if the link were successfully established—even if you select a value for the link_comm_return parameter that indicates the im_link_comm function failed.
serial_protocol_control_return
Description Specifies the return value for the simulated
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
Function im_serial_protocol_control
Interrupt INT 7DH
im_serial_protocol_control function.
on page 3-40.
3-37
JANUS Application Simulator User’s Manual
standby_wait_return
Description Specifies the return value for the simulated
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
Function im_standby_wait
Interrupt INT 7DH
unlink_comm_return
Description Specifies the return value for the simulated
im_standby_wait function.
on page 3-40.
im_unlink_comm function.
Default 0500H – Reader Wedge success
Values See the “Reader Wedge Standard Return Values List”
Function im_unlink_comm
Interrupt INT 7DH
3-38
on page 3-40.
Learning About the INI File
Communications Standard Return Values
Communications standard return values are sent to a JANUS application to indicate the result of a communications function call, such as im_rx_check_status.
When you customize the INI file for the Simulator TSR, you can set these four parameters to a communications return value:
• rx_check_status_return
• cancel_rx_buff_return
• protocol_ext_status_return
• cancel_tx_buff_return
Communications Standard Return Values List
Code Description
0600H Communication operation successful 0601H Communication buffer done 4600H Warning buffer canceled 4601H Communication timeout warning 4602H Communication had no client to cancel 4603H No protocol handler to configure 4604H Protocol handler is not yet loaded 4605H Protocol handler already receiving 4607H Protocol handler not active for link request 8600H Invalid configuration 8601H Buffer length 0 error 8602H Communication port is in use 8603H Protocol error 8604H Communication port error 8605H Communication port is busy 8606H Comunication request is not supported 8607H Protocol handler already loaded
3
3-39
JANUS Application Simulator User’s Manual
Code Description
8608H Protocol buffer error 8609H Unknown service request 860AH No data available 860BH Communication utility is not loaded 860CH Communication utility resume/suspend failure 860DH Communication utility INT 14 is already in use 860EH Incompatible revision between protocol handler and
communication utility 860FH Non supported communication service 8610H Invalid EOF character 8611H Protocol handler is not active 8612H Buffer must be 256 bytes or larger
Reader Wedge Standard Return Values
3-40
The Reader Wedge standard return values are codes that are sent to a JANUS application to indicate the result of a Reader Wedge function call, such as link_comm_return.
When you customize the INI file for the Simulator TSR, you can set these six parameters to a Reader Wedge return value:
• clear_abort_callback_return
• command_return
• link_comm_return
• serial_protocol_control_return
• standby_wait_return
• unlink_comm_return
Reader Wedge Standard Return Values List
Code Description
0500H Reader Wedge success 8501H Input request error 4502H Input timeout 4503H No input data 8504H Illegal reader wedge mode 0505H No reader commands parsed 0506H Valid reader commands parsed 8507H Reader commands parsing error 8508H Invalid configuration error 0509H Accumulating reader command 050AH Reader command override 050BH Reader command enter accumulate 050CH Reader command exit accumulate 050DH Accumulate multiread labels 050EH The application should be notified 850FH Error in reader command edit 0510H An ENTER reader command parsed 8511H Unable to allocate memory for input 8512H Protocol handler is not linked 0513H Protected field has been parsed 8514H Parse error on exit accumulate 8515H Application break detected 8516H Invalid reader wedge request 0517H Keycode label has been parsed 0518H Label not accepted (application is not requesting input) 0519H Available buffers for comms link 051AH No comms status to report 851BH Invalid protocol for input request 051CH Xmit buffer busy or Comm error 051DH Exit Accumulate with Comms error
Learning About the INI File
3
3-41
4
Customizing INI Files With the Editor
This chapter explains why you customize the initialization (INI) file and describes how to do so with the Windows-based Editor.
Why Customize INI Files?
Note: Customizing the INI file is an optional process. You do not have to customize the INI file if you are satisfied with the default values in JANUSSIM.INI.
The INI parameters control how the Simulator TSR simulates a JANUS reader executing an application. You can customize the parameters so the Simulator TSR mimics the conditions against which you want to test your JANUS applications.
For example, if your JANUS application checks the battery’s status, you could use an INI file to mimic a low power condition and test how your application responds. Follow these steps:
1. Create a LOWBAT.INI file and customize these parameters to simulate a low power condition:
Customizing INI Files With the Editor
4
• power_status_line = 0 - AC line not connected
• power_status_battery = 2 - critical battery
• power_status_backup = 1 - backup low
• power_status_batt_life = 10
• power_status_return = 0800H - Power management success
2. Start the Simulator TSR by typing this command at the DOS prompt:
janussim lowbat.ini Enter
3. Run your JANUS application. When the application issues the im_power_status function call or the 5EH interrupt, it will find that the reader is not plugged into an AC power source, the battery is critically low, and the backup battery is low.
4. Test how the application responds to this low power condition.
4-3
JANUS Application Simulator User’s Manual
Here is the LOWBAT.INI file with the customized parameters shaded for emphasis:
; ; Filename: LOWBAT.INI ; port1_read_file = comport1.rcv port2_read_file = comport2.rcv port3_read_file = comport3.rcv port4_read_file = comport4.rcv port1_write_file = comport1.trx port2_write_file = comport2.trx port3_write_file = comport3.trx port4_write_file = comport4.trx rx_check_status_return = 0600H - Comm Operation successful protocol_ext_status_return = 0600H - Comm Operation successful cancel_rx_buff_return = 0600H - Comm Operation successful cancel_tx_buff_return = 0600H - Comm Operation successful UART_status = 30H expanded_keyboard_status = 0 - command complete kb_insert_string_status = 0 - success kb_insert_string_capacity = 255 flush_exp_keyboard_status = 0 - success warmboot_status = 0 - warmboot disabled power_status_line = 0 - AC line not connected power_status_battery = 2 - critical battery power_status_backup = 1 - backup low power_status_batt_life = 10 power_status_return = 0800H - Power management success display_contrast_level = 16 display_size_mode = 0 - 80 x 25 display_video_mode = 3 - std video mode 3 (80x25) display_scroll_mode = 1 - scroll at 16 display_viewport_lock = 0 - locked display_x_pos = 0 display_y_pos = 0 display_backlight = 0 - backlight off display_char_height = 0 - standard height characters appl_break_status = 0 - break not been made follow_cursor = 1 - follow cursor mode on control_key = 0 - control key disabled keyclick = 0 - keyclick off
4-4
numeric_keypad_switching = 0FFH - numeric keypad switching permitted numeric_keypad_status = 0 - numeric keypad disabled label_symbology = 1 - Code 39 sim_wand_key = CTRL/G clear_abort_callback_return = 0500H - Reader Wedge success command_return = 0500H - Reader Wedge success link_comm_return = 0500H - Reader Wedge success serial_parse_return = 0500H - Reader Wedge success serial_protocol_control_return = 0500H - Reader Wedge success standby_wait_return = 0500H - Reader Wedge success unlink_comm_return = 0500H - Reader Wedge success
Starting the Editor
To start the Editor, double-click on the Editor icon in the Simulator group on your Windows desktop. The Editor window appears:
The title bar contains the JANUSSIM.INI filename because the default initialization file is automatically opened when you start the Editor.
Customizing INI Files With the Editor
4
You can begin editing the parameters in the JANUSSIM.INI file, create a new INI file, or open an existing INI file.
If the Simulator TSR is running while you use the Editor, you can load the current INI file from the Editor into the Simulator TSR. You might do this to load a new version of the same INI file that the Simulator TSR is using, or to load a different INI file into the Simulator TSR. For help, see “Updating the Simulator TSR With the Current INI File” later in this chapter.
4-5
JANUS Application Simulator User’s Manual
Using Online Help
The online help explains how to use the Editor and describes the parameters in the initialization file.
To access online help
You can use one of these methods for accessing the Editor’s online help:
• From any Editor screen that has a Help button, choose Help. A help screen appears, containing information about the Editor window.
• From the Help drop-down menu, choose Contents. An online help screen displays a list of topics. Double-click on any item in the Contents list for more information.
• From the Intermec group on your Windows desktop, you can double­click on the Sim Editor Help icon. An online help screen displays the Contents. Double-click on any item in the Contents list for more information.
4-6
Creating a New INI File
You can create and customize new initialization files with the Editor. Each new file is a duplicate of the JANUSSIM.INI file with all the parameters set to their default values.
To create a new INI file
1. From the File menu, choose Open. The Open File window appears:
Customizing INI Files With the Editor
4
2. In the File Name field, enter the name of the new file you are creating.
3. Make sure the current directory, as shown in the Directories list box, is the directory where you want to save the new file. If not, select a different directory.
4. Choose OK. The new INI file is created, and the parameters are set to the defaults.
You return to the main menu, and the new filename appears in the title bar.
You can begin customizing the parameters immediately:
• For help choosing new values for the parameters, see Chapter 3.
• For help setting the parameters, see “Setting Parameters” later in this chapter.
4-7
JANUS Application Simulator User’s Manual
Opening an Existing INI File
You can open an existing initialization file to view, edit, or print the file.
To open an existing INI file
1. From the File menu, choose Open. The Open File window appears:
2. From the File Name list box, select the name of the file you want to open.
3. Choose OK.
You can begin customizing the parameters immediately:
• For help choosing new values for the parameters, see Chapter 3.
• For help setting the parameters, read the following sections.
4-8
If the filename does not appear in the list box, make sure the current directory, as shown in the Directories list box, is the one where the file is stored. If not, select a different directory.
The file is opened. You return to the main menu, and the filename appears in the title bar.
Setting Parameters
The Editor groups the parameters into six topics:
Customizing INI Files With the Editor
4
Communications
Keyboard
Power Management
Display
Keypad
Reader Wedge
cancel_rx_buff_return cancel_tx_buff_return portn_read_file portn_write_file
expanded_keyboard_status flush_exp_keyboard_status kb_insert_string_capacity
power_status_backup power_status_batt_life power_status_battery
display_backlight display_char_height display_contrast_level display_scroll_mode display_size_mode
appl_break_status follow_cursor control_key
label_symbology sim_wand_key clear_abort_callback_return command_return
protocol_ext_status_return rx_check_status_return UART_status
kb_insert_string_status warmboot_status
power_status_line power_status_return
display_video_mode display_viewport_lock display_x_pos display_y_pos
keyclick numeric_keypad_switching numeric_keypad_status
link_comm_return serial_protocol_control_return standby_wait_return unlink_comm_return
For descriptions of the parameters, see Chapter 3. For help customizing the parameters, see the following sections.
4-9
JANUS Application Simulator User’s Manual
Setting Communications Parameters
You can view or set the values for the communications parameters.
To set a communications parameter
1. From the Edit menu, choose Communications. This Select parameter window appears:
The communications parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
4-10
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
Customizing INI Files With the Editor
4
Naming portn_read_file and portn_write_file
The portn_read_file and portn_write_file parameters identify the ASCII text files that the Simulator TSR uses to simulate reading from and writing to the JANUS COM ports (1 to 4).
If you specify new filenames for these parameters, do not use comn.rcv and comn.trx. Those filenames will cause your PC to associate input and output with its communication ports.
Specifying a Path for portn_read_file and portn_write_file
If you use the Editor to select a file for the portn_read_file or portn_write_file parameters, the Editor lets you select a file in any directory or on any drive that is accessible from your PC. In this example, a user selects a file in a directory on Drive F:
However, the Editor saves only the filename to the INI file, not the path example, if you check the INI file after saving this change, you see:
port4_read_file = sample4.rcv
If the file will not be in the current directory when you run the JANUS application on your PC (or in a directory listed in the PATH statement in your AUTOEXEC.BAT file), you must edit the INI file and add the file’s path to the filename. For example:
port4_read_file = f:\mis\beta\sample4.rcv
. For
4-11
JANUS Application Simulator User’s Manual
Setting Keyboard Parameters
You can view or set the values for the keyboard parameters.
To set a keyboard parameter
1. From the Edit menu, choose Keyboard. This Select parameter window appears:
The keyboard parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
4-12
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
Customizing INI Files With the Editor
4
Setting Power Management Parameters
You can view or set the values for the power management parameters.
To set a power management parameter
1. From the Edit menu, choose Power Management. This Select parameter window appears:
The power management parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
4-13
JANUS Application Simulator User’s Manual
Setting Display Parameters
You can view or set the values for the display parameters.
To set a display parameter
1. From the Edit menu, choose Display. This Select parameter window appears:
The display parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
4-14
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
Customizing INI Files With the Editor
Setting Keypad Parameters
You can view or set the values for the keypad parameters.
To set a keypad parameter
1. From the Edit menu, choose Keypad. This Select parameter window appears:
The keypad parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
4
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
4-15
JANUS Application Simulator User’s Manual
Setting Reader Wedge Parameters
You can view or set the values for the Reader Wedge parameters.
To set a Reader Wedge parameter
1. From the Edit menu, choose Reader Wedge. This Select parameter window appears:
The Reader Wedge parameters are contained in the list box.
2. To view the current value for a parameter, select the parameter. The current value appears below the list box.
4-16
3. To customize a parameter, either double-click on it or select it and choose Edit.
Another window appears, displaying the values you can choose for the parameter. At that window, select a value and choose OK. You return to this Select parameter window.
4. Choose Close to return to the main menu.
Saving Changes
You can save the changes you make to an INI file in these ways:
• Save the changes to the current INI file.
• Save the changes to the current INI file when you exit the Editor.
• Save the changes into a new INI file.
• Save the changes into an existing INI file.
Note: The current file is the file that is currently open. The current file’s name is displayed in the title bar of the Editor window.
To save the changes into the current INI file
1. From the File menu, choose Save. The Editor saves the file and displays the message:
File:
name
Saved
Customizing INI Files With the Editor
4
For example, File: LOWBAT.INI Saved
2. Choose OK.
To save the changes into the current INI file when you exit the Editor
1. From the File menu, choose Exit. If you made changes to the INI file that you have not saved yet, the
Editor displays the message:
Do you want to save changes to file
2. To save the changes into the current INI file, choose the Save button. The changes are saved, the Editor shuts down, and you return to your Windows desktop.
You have other choices:
• To discard the changes, choose the No Save button. The changes are
not saved, the Editor shuts down, and you return to your Windows desktop.
name
?
4-17
JANUS Application Simulator User’s Manual
• To avoid saving or discarding, choose the Cancel button. You return to the Editor main menu. You can save the changes to another INI file or perform some other function.
To save the changes in a new INI file
1. From the File menu, choose Save As. The Save As window appears:
2. Make sure the current directory, as shown in the Directories list box, is
3. In the File Name field, enter the new filename.
4. Choose OK to save the changes in the new file you specified. The Editor
5. Choose OK. You return to the main menu.
4-18
the one where you want to store the new file. If not, choose another directory.
creates the new file, saves the changes, and displays this message:
File:
name
Saved
Customizing INI Files With the Editor
To save the changes in an existing INI file
1. From the File menu, choose Save As. The Save As window appears:
2. From the File Name list box, select the name of the file where you want to save the changes.
4
If the filename does not appear in the list box, make sure the current directory, as shown in the Directories list box, is the one where the file is stored. If not, select a different directory.
3. Choose OK to save the changes in the file you selected. The Editor displays this message:
File already exists. Replace existing file?
Choose Yes to overwrite the contents of the file with the changes you have made. You can also choose No to cancel this operation and return to the main menu.
If you choose Yes, the Editor saves the changes into the file and displays this message:
File:
name
Saved
4. Choose OK. You return to the main menu.
4-19
JANUS Application Simulator User’s Manual
Discarding Changes
You can discard changes when you exit the Editor.
To discard the changes
1. From the File menu, choose Exit. If you made changes to the INI file that you have not saved yet, the Editor displays the message:
Do you want to save changes to file
2. To discard the changes, choose the No Save button. The changes are not saved, the Editor shuts down, and you return to your Windows desktop.
Restoring the Default Values
Sometimes you will want to reset all the parameters in the current INI file to their default settings. You can do this at any time when the Editor is running. For a description of the parameters and their defaults, see Chapter
3.
To restore the defaults
1. From the File menu, choose Restore Defaults. The Editor displays this message:
All parameters will be reset to their default values. Do you want to proceed?
2. Choose Restore to restore the defaults. The Editor resets the parameters to their defaults and displays the message:
All defaults have been restored.
3. Choose OK.
name
?
4-20
Customizing INI Files With the Editor
4
Updating the Simulator TSR With the Current INI File
The Simulator TSR can be running while you use the Editor to create or edit initialization files. If the TSR is running, you can load a new or changed INI file into the Simulator TSR without exiting the Editor or stopping the Simulator TSR.
For example, if you start the Simulator TSR with the default INI file, JANUSSIM.INI, you can use the Editor to:
• Create a new INI file called LOWBAT.INI and load the new file into the Simulator TSR as it runs in the background.
• Edit the default INI file, JANUSSIM.INI, and load the changed file into the Simulator TSR as it runs in the background.
To update the Simulator TSR with a new or changed INI file
1. Make sure the Simulator TSR is running.
2. Start the Editor. Either create or edit any INI file.
2. From the File menu, choose Update Simulator.
3. If the Simulator TSR is running, a status message appears:
Simulator has been updated.
Choose OK. You return to the main menu. The Simulator TSR has been updated with the current INI file.
4. If the Simulator TSR is not running, an error message appears:
The Simulator TSR is not running. Please exit the Editor, shut down Windows, and start the TSR.
Follow the instructions in the message. To start the TSR with a specific INI file, enter this command at the MS-DOS prompt:
janussim filename.ini
Where filename.ini is the name of the INI file.
4-21
JANUS Application Simulator User’s Manual
Setting Up the Printer
You can set up the printer to which the Editor prints the INI file.
To set up the printer
1. From the File menu, choose Printer Setup. The standard Windows Print Setup window appears:
2. Set up your printer as you would for any Windows application.
3. Choose OK. You return to the main menu.
Printing INI Files
You can print initialization files with the Editor or with any ASCII text editor. Printing INI files is a good way to keep track of contents of the INI files, especially if you are using multiple files.
To print an INI file
1. From the File menu, choose Print.
4-22
2. The Editor displays the message:
Printing document.
To cancel the print job, you can choose Cancel on the message box.
Exiting the Editor
When you exit the Editor, you shut down the Editor and close the current INI file. If you changed the current file and have not saved those changes yet, the Editor prompts you to save or discard the changes.
To exit the Editor
1. From the File menu, choose Exit. If you saved all changes to the current INI file, the Editor simply shuts
down and you return to your Windows desktop. If you made changes to the INI file that you have not saved yet, the
Editor displays the message:
Customizing INI Files With the Editor
4
Do you want to save changes to file
Choose one of the following:
• To save the changes into the current INI file, choose the Save button.
The changes are saved, the Editor shuts down, and you return to your Windows desktop.
• To discard the changes, choose the No Save button. The changes are
not saved, the Editor shuts down, and you return to your Windows desktop.
• To avoid saving or discarding, choose the Cancel button. You return
to the Editor main menu. This gives you the chance to save the changes to another INI file or perform some other function.
name
?
4-23
Loading...