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 22 of 37

JANUS PSK for Basic, Version 2.1 Reference Manual, pages 211 to 220

Pages 211 to 220 of 362

The original document is the PDF (601 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.

For the Intermec J2020, Intermec J2010 and Intermec J2050

Page 211

imGetInputMode – Visual Basic

3 imGetInputMode Purpose:

This function reports the current mode of the input manager. The different modes affect how the reader interprets and stores input.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetInputMode%()

IN Parameters:

None.

OUT Parameters:

None.

Return Value:

The mode returned by this function is one of these constants: imWedge imProgrammer imDesktop

Notes:

Wedge mode Programmer mode Desktop mode

There are three different reader input modes: Wedge, Programmer, and Desktop. These different modes affect how the reader interprets and stores input. Wedge Mode Keypad and label input goes into the keyboard buffer with minimal filtering. Wedge mode is the default mode at the DOS prompt after reader services (RSERVICE.EXE) is loaded. Use Wedge mode when the reader is running an application that uses the Virtual Wedge. When in this mode, use standard input functions to retrieve keypad or label input. Wedge mode does not take full advantage of the reader’s power management capabilities. You might notice reduced battery life when in this mode compared to being in either Programmer mode or Desktop mode. For more information on power management, see Chapter 3, “Advanced Programming,” in the JANUS PSK for C/C++ Reference Manual. Programmer Mode Keypad input is echoed to the screen and terminates when you press Enter. Reader commands are executed and saved. Use this mode when the reader is executing IRL commands. In general, when you are running an application that uses the function libraries or software interrupts, the reader should be in Programmer mode.

3-45

Page 212

imGetInputMode – Visual Basic

Desktop Mode The application is responsible for retrieving and displaying input. Keypad entry terminates when you press each key. Use this mode when you need detailed information about a pressed key. Each character returned consists of four bytes: the ASCII code, scan code, and two bytes of keyboard flags (Shift, Ctrl, Alt). For more information about reader input modes, see Chapter 3, “Advanced Programming,” in the JANUS PSK for C/C++ Reference Manual. You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter. See Also:

imSetInputMode

Example ’**************** imGetInputMode ******************* ’ $INCLUDE: ’im20vbas.bi’ CLS ’ Clear the screen PRINT "Setting imProgrammer" imSetInputMode(imProgrammer) inputMode% = imGetInputMode IF inputMode% = imProgrammer THEN PRINT "Set to imProgrammer" ELSEIF inputMode% = imDesktop THEN PRINT "Set to imDesktop" ELSEIF inputMode% = imWedge THEN PRINT "Set to imWedge" ELSE PRINT "Mode error" END IF imSetInputMode(imWedge) END

3-46

Page 213

imGetKeyclick – Visual Basic

3 imGetKeyclick Purpose:

You can configure the reader to emit a click each time a key is pressed. This function returns the current setting (enabled or disabled) of the keyclick.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetKeyclick% (VARPTR(KeyClick), VARSEG(KeyClick))

IN Parameters:

None.

OUT Parameters:

The KeyClick parameter is one of these constants: imEnable imDisable

Keyclick is enabled Keyclick is disabled

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

See Also:

imSetKeyclick

Example ’**************** imGetKeyclick ******************** REM $INCLUDE: ’im20vbas.bi’ status% = imSetKeyclick(imDisable) PRINT "Disabling keyclick" Status% = imGetKeyclick(VARPTR(ctrlKey%), VARSEG(ctrlKey%)) IF ctrlKey% = imEnable THEN PRINT "Keyclick enabled" ELSE PRINT "Keyclick disabled" END IF INPUT "Test it>>",response$ PRINT response$ status% = imSetKeyclick(imEnable) PRINT "Enabling keyclick" INPUT "Test it>>",response$ END

3-47

Page 214

imGetLabelSymbology – Visual Basic imGetLabelSymbology Purpose:

This function gets the symbology, such as Code 39, from the most recently scanned label. Call this function after receiving the data using imReceiveInput.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetLabelSymbology% (VARPTR(Symb), VARSEG(Symb))

IN Parameters:

None.

OUT Parameters:

The Symb parameter is one of these constants: imUnknownDecode imCODABAR imCode11 imCode16k imCode39 imCode49 imCode93 imCode128 imI2Of5 imMSI imPLESSEY imUPC

Unknown bar code Codebar bar code Code 11 bar code Code 16K bar code Code 39 bar code Code 93 bar code Code 49 bar code Code 128 bar code Interleaved 2 of 5 MSI bar code Plessey bar code Universal Product code

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter.

See Also:

imReceiveInput

Example See example for imReceiveInput.

3-48

Page 215

imGetLength – Visual Basic

3 imGetLength Purpose:

This function returns the length of the string received from the designated source by the most recent imReceiveInput function.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetLength%(Source)

IN Parameters:

The Source parameter is one of these constants: imLabelSelect imKeyboardSelect imCom1Select imCom2Select imCom4Select

Label selected Keypad selected COM1 selected COM2, scanner port selected (2010 and 2050) COM4 selected (RF only)

OUT Parameters:

None.

Return Value:

This function returns the length of the last input string read from the designated source.

Notes:

For this function, all COM input is considered to be from the same source. For example, if you call im_receive_input with imCom1Select and again with imCom4Select, then a call to im_get_length with a source of imCom1Select returns the length of the message received from COM4 because that was the last message read from a communications port. You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter.

See Also:

imReceiveInput

Example See example for imReceiveInput.

3-49

Page 216

imGetPostamble – Visual Basic imGetPostamble Purpose:

This function retrieves the current postamble string and its length.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetPostamble% (VARPTR(postString), VARSEG(postString) VARPTR(Length), VARSEG(Length))

IN Parameters:

None.

OUT Parameters:

The postString parameter is the postamble string. The Length parameter is the length of the postamble string.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

You can set the postamble with IC.EXE, with the imCommand function and $+AE command, or by scanning a postamble. Refer to your JANUS user’s manual for more information on configuring a postamble.

See Also:

imGetPreamble, imGetConfigInfo

Example ’**************** imGetPostamble ******************** REM $INCLUDE: 'im20vbas.bi' DIM outstr AS STRING *300 outstr = STRING$(300, CHR$(0)) PRINT "imGetPostamble example: " status% = imGetPostamble(VARPTR(outstr), VARSEG(outstr), VARPTR(count%) VARSEG(count%)) PRINT "Postamble String: "; outstr PRINT "Postamble Length: "; count% PRINT "Status: "; HEX$(status%) END

3-50

Page 217

imGetPreamble – Visual Basic

3 imGetPreamble Purpose:

This function retrieves the current preamble string and its length. REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetPreamble% (VARPTR(preambleStr), VARSEG(preambleStr VARPTR(Length), VARSEG(Length))

IN Parameters:

None.

OUT Parameters:

The preambleStr parameter is the preamble string. The Length parameter is the length of the preamble string.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

You can set the preamble with IC.EXE, with the imCommand function and $+AE command, or by scanning a preamble. Refer to your JANUS user’s manual for more information on configuring a preamble.

See Also:

imGetPostamble, imGetConfigInfo

Example ’**************** imGetPreamble ******************** REM $INCLUDE: 'im20vbas.bi' DIM outstr AS STRING *300 outstr = STRING$(300, CHR$(0)) PRINT "imGetPreamble example: " status% = imGetPreamble(VARPTR(outstr), VARSEG(outstr), VARPTR(count%),VARSEG(count%) PRINT "Preamble String: "; outstr PRINT "Preamble Length: "; count% PRINT "Status: "; HEX$(status%) END

3-51

Page 218

imGetViewportLock – Visual Basic imGetViewportLock Purpose:

This function retrieves the current setting of the viewport lock. When the display is in 80 x 25 mode, you can use the viewport in virtual display mode unless the currently running application program restricts it. The application program may require the viewport to be locked or unlocked.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetViewportLock% (VARPTR(VpLock), VARSEG(VpLock))

IN Parameters:

None.

OUT Parameters:

The VpLock parameter is one of these constants: imEnable imDisable

Viewport is locked Viewport is unlocked

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

The display must be in 80 x 25 mode (see imSetDisplayMode) to use this function. This function has no effect on the JANUS 2050. When the viewport is “locked,” the viewport movement keys do not move the viewport. The viewport can still move if follow-the-cursor mode is enabled.

See Also:

3-52 imSetViewportLock, imSetDisplayMode, imGetDisplayMode, imGetFollowCursor, imSetFollowCursor

Page 219

imGetViewportLock – Visual Basic

3

Example ’**************** imGetViewportLock **************** REM $INCLUDE: ’im20vbas.bi’ status% = imGetViewportLock(VARPTR(viewportLock%), VARSEG(viewportLock%)) PRINT "Viewport is ";viewportLock% status% = imSetViewportLock(imDisable) status% = imGetViewportLock(VARPTR(viewportLock%), VARSEG(viewportLock%)) PRINT "Viewport is ";viewportLock% status% = imSetViewportLock(imEnable) status% = imGetViewportLock(VARPTR(viewportLock%), VARSEG(viewportLock%)) PRINT "Viewport is ";viewportLock% END

3-53

Page 220

imGetWarmBoot – Visual Basic imGetWarmBoot Purpose:

This function retrieves the current setting of the warm boot status. You can enable or disable the Ctrl-Alt-Del warm boot key sequence. When disabled, pressing the Ctrl-Alt-Del key sequence does not reboot the reader.

Syntax:

REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetWarmBoot% (VARPTR(WarmBoot), VARSEG(WarmBoot))

IN Parameters:

None.

OUT Parameters:

The WarmBoot parameter is one of these constants: imEnable imDisable

Ctrl-Alt-Del warm boot is enabled Ctrl-Alt-Del warm boot is disabled

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

See Also:

imSetWarmBoot

Example ’**************** imGetWarmBoot ******************** REM $INCLUDE: ’im20vbas.bi’ status% = imSetWarmBoot(imDisable) PRINT "Disabling <BOOT>" status% = imGetWarmBoot(VARPTR(ctrlKey%), VARSEG(ctrlKey%)) IF ctrlKey% = imEnable THEN PRINT "<BOOT> enabled" ELSE PRINT "<BOOT> disabled" END IF INPUT "Test it1>>",response$ status% = imSetWarmBoot(imEnable) PRINT "Enabling <BOOT>" INPUT "Test it1>>",response$ END

3-54