Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 3 of 12

JANUS Application Simulator User's Manual, pages 21 to 30

Pages 21 to 30 of 112

The original document is the PDF (557 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Intermec J2020, Intermec JG2020, Intermec JR2020, Intermec J2010, Intermec J2050 and Intermec JG2050

Page 21

Getting Started

1

INI File 1

JANUS Application

Simulator TSR

/*Check the status of 2 /* the power supply. status = im_power_status (&ac_line, &battery, &backup, &fuel); printf ("Status: %4X\n", status);

Parameter power_status_line power_staus_battery power_status_backup power_status_batt_life power_status_return

Value 0 0 0 100 0800H 3

4

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

Page 22

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 cancel_rx_buff_return cancel_tx_buff_return UART_status

INT 16H expanded_keyboard_status kb_insert_string_status kb_insert_string_capacity flush_exp_keyboard_status warmboot_status

INT 5EH power_status_line power_status_battery power_status_backup power_status_batt_life power_status_return

INT 79H display_contrast_level display_size_mode display_video_mode display_scroll_mode display_viewport_lock display_x_pos display_y_pos display_backlight display_char_height

INT 7EH appl_break_status follow_cursor control_key keyclick numberpad_switching numberpad_status

INT 7DH label_symbology clear_abort_callback_return command_return link_comm_return serial_protocol_control_return standby_wait_return unlink_comm_return portn_read_file portn_write_file

See Chapter 3 to learn more about INI parameters.

1-8

Page 23

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

Page 24

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. 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.

1-10

Page 25

Getting Started

1

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. 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

Page 26

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. 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.

1-12

Page 27

Getting Started

1

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.

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

Page 28

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.

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 E E L. 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.

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.

1-14

Page 29

2 Running and Debugging an Application

Page 30

This page is a scan with no text; see it in the PDF.