The text of a manual · part 7 of 37
JANUS PSK for Basic, Version 2.1 Reference Manual, pages 61 to 70
Pages 61 to 70 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 61
imGetContrast – QuickBasic
2
Example ’**************** imGetContrast ******************** REM $INCLUDE: ’im20bas1.bi’ ’ Get contrast status% = imGetContrast (level%) PRINT "Get Contrast status = ", HEX$(status%) PRINT "Contrast level =", level% END
2-35
Page 62
imGetControlKey – QuickBasic imGetControlKey Purpose:
You can enable or disable the Ctrl key. This procedure retrieves the current setting. When you disable this keycode, none of the key combinations that use the Ctrl key will work. For example, the warm boot key sequence Ctrl-Alt-Del will not work.
Syntax:
REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetControlKey% CDECL (ControlKey AS INTEGER)
IN Parameters:
None.
OUT Parameters:
The ControlKey parameter is one of these constants: imEnable imDisable
Ctrl key is enabled Ctrl key is disabled
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
See Also:
imSetControlKey
Example ’**************** imGetControlKey ****************** REM $INCLUDE: ’im20bas1.bi’ status% = imSetControlKey(imEnable) PRINT "Enabling <CTRL>" status% = imGetControlKey(ctrlKey%) IF ctrlKey% = imEnable THEN PRINT "<CTRL> enabled" ELSE PRINT "<CTRL> disabled" END IF INPUT "Test it>>",response$ status% = imSetControlKey(imDisable) PRINT "Disabling <CTRL>" status% = imGetControlKey(ctrlKey%) IF ctrlKey% = imDisable THEN PRINT "<CTRL> disabled" END IF status% = imSetControlKey(imEnable) PRINT "Enabling <CTRL>" END
2-36
Page 63
imGetDisplayMode – QuickBasic
2 imGetDisplayMode Purpose:
This function gets the size mode, video mode, scroll mode, and character height of the display.
Syntax:
REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetDisplayMode% CDECL (SizeMode AS INTEGER, VideoMode AS INTEGER, ScrollMode AS INTEGER, CharHt AS INTEGER)
IN Parameters:
None.
OUT Parameters:
The SizeMode parameter is one of these constants: imSizeMode80X25 imSizeMode40X25 imSizeMode20X16 imSizeMode20X8 imSizeMode10X16 imSizeMode10X8
80 x 25 text mode 40 x 25 text mode (2010 and 2020) 20 x 16 text mode (2010 and 2020) 20 x 8 text mode (2010 and 2020) 10 x 16 text mode (2010 and 2020) 10 x 8 text mode (2010 and 2020)
The VideoMode parameter is only significant if the SizeMode parameter is imSizeMode80X25. The standard BIOS goes up to VideoMode 13H. The reader only supports up to VideoMode 6. The VideoMode parameter is one of these constants: imStdVideoMode0 imStdVideoMode1 imStdVideoMode2 imStdVideoMode3 imStdVideoMode4 imStdVideoMode5 imStdVideoMode6
40 x 25 (use for double-wide character) 40 x 25 (use for double-wide character) 80 x 25 80 x 25 300 x 200 2-color 300 x 200 monochrome 640 x 200 2-color (2050)
2-37
Page 64
imGetDisplayMode – QuickBasic
The ScrollMode parameter is only significant if the SizeMode parameter is imSizeMode80X25. The ScrollMode parameter is one of these constants: imLcdScrollAt25 imLcdScrollAt16 imLcdScrollAt13 imLcdScrollAt8
Scroll at line 25 Scroll at line 16 (2010 and 2020) Scroll at line 13 (2050 and Double-height) Scroll at line 8 (2010 and 2020)
The CharHt parameter is only significant if the SizeMode parameter is imSizeMode80X25. The CharHt parameter is one of these constants: imStandardCharHeight imDoubleCharHeight
Standard-height characters Double-height characters
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
See Also:
imSetDisplayMode
Example ’**************** imGetDisplayMode ***************** REM $INCLUDE: ’im20bas1.bi’ ’ Get Display Mode status% = imGetDisplayMode (dpSize%, dpVideo%, dpScroll%, dpCharHt%) PRINT "Status = ", HEX$(status%) PRINT "Get modes" PRINT "Size = ", dpSize% PRINT "Video = ", dpVideo% PRINT "Scroll = ", dpScroll% PRINT "CharHt = ", dpCharHt% END
2-38
Page 65
imGetDisplayType – QuickBasic
2 imGetDisplayType Purpose:
This function gets the hardware display type, either standard JANUS reader or JANUS 2050.
Syntax:
REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetDisplayType% CDECL (*type AS INTEGER)
IN Parameters:
None.
OUT Parameters:
The type parameter is one of these constants: IMLCD20X16 IMCRT80X25
Standard JANUS display JANUS 2050 display
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
See Also:
imGetDisplayMode, imSetDisplayMode
Example ’**************** imGetDisplayType ***************** REM $INCLUDE: 'im20bas1.bi' PRINT "imGetDisplayType example: " status% = imGetDisplayType(displayType%) IF displayType% = imLCD20X16 THEN PRINT "Display type is Standard JANUS display" ELSE PRINT "Display type is JANUS 2050 display" ENDIF PRINT "Status: "; HEX$(status%) END
2-39
Page 66
imGetFollowCursor – QuickBasic imGetFollowCursor Purpose:
When the display is in 80 x 25 mode, the viewport follows the cursor as it moves. The follow-the-cursor feature can be enabled or disabled. This function retrieves the current setting.
Syntax:
REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetFollowCursor% CDECL (FollowCursor AS INTEGER)
IN Parameters:
None.
OUT Parameters:
The FollowCursor parameter is one of these constants: imEnable imDisable
Follow-the-cursor mode is enabled Follow-the-cursor mode is disabled
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
This function has no effect on the JANUS 2050.
See Also:
imSetFollowCursor, imCursorToViewport, imViewportToCursor
Example ’**************** imGetFollowCursor **************** REM $INCLUDE: ’im20bas1.bi’ status% = imGetFollowCursor(FollowCursor%) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imDisable) status% = imGetFollowCursor(FollowCursor%) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imEnable) status% = imGetFollowCursor(FollowCursor%) PRINT "Follow is ";FollowCursor% END
2-40
Page 67
imGetInputMode – QuickBasic
2 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: ’im20bas1.bi’ FUNCTION imGetInputMode% CDECL ()
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. This mode should be used 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 as well as 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.
2-41
Page 68
imGetInputMode – QuickBasic
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: ’im20bas1.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
2-42
Page 69
imGetKeyclick – QuickBasic
2 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: ’im20bas1.bi’ FUNCTION imGetKeyclick% CDECL (KeyClick AS INTEGER)
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: ’im20bas1.bi’ status% = imSetKeyclick(imDisable) PRINT "Disabling keyclick" Status% = imGetKeyclick(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
2-43
Page 70
imGetLabelSymbology – QuickBasic 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: ’im20bas1.bi’ FUNCTION imGetLabelSymbology% CDECL (Symbology AS INTEGER)
IN Parameters:
None.
OUT Parameters:
The Symbology 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.
2-44