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 16 of 28

6400 PSK Reference Manual, pages 151 to 160

Pages 151 to 160 of 272

The original document is the PDF (1.1 MB). 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 6400

Page 151

im_set_viewport_lock

5 im_set_viewport_lock Purpose:

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

Syntax:

#include "im64psk.h" IM_STATUS im_set_viewport_lock (IM_CONTROL view_lock);

IN Parameters:

OUT Parameters: Return Value:

view_lock One of these constants: IM_ENABLE

Lock the viewport (keys cannot move viewport).

IM_DISABLE

Unlock the viewport.

None This function returns one of these codes: IM_SUCCESS

Successfully locked.

IM_VP_DISABLED Viewporting disabled; viewport can only be unlocked while viewporting is enabled. See Also:

im_get_viewport_lock, im_set_follow_cursor

Example See example for im_get_viewport_lock.

5-95

Page 152

im_set_viewporting im_set_viewporting Purpose:

This function enables and disables viewporting without changing the viewport lock. When viewporting is enabled, the terminal accepts viewport movement commands.

Syntax:

#include “im64psk.h” void im_set_viewporting (IM_CONTROL viewport);

IN Parameters:

viewport Flag that is one of these constants: IM_ENABLE Enable viewporting. IM_DISABLE

OUT Parameters:

None

Return Value:

None

Notes:

See Also:

Disable viewporting.

If viewporting is enabled, the terminal accepts viewport movement commands, including follow-the-cursor mode. All cursor positioning is relative to the virtual display. When viewporting is enabled, the viewport is unlocked. Disabling the viewport locks the viewport. To lock the viewport while viewporting is enabled, call im_set_viewport_lock. im_get_viewport_lock, im_set_follow_cursor, im_set_viewport_lock

Example See example for im_receive_field.

5-96

Page 153

im_setup_follow_cursor

5 im_setup_follow_cursor Purpose:

This function specifies how close the cursor can get to the edge of the viewport, and how far it should move when follow-the-cursor is enabled. Viewport movement is bounded by the virtual screen.

Syntax:

#include "im64psk.h" IM_STATUS im_setup_follow_cursor (IM_UCHAR side_boundary, IM_UCHAR vert_boundary, IM_UCHAR side_move, IM_UCHAR vert_move);

IN Parameters:

side_boundary Defines the right edge limit. The viewport moves when the cursor is within the specified number of characters from the edge. This parameter provides compatibility with previous psk.libraries. vert_boundary Defines top and bottom edge limit. The viewport moves when the cursor is within the specified number of characters from the top or bottom. This parameter provides compatibility with previous psk.libraries. side_move The viewport moves left and right in increments of 2. This parameter is for compatability with other PSK versions and cannot be modified vert_move The viewport moves up and down in increments of one. This parameter is for compatability with other PSK versions and cannot be modified.

OUT Parameters: Return Value:

None This function returns one of these codes: IM_SUCCESS Success. IM_TO_FAR

Notes:

Moving this distance would move the viewport past the cursor.

Viewport movement is bounded by the virtual screen. If moving the viewport by the set increment would move the viewport off the virtual screen, a smaller movement value is used.

5-97

Page 154

im_setup_follow_cursor im_setup_follow_cursor (continued) Example /********************* im_setup_follow_cursor ************************/ #include <string.h> #include <conio.h> #include “im64psk.h” void main ( void ) { im_clear_screen(); /* Have to enable viewporting before using any viewport display function */ im_set_viewporting( IM_ENABLE ); im_set_follow_cursor( IM_ENABLE ); im_puts((IM_UCHAR *)"setting follow cursor to center",0); im_setup_follow_cursor( 10,8,1,1 ); getch(); im_puts((IM_UCHAR *)"setting follow cursor to overlap but move 1",IM_NORMAL); im_setup_follow_cursor( 18,14,1,1 ); getch(); im_puts((IM_UCHAR *)"Setting follow cursor back to the default value",IM_NORMAL); im_setup_follow_cursor( 1,1,10,8 ); getch(); }

5-98

Page 155

im_sound

5 im_sound Purpose:

This function generates a beep of specified pitch and duration. For example, use no beep or a short beep for library use, a long beep for manufacturing use, or a unique beep to distinguish among other 6400s.

Syntax:

#include "im64psk.h" IM_STATUS im_sound (IM_USHORT pitch, IM_USHORT duration, IM_USHORT volume);

IN Parameters:

pitch Specifies the frequency of the beep you want the 6400 to make. Either enter a number from 20 to 8189 to indicate the pitch, or choose one of these constants: IM_HIGH_PITCH 2400 Hz IM_LOW_PITCH 1200 Hz IM_VERY_LOW_PITCH 600 Hz duration Specifies the length of the beep. Either enter a number from 2 to 79,999 ms to indicate the duration of the beep, or choose one of these constants: IM_BEEP_DURATION 50 ms IM_CLICK_DURATION 5 ms volume Specifies the volume. Choose one of these constants: IM_OFF_VOLUME Off IM_QUIET_VOLUME Quiet IM_NORMAL_VOLUME

Normal

IM_LOUD_VOLUME Loud IM_EXTRA_LOUD_VOLUME Extra loud IM_CURRENT_VOLUME Use volume from configuration menu OUT Parameters: Return Value:

None. This function returns one of these codes: IM_SUCCESS Successful beep IM_INVALID_PITCH

Pitch is outside the allowed range

IM_INVALID_VOLUME Volume is outside the allowed range

5-99

Page 156

im_standby_wait im_standby_wait Purpose:

This function places the application and 6400 in standby mode for a specific period of time to save the battery power.

Syntax:

#include "im64psk.h" IM_STATUS far im_standby_wait (IM_USHORT iTimeout);

IN Parameters: OUT Parameters: Return Value:

5-100 iTimeout Specifies the amount of time to wait in standby mode. Enter a number from 1 to 65,535 (resolution of 10 ms) to indicate the length of the timeout in milliseconds. None. IM_SUCCESS Success.

Page 157

im_status_line

5 im_status_line Purpose:

This function briefly displays an error message in the status line without wrapping or scrolling the display. The status line is displayed until a key is pressed or a time out occurs. The original contents of the line reappear after the message is erased.

Syntax:

#include "im64psk.h" int far im_status_line (char far *msg IM_BOOL wait IM_USHORT row);

IN Parameters:

msg Pointer to the error message string to display. wait Specifies if the application should wait for a key to be pressed. Choose one of these values: 0

Do not wait for a key.

non-zero Pause until any key is pressed or until a timeout occurs. row Row number to display the message in. If this number is larger than the number of visible rows, the last row is used. The first row is 0. OUT Parameters: Return Value: Notes:

None. Returns 0 or the key pressed to terminate waiting. If the wait parameter is set, the message will be erased after 20 seconds or when a key is pressed. Then, the screen is refreshed to look as it did before displaying the message.

5-101

Page 158

im_transmit_buffer im_transmit_buffer Purpose:

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

Syntax:

#include "im64psk.h" IM_STATUS im_transmit_buffer (IM_COM_PORT port_id, IM_USHORT length, IM_UCHAR far *data_buffer, IM_LTIME timeout);

IN Parameters:

port_id Identifies the communications port. Use this constant: IM_COM1 COM1 selected IM_NET length

Network selected

Length of the buffer.

data_buffer Far pointer to the data array that you want to transmit. timeout Specifies the transmit timeout period. Either enter a number from 0 to 65,534 to indicate the length of the timeout in milliseconds, or choose one of these constants: IM_INFINITE_NET_TIMEOUT IM_ZERO_TIMEOUT OUT Parameters: Return Value:

Never timeout

No wait

None. This function returns one of these codes: IM_SUCCESS Transmit completed IM_NOT_READY Network is not active or not properly configured IM_NET_BAD_DATA

Data pointer is null or invalid data length

IM_NET_DATA_LENGTH Data length exceeds 1K IM_NET_CONFIG_ERROR Incorrect configuration or hardware fault Notes:

See Also:

5-102

Once the transmission begins, program control remains inside this function until the transmission is completed. There is no way to check the transmission status while transmitting. To receive data from the radio network, im_transmit_buffer requires that you provide radio parameters such as the terminal number, host identification, or LAN identification at one time per application. The inquiry impacts all functions that provide radio communication (im_receive_field, im_receive_input, im_receive_buffer). im_receive_buffer

Page 159

im_transmit_buffer

5 im_transmit_buffer (continued) Example /********************* im_transmit_buffer ****************************/ #include <string.h> #include <conio.h> #include "stdio.h" #include "im64psk.h" void main ( void ) { char szTxBuffer[1024]; IM_STATUS iStatus; im_clear_screen(); strcpy ( szTxBuffer, "MSG_HEADER,Testing Message 1, 2, 3, ..." ); iStatus = im_transmit_buffer ( IM_COM1, strlen(szTxBuffer), szTxBuffer, 5000 ); if(iStatus == IM_SUCCESS) { printf("\nData sent: %s\n", szTxBuffer); } else { im_cputs("\nTransmit Buffer Error: "); im_message(iStatus); } getch(); }

5-103

Page 160

im_transmit_buffer_no_wait im_transmit_buffer_no_wait Purpose:

This function transmits the contents of a buffer and passes control back to its client.

Syntax:

#include <im64psk.h> IM_STATUS im_transmit_buffer_no_wait (IM_COM_PORT port_id, IM_COM_DATA_BUFFER far *data_struct);

IN Parameters:

The port_id parameter identifies the communications port as follows: IM_COM1

COM1

IM_COM2

COM2, scanner port (2010 and 2050)

IM_COM4

COM4 (RF only)

The data_struct parameter is a far pointer to the data array that you want to transmit. OUT Parameters: Return Value:

Notes:

None. This function returns one of the standard status codes defined in Appendix A, "Status Codes." You must install a protocol handler to use this function. This function differs from im_transmit_buffer in that the client must set the buffer structure and monitor the buffer status until transmission is complete. Use this function for multiple buffer transmissions in conjunction with checking the status in data_struct. You must build and maintain a data_struct of the type IM_COM_DATA_BUFFER as described in IM20LIB.H.

See Also:

5-104 im_transmit_buffer_noprot, im_cancel_tx_buffer