The text of a manual · part 21 of 37
JANUS PSK for Basic, Version 2.1 Reference Manual, pages 201 to 210
Pages 201 to 210 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 201
imGetConfigInfo – Visual Basic
3 imGetConfigInfo Purpose:
This function retrieves the current reader configuration information string and its length.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetConfigInfo% (VARPTR(conString), VARSEG(conString), VARPTR(length), VARSEG(length)
IN/OUT Parameters:
The conString parameter is the configuration information string. The first two characters specify the type of configuration information returned. For example, to get the beep duration setting, pass in “BD” for conString. The function returns BD and the current configuration for beep duration. The length parameter is the length of the configuration information string. For a list of the configuration commands, see your JANUS user’s manual.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
This function differs from imCommand in that you only pass the twocharacter command identifier. The imCommand function passes an entire command string.
See Also:
imCommand
3-35
Page 202
imGetConfigInfo – Visual Basic
Example ’**************** imGetConfigInfo *************** REM $INCLUDE: 'im20vbas.bi' DIM outstr AS STRING *300 outstr = STRING$(300, CHR$(0)) outstr$ = "BV" + CHR$(0) PRINT "ImGetConfigInfo example: " status% = imGetConfigInfo(VARPTR(outstr), VARSEG(outstr), VARPTR(count%), VARSEG(count%)) PRINT "Beep Volume: "; outstr PRINT "Length: "; count% PRINT "Status: "; HEX$(status%) END
3-36
Page 203
imGetContrast – Visual Basic
3 imGetContrast Purpose:
This function gets the reader’s LCD display contrast level. There are eight levels of contrast (0 to 7) from very light to very dark, which are the most frequently used contrast settings.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetContrast% (VARPTR(DispContLevel), VARSEG(DispContLevel))
IN Parameters:
None.
OUT Parameters:
The DispContLevel parameter is a number from 0 to 7 or is one of these constants: imMinContrast imMaxContrast
0 1
Minimum contrast Maximum contrast
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
The functions im_set_contrast and im_get_contrast use a scale of 0 to 7 that is related to the scale of 0 to 31 used by im_increase_contrast and im_decrease_contrast. The following table compares the two scales. This Value on Scale 0 to 7
Equates to This Value on Scale 0 to 31
Contrast Level
0 1 2 3 4 5 6 7
10 12 14 16 18 20 22 24
Very light
Very dark
This function has no effect on the JANUS 2050. See Also:
imSetContrast, imDecreaseContrast, imIncreaseContrast
3-37
Page 204
imGetContrast – Visual Basic
Example ’**************** imGetContrast ******************** REM $INCLUDE: ’im20vbas.bi’ ’ Get contrast status% = imGetContrast (VARPTR(level%), VARSEG(level%)) PRINT "Get Contrast status = ", HEX$(status%) PRINT "Contrast level =", level% END
3-38
Page 205
imGetControlKey – Visual Basic
3 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: ’im20vbas.bi’ FUNCTION imGetControlKey% (VARPTR(ControlKey), VARSEG(ControlKey))
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
3-39
Page 206
imGetControlKey – Visual Basic
Example ’**************** imGetControlKey ****************** REM $INCLUDE: ’im20vbas.bi’ status% = imSetControlKey(imEnable) PRINT "Enabling <CTRL>" status% = imGetControlKey(VARPTR(ctrlKey%), VARSEG(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(VARPTR(ctrlKey%), VARSEG(ctrlKey%)) IF ctrlKey% = imDisable THEN PRINT "<CTRL> disabled" END IF status% = imSetControlKey(imEnable) PRINT "Enabling <CTRL>" END
3-40
Page 207
imGetDisplayMode – Visual Basic
3 imGetDisplayMode Purpose:
Syntax:
This function gets the size mode, video mode, scroll mode, and character height of the display. REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetDisplayMode% (VARPTR(SizeMode), VARSEG(SizeMode), VARPTR(VideoMode), VARSEG(VideoMode), VARPTR(ScrollMode), VARSEG(ScrollMode), VARPTR(CharHt), VARSEG(CharHt))
IN Parameters:
None.
OUT Parameters:
The SizeMode parameter is required and 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)
If imSizeMode80X25 is set, you also need to set the video mode, scroll mode, and character height. If any other SizeMode is set, the other parameters are automatically set. The VideoMode parameter requires imSizeMode80X25. The standard PC BIOS supports up to video mode 13H. The reader only supports up to video mode 6. You can also set video modes 0 through 3 with IC.EXE. 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)
3-41
Page 208
imGetDisplayMode – Visual Basic
The ScrollMode parameter requires imSizeMode80X25 and 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 requires imSizeMode80X25 and is one of these constants: imStandardCharHeight
Standard-height characters, applies to all scroll modes except line 8 and line 13 imDoubleCharHeight
Double-height characters, applies only to scroll at line 8 and line 13
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
See Also:
imSetDisplayMode
Example ’**************** imGetDisplayMode ***************** REM $INCLUDE: ’im20vbas.bi’ ’ Get Display Mode status% = imGetDisplayMode (VARPTR(dpSize%), VARSEG(dpSize%), VARPTR(dpVideo%), VARSEG(dpVideo%), VARPTR(dpScroll%), VARSEG(dpScroll%), VARPTR(dpCharHt%), VARSEG(dpCharHt%)) PRINT "Status = ", HEX$(status%) PRINT "Get modes" PRINT "Size = ", dpSize% PRINT "Video = ", dpVideo% PRINT "Scroll = ", dpScroll% PRINT "CharHt = ", dpCharHt% END
3-42
Page 209
imGetDisplayType – Visual Basic
3 imGetDisplayType Purpose:
This function gets the hardware display type, either standard JANUS reader or JANUS 2050.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ FUNCTION imGetDisplayType% (VARPTR(type), VARSEG(type))
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 REM $INCLUDE: 'im20vbas.bi' PRINT "imGetDisplayType example: " status% = imGetDisplayType(VARPTR(displayType%), VARSEG(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
3-43
Page 210
imGetFollowCursor – Visual Basic 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: ’im20vbas.bi’ FUNCTION imGetFollowCursor% (VARPTR(FolCursor%), VARSEG (FolCursor%))
IN Parameters:
None.
OUT Parameters:
The FolCursor% 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: ’im20vbas.bi’ status% = imGetFollowCursor(VARPTR(FollowCursor%), VARSEG(FollowCursor%)) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imDisable) status% = imGetFollowCursor(VARPTR(FollowCursor%), VARSEG(FollowCursor%)) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imEnable) status% = imGetFollowCursor(VARPTR(FollowCursor%), VARSEG(FollowCursor%)) PRINT "Follow is ";FollowCursor% END
3-44