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 17 of 25

JANUS PSK for Ada Reference Manual, pages 161 to 170

Pages 161 to 170 of 250

The original document is the PDF (415 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 161

im_set_viewport_lock

3 im_set_viewport_lock Purpose:

This procedure enables or disables the keys that move the viewport.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_set_viewport_lock ( lock_status: IN IM_CONTROL ) return System.Word;

IN Parameter:

The lock_status parameter is one of the following constants: IM_ENABLE IM_DISABLE

Lock the viewport Unlock the viewport

OUT Parameter:

None.

Return Value:

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

Notes:

The display must be in 80X25 mode for this function to work correctly. This function controls whether the viewport moves (unlocked) or does not move (locked) when the viewport movement keys are pressed. This function has no effect on the JANUS 2050.

See Also:

im_get_viewport_lock, im_set_follow_cursor

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure setviewl Is package STATUS_IO is new INTEGER_IO (System.Word); package SYSWORD_IO is new INTEGER_IO (System.Word); status : System.Word; in_char : Character := ' '; begin status := im_set_viewport_lock (IM_DISABLE); if im_isgood (status)then Put_Line ("VP UNLOCKED"); Put_Line ("q to quit");

3-121

Page 162

im_set_viewport_lock loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Unlock VP error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; in_char := ' '; New_Line; status := im_set_viewport_lock (IM_ENABLE); if im_isgood (status)then Put_Line ("VP LOCKED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Lock VP error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setviewl;

3-122

Page 163

im_set_warm_boot

3 im_set_warm_boot Purpose:

This function enables or disables the Ctrl-Alt-Del warm boot key sequence. When disabled, the Ctrl-Alt-Del key sequence does not reboot the reader.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_set_warm_boot ( warmboot_status_requested : IN IM_CONTROL ) return System.Word;

IN Parameter:

The warmboot_status_requested parameter is one of the following constants: IM_ENABLE IM_DISABLE

Enable Ctrl-Alt-Del warm boot Disable Ctrl-Alt-Del warm boot

OUT Parameter:

None.

Return Value:

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

See Also:

im_get_warm_boot

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure setboot Is package SYSWORD_IO is new INTEGER_IO (System.Word); status : System.Word; in_char : Character := ' '; begin status := im_set_warm_boot (IM_DISABLE); if im_isgood (status)then Put_Line ("Warmboot DISABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Disable Warmboot err = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if;

3-123

Page 164

im_set_warm_boot in_char := ' '; New_Line; status := im_set_warm_boot (IM_ENABLE); if im_isgood (status)then Put_Line ("Warmboot ENABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Enable Warmboot err = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setboot;

3-124

Page 165

im_sound

3 im_sound Purpose:

This function generates a beep of specified pitch and duration. For example, use a soft beep for library use, a loud beep for manufacturing use, or a unique beep to distinguish between other readers.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_sound ( pitch, : IN System.Word; duration : IN System.Word; volume : IN System.Word ) return System.Word;

IN Parameter:

The pitch parameter is the frequency of the beep you want the reader to make. The numeric range for pitch is from 20 to 20,000 Hz. You can also use one of the following constants: IM_HIGH_PITCH IM_LOW_PITCH IM_VERY_LOW_PITCH

2400 Hz 1200 Hz 600 Hz

The duration parameter is the length of the beep. The numeric range for duration is from 1 to 65,000 ms. You can also use one of the following constants: IM_BEEP_DURATION IM_CLICK_DURATION

50 ms 4 ms

The volume parameter is one of the following constants: IM_OFF_VOLUME IM_QUIET_VOLUME IM_NORMAL_VOLUME IM_LOUD_VOLUME IM_EXTRA_LOUD_VOLUME IM_CURRENT_VOLUME OUT Parameter:

Volume is off Volume is quiet Volume is normal Volume is loud Volume is extra loud Volume is the current volume

None.

3-125

Page 166

im_sound

Return Value:

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

Example With System, Intrmecd_IO, Intrmecp_IO; Use System, Intrmecd_IO, Intrmecp_IO; procedure sound Is C0 : Constant System.Word := 262; D0 : Constant System.Word := 296; E0 : Constant System.Word := 330; F0 : Constant System.Word := 349; G0 : Constant System.Word := 392; A0 : Constant System.Word := 440; B0 : Constant System.Word := 494; C1 : Constant System.Word := 523; D1 : Constant System.Word := 587; E1 : Constant System.Word := 659; F1 : Constant System.Word := 698; G1 : Constant System.Word := 784; A1 : Constant System.Word := 880; B1 : Constant System.Word := 988; EIGHTH : Constant System.Word := 125; QUARTER : Constant System.Word := 250; HALF : Constant System.Word := 500; WHOLE : Constant System.Word := 1000; END_NOTE : Constant System.Word := 0; type song is array (1..8, 1..3) of System.Word; this_song : song := ( (C1, HALF, 2), (G0, HALF, 2), (A0, HALF, 2), (E0, HALF, 2), (F0, HALF, 2), (E0, QUARTER, 2), (D0, QUARTER, 2), (C0, WHOLE, 2) ); note : Integer; status : System.Word; begin for note in 1..8 loop status := im_sound (this_song(note,1), this_song(note,2), this_song(note,3)); end loop; end sound;

3-126

Page 167

im_standby_wait

3 im_standby_wait Purpose:

This function requests that reader services wait in standby mode for a specific period of time. You use this function to suspend the reader for a length of time to save the battery power.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_standby_wait ( timeout : IN System.Word ) return System.Word;

IN Parameters:

The timeout parameter is the amount of time to wait in standby mode. You can exit the function before data is received or before the timeout occurs by performing an application break sequence (see your JANUS user’s manual). The return status indicates whether the function was successful, a timeout occurred, or the application break was received. The numeric range for timeout is from 1 to 65,534 ms. You can also use one of the following constants: IM_ZERO_TIMEOUT IM_INFINITE_TIMEOUT

No wait Wait forever

If IM_INFINITE_TIMEOUT is selected, the function will not return until the end of message character has been received. OUT Parameter:

None.

Return Value:

This function returns one of the standard status codes listed 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” in Chapter 2, “Working With Ada.”

See Also:

None.

3-127

Page 168

im_standby_wait

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure standby Is status : System.Word; begin -- RWTSR must be installed for this to work correctly Put_Line ("Start waiting for 5 seconds"); status := im_standby_wait (5000); Put_Line ("Done waiting for 5 seconds"); end standby;

3-128

Page 169

im_transmit_buffer

3 im_transmit_buffer Purpose:

This function transmits the contents of a data buffer through a designated communications port. This function continues operating until the buffer transmission is complete or until an error status is detected.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_transmit_buffer ( port : IN IM_COM_PORT; user_length : IN System.Word; buffer : IN System.Address; timeout : IN System.Word ) return System.Word;

IN Parameter:

The port parameter identifies the communications port as follows: IM_COM1 IM_COM2 IM_COM4

COM1 COM2, scanner (2010 and 2050) COM4 (RF only)

The user_length parameter is the length of the data string that you want to transmit. The buffer parameter is the address of the string that you want to transmit. The timeout parameter is the transmission timeout period. You can exit the function before data is sent or before the timeout occurs by performing an application break sequence (see your JANUS user’s manual). The return status indicates whether the function was successful, a timeout occurred, or the application break was received. The numeric range for timeout is from 1 to 65,534 ms. You can also use one of the following constants: IM_ZERO_TIMEOUT IM_INFINITE_TIMEOUT

No wait Wait forever

If IM_INFINITE_TIMEOUT is selected, the function will not return until the end of message character has been received.

3-129

Page 170

im_transmit_buffer

OUT Parameter:

None.

Return Value:

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

Notes:

You must install a protocol handler to use this function.

See Also:

im_receive_buffer, im_transmit_buffer_no_wait, im_transmit_buffer_noprot

Example See example for im_receive_buffer.

3-130