The text of a manual · part 2 of 36
Trakker Antares Application Development Tools System Manual: Part I - Trakker Antares PSK Reference Manual, pages 5 to 14
Pages 5 to 14 of 340, from Trakker Antares Application Development Tools System Manual
The original document is the PDF (1.6 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.
Filed in the catalog under the Intermec 2420, Intermec 2425, Intermec 2435 and Intermec 2481
Page 5
fatermec Cy Reference Manual hous
Trakker Antares Programmer's Software Kit (PSK)
Page 6
Intermec Technologies Corporation Corporate Headquarters 6001 36th Ave. W. Everett, WA 98203 U.S.A. www.intermec.com The information contained herein is proprietary and is provided solely for the purpose of allowing customers to operate and service Intermec-manufactured equipment and is not to be released, reproduced, or used for any other purpose without written permission of Intermec. Information and specifications contained in this document are subject to change without prior notice and do not represent a commitment on the part of Intermec Technologies Corporation. © 2004 by Intermec Technologies Corporation. All rights reserved. The word Intermec, the Intermec logo, Norand, ArciTech, CrossBar, Data Collection Browser, dcBrowser, Duratherm, EasyCoder, EasyLAN, Enterprise Wireless LAN, EZBuilder, Fingerprint, i-gistics, INCA (under license), InterDriver, Intermec Printer Network Manager, IRL, JANUS, LabelShop, Mobile Framework, MobileLAN, Nor*Ware, Pen*Key, Precision Print, PrintSet, RoutePower, TE 2000, Trakker Antares, UAP, Universal Access Point, and Virtual Wedge are either trademarks or registered trademarks of Intermec Technologies Corporation. Throughout this manual, trademarked names may be used. Rather than put a trademark (™ or ®) symbol in every occurrence of a trademarked name, we state that we are using the names only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringement. There are U.S. and foreign patents pending. Microsoft, Windows, and the Windows logo are registered trademarks of Microsoft Corporation in the United States and/or other countries. Borland and the Borland Logo are registered trademarks of Borland Software Corporation in the United States and other countries.
ii
Trakker Antares PSK Reference Manual
Page 7
Document Change Record
This page records changes to this document. The document was originally released as version 001. Version
Date
Description of Change
002
5/1997
Updated for Version 2.0 software release:
• Added support for RS-232 serial communications. • Updated list of certified functions for file manipulation. • Updated status return code values in Appendix A. • Added information on CodePage 850, Western European character set support. Added information on building an application from a command prompt and added information on the FileCopy Utility. Updated information on Microsoft C/C++ version 1.52 and version 5.0. 003
4/1998
Updated for Version 3.0 software release.
004
1/1999
Updated for Version 4.0 software release by adding five new application functions. Identified five functions that are only valid on a 248X with the enhanced input/output board option. Made corrections and revisions throughout the manual. Added an addendum (P/N 068343-001) for new application functions after revisions mentioned above.
005
7/1999
Updated for Version 4.1 software release. Added new functions: im_putchar_kana_8x16, im_puts_kana_8x16. Added support for the 2410 and 2415 terminals. Incorporated addendum (P/N 068343-001) into the manual.
006
1/2000
Updated for Version 4.2 software release. Added information on using the PSK with Trakker Antares terminals that are running DOS .EXE programs.
007
2/2001
Added DisplayUserBMP function and clarified use of imstdio.h.
008
9/2001
Updated for Version 4.4 software release. Incorporated addendum (P/N 071867-001), which included information on using the Berkeley Software Distribution (BSD) sockets interface. Added information to support the 243X terminals.
009
6/2004
Updated for Version 5.0 software release:
• Included references to Borland Turbo C++ 4.5. • Added the im_get_rx_status and im_set_no_autosend functions. • Included an enhanced description of the PSK, more information about BSD sockets, and general programming guidelines for the network communications functions.
• Added references to the Trakker Antares 2475 Vehicle-Mount Terminal. • Added references to the Intermec Gateway.
Trakker Antares PSK Reference Manual iii
Page 8
iv
Trakker Antares PSK Reference Manual
Page 9
Contents
Contents Before You Begin.............................................................................................................. xiii Safety Summary................................................................................................... xiii Safety Icons ..........................................................................................................xiv Global Services and Support .................................................................................xiv Who Should Read This Document? ......................................................................xv Related Documents ..............................................................................................xvi
1
Getting Started ............................................................................................................................... 1 What Is the Trakker Antares PSK?....................................................................................... 2 What’s New In This Revision .............................................................................................. 2 Installing the Programmer’s Software Kit............................................................................. 2 Copying FileCopy to Another PC........................................................................... 3 Trakker Antares PSK Version Requirements ........................................................... 4 Microsoft Visual C/C++ ............................................................................ 4 Borland Turbo C++................................................................................... 4
2
Programming Guidelines ......................................................................................................... 5 What Is the PSK Library?..................................................................................................... 6 Communications Functions................................................................................................. 6 BSD Sockets ........................................................................................................... 8 Using the sockaddr_in Structure................................................................ 8 Display Functions................................................................................................................ 9 Input Functions................................................................................................................. 10 Sound Function................................................................................................................. 11 Status Code Macros ........................................................................................................... 12 System Functions............................................................................................................... 13 Viewport Functions ........................................................................................................... 14 Certified Microsoft C Functions ........................................................................................ 15 Buffer Manipulation Functions............................................................................. 16 Character Functions ............................................................................................. 17 Data Conversion Functions .................................................................................. 17 File Functions....................................................................................................... 17 Math Functions .................................................................................................... 18 Memory Functions ............................................................................................... 18 String Functions ................................................................................................... 18 Time Functions .................................................................................................... 19
Trakker Antares PSK Reference Manual v
Page 10
Contents
Miscellaneous Functions....................................................................................... 19 Unsupported Microsoft C/C++ Functions ......................................................................... 19
3 Building Applications
............................................................................................................... 23
Programming Guidelines for Network Communications ................................................... 24
Building a Sample Program ............................................................................................... 25 Building a .BIN Program Using Microsoft Visual C/C++ .................................................. 26 Converting an Application to a Binary File ........................................................... 28 Building a DOS .EXE Program Using Microsoft Visual C/C++......................................... 28 Building Your Own Program From a Command Line ....................................................... 29 Downloading Applications................................................................................................. 31 Using the Serial Port to Transfer Applications and Files........................................ 31 Using the DCS 300 to Download Applications .................................................... 32
4
Converting Trakker Antares and JANUS Applications .......................................... 33 Differences Between Trakker Antares PSK Functions and JANUS PSK Functions ............ 34 Creating Compatible Applications ..................................................................................... 34 Compatible Functions .......................................................................................... 35 Using Status Code Macros.................................................................................... 35 Creating Your Own Include File........................................................................... 36 Renaming a Function .............................................................................. 37 Defining Function Values........................................................................ 37 Converting Applications: Trakker Antares to JANUS ........................................................ 37 Changing Viewport Functions .............................................................................. 39 Changing Display Modes...................................................................................... 39 Converting Applications: JANUS to Trakker Antares ........................................................ 40 Changing Viewport Functions .............................................................................. 42 Changing Display Modes...................................................................................... 42 Using Input Modes............................................................................................... 43 Wedge Mode ........................................................................................... 43 Programmer Mode .................................................................................. 43 Desktop Mode......................................................................................... 43 Setting Timeout Values ........................................................................................ 44
5 PSK Function Descriptions
.................................................................................................... 45
Understanding the Function Descriptions ......................................................................... 46 function_name .................................................................................................................. 46 vi
Trakker Antares PSK Reference Manual
Page 11
Contents bind................................................................................................................................... 47 closesocket ......................................................................................................................... 47 connect.............................................................................................................................. 48 DisplayUserBMP............................................................................................................... 49 fcntlsocket ......................................................................................................................... 50 im_battery_status............................................................................................................... 51 im_clear_screen ................................................................................................................. 52 im_closedir ........................................................................................................................ 52 im_command .................................................................................................................... 53 im_cputs............................................................................................................................ 54 im_cursor_to_viewport...................................................................................................... 55 im_dbyte_symbology_set................................................................................................... 56 im_display_thai_char......................................................................................................... 56 im_erase_display................................................................................................................ 57 im_erase_line..................................................................................................................... 58 im_event_wait ................................................................................................................... 60 im_file_duplicate ............................................................................................................... 62 im_file_size........................................................................................................................ 64 im_file_time ...................................................................................................................... 64 im_flush_rcv_buffer .......................................................................................................... 65 im_fmalloc ........................................................................................................................ 66 im_free .............................................................................................................................. 67 im_free_mem .................................................................................................................... 67 im_free_space .................................................................................................................... 68 im_get_config_info............................................................................................................ 68 im_get_cursor_style ........................................................................................................... 70 im_get_cursor_xy .............................................................................................................. 70
Trakker Antares PSK Reference Manual vii
Page 12
Contents im_get_display_mode........................................................................................................ 71 im_get_display_size_physical ............................................................................................. 73 im_get_display_size_virtual ............................................................................................... 74 im_get_display_type .......................................................................................................... 75 im_get_follow_cursor ........................................................................................................ 76 im_get_input_mode .......................................................................................................... 77 im_get_IP_addr (gethostbyname) ...................................................................................... 78 im_get_label_symbology.................................................................................................... 80 im_get_label_symbologyid................................................................................................. 82 im_get_length.................................................................................................................... 87 im_get_rcv_errors.............................................................................................................. 88 im_get_relay ...................................................................................................................... 89 im_get_rx_status................................................................................................................ 90 im_get_screen_char ........................................................................................................... 91 im_get_sensor_all .............................................................................................................. 92 im_get_sensor_input ......................................................................................................... 93 im_get_system_julian_date................................................................................................ 94 im_get_text........................................................................................................................ 94 im_get_tx_status................................................................................................................ 97 im_get_viewport_lock ....................................................................................................... 99 im_get_viewporting......................................................................................................... 101 im_input_status............................................................................................................... 103 im_irl_a........................................................................................................................... 104 im_irl_k........................................................................................................................... 107 im_irl_n .......................................................................................................................... 109 im_irl_v........................................................................................................................... 112 im_irl_y........................................................................................................................... 116 viii
Trakker Antares PSK Reference Manual
Page 13
Contents
IM_ISERROR................................................................................................................. 118 IM_ISGOOD ................................................................................................................. 119 IM_ISSUCCESS ............................................................................................................. 120 IM_ISWARN.................................................................................................................. 120 im_message...................................................................................................................... 121 im_offset_dbyte ............................................................................................................... 122 im_opendir...................................................................................................................... 122 im_overlay_setup............................................................................................................. 123 im_overlay_status ............................................................................................................ 125 im_put_text..................................................................................................................... 126 im_putchar ...................................................................................................................... 127 im_putchar_dbyte ........................................................................................................... 127 im_putchar_kana_8x16 ................................................................................................... 128 im_puts ........................................................................................................................... 129 im_puts_dbyte................................................................................................................. 130 im_puts_kana_8x16 ........................................................................................................ 132 im_puts_mixed................................................................................................................ 133 im_readdir ....................................................................................................................... 134 im_receive_buffer ............................................................................................................ 134 im_receive_field............................................................................................................... 137 im_receive_file................................................................................................................. 144 im_receive_input ............................................................................................................. 145 im_set_cursor_style ......................................................................................................... 149 im_set_cursor_xy............................................................................................................. 149 im_set_display_mode ...................................................................................................... 150 im_set_eom ..................................................................................................................... 151 im_set_follow_cursor....................................................................................................... 153
Trakker Antares PSK Reference Manual ix
Page 14
Contents im_set_input_mode......................................................................................................... 153 im_set_mixed_mode........................................................................................................ 154 im_set_no_autosend ........................................................................................................ 155 im_set_optical_callback ................................................................................................... 156 im_set_relay..................................................................................................................... 158 im_set_repeat_key ........................................................................................................... 158 im_set_scanning .............................................................................................................. 159 im_set_screen_size ........................................................................................................... 159 im_set_thai_cursor_mode................................................................................................ 160 im_set_time_event........................................................................................................... 161 im_set_validation_callback .............................................................................................. 162 im_set_viewport_lock...................................................................................................... 163 im_set_viewporting ......................................................................................................... 163 im_setup_follow_cursor................................................................................................... 164 im_setup_manual_viewporting........................................................................................ 166 im_sound......................................................................................................................... 168 im_standby_wait ............................................................................................................. 170 im_status_line.................................................................................................................. 170 im_tcp_reconnect_notify................................................................................................. 171 im_timed_status_line....................................................................................................... 172 im_tm_callback_cancel.................................................................................................... 173 im_tm_callback_register .................................................................................................. 174 im_transmit_buffer.......................................................................................................... 177 im_transmit_buffer_no_wait ........................................................................................... 180 im_transmit_buffer_no_wait_t ........................................................................................ 182 im_transmit_file .............................................................................................................. 186 im_udp_close_socket....................................................................................................... 188 x
Trakker Antares PSK Reference Manual