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 5 of 36

Trakker Antares Application Development Tools System Manual: Part I - Trakker Antares PSK Reference Manual, pages 35 to 44

Pages 35 to 44 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 35

Chapter 2, Programming Guidelines

Certified Microsoft C Functions This table lists all Microsoft C functions that work with the PSK library functions; however, the equivalent Borland C functions are also supported. The PSK does not support C++, classes, application-wide constructors or destructors, or Windows functions. Note: The Trakker Antares PSK version 4.4 and earlier requires Microsoft Visual C/C++ Professional Edition v1.0 or v1.5x. The Trakker Antares PSK version 5.0 and later requires Borland Turbo C++ version 4.5. For more information, see “Trakker Antares PSK Version Requirements” on page 4. Certified Microsoft C Functions For the Trakker PSK Library _cabs

_fstrnicmp

_putch ceil

_cputs

_fstrnset

_rotl clock

_ecvt

_fstrpbrk

_rotr cos

_fabs

_fstrrchr

_strdup cosh

_fatexit

_fstrrev

_stricmp cputs

_fcloseall

_fstrset

_strlwr ctime

_fcvt

_fstrspn

_strnicmp difftime

_ffree

_fstrtok

_strnset div

_fmalloc

_ftime

_strrev errno

_fmemccpy

_gcvt

_strset exit

_fmemchr

_getch

_strupr exp

_fmemcmp

_getchar

_swab fabs

_fmemcpy

_getche

_toascii fclose

_fmemicmp

_hypot

_tolower fcloseall

_fmemmove

_isascii

_toupper feof

_fmemset

_iscsym

_ultoa ferror

_FP_OFF

_iscsymf

_ungetch fflush

_FP_SEG

_itoa abs fgetc

_fstrcat

_lrotl acos fgets

_fstrcmp

_lrotr asctime floor

_fstrcpy

_ltoa asin fmod

_fstrcspn

_max atan fopen

_fstricmp

_memccpy atan2 fputs

_fstrlen

_memicmp atof fprintf

_fstrlwr

_min atoi fread

_fstrncat

_nstrdup atol free

_fstrncmp

_onexit calloc frexp

Trakker Antares PSK Reference Manual

15

Page 36

Chapter 2, Programming Guidelines

Certified Microsoft C Functions For the Trakker PSK Library (continued) fscanf fseek

1 localtime rand strncpy log remove strpbrk ftell log10 rename strrchr fwrite malloc scanf strspn mblen sin strstr mbstowcs sinh strtime gets gmtime

2 isalnum mbtowc sprintf strtod isalpha memchr sqrt strtok iscntrl memcmp srand strtol isdigit memcpy sscanf strtoul isgraph memicmp strcat tan islower memmove strchr tanh isprint memset strcmp time ispunct mktime strcpy tolower isspace modf strcspn toupper isupper pow strdate va_arg isxdigit printf strftime va_end labs putch strlen va_start ldexp puts strncat wcstombs ldiv qsort strncmp wctomb

1

If you seek beyond the end of file (EOF), fseek returns an error.

2

The terminals do not support time zones, so gmtime() returns the local time instead of Greenwich time.

Buffer Manipulation Functions Use the buffer manipulation functions to work with areas of memory, byte by byte. A buffer is similar to a character string, but it is not terminated with a NULL character (\0). A buffer can contain ASCII data or other data formats. Certified Microsoft C Buffer Manipulation Functions

16

_fmemccpy

_fmemicmp

_swab memicmp

_fmemchr

_fmemmove memchr memmove

_fmemcmp

_fmemset memcmp memset

_fmemcpy

_memccpy memcpy

Trakker Antares PSK Reference Manual

Page 37

Chapter 2, Programming Guidelines

Character Functions Use the character classification and conversion routines to test for individual characters and convert characters from uppercase to lowercase. Certified Microsoft C Character Functions _isaccii

_toupper isgraph isupper

_iscsym isalpha islower isxdigit

_iscsymf isalum isprint tolower toupper

_toascii iscntrl ispunct

_tolower isdigit isspace

Data Conversion Functions Use the data conversion functions to convert numbers to ASCII strings and vice versa. Certified Microsoft C Data Conversion Functions _atold

_strtold atol strftime

_ecvt

_ultoa labs strtod

_fct abs localeconv strtol

_gcvt atof setlocale strtoul

_itoa atoi strcoll strxfrm

_ltoa

File Functions Use the file functions to manage file input and output (I/O), such as writing characters to an open file. Note: Use the imstdio.h file as the include file associated with these functions rather than stdio.h. Certified Microsoft C File Functions clearerr fgetc fputs fseek fclose fgets fread ftell fwrite feof fopen fscanf ferror fprintf remove

Trakker Antares PSK Reference Manual

17

Page 38

Chapter 2, Programming Guidelines

Math Functions Use the math functions to perform various mathematical operations and to convert numbers to ASCII strings and vice versa. Certified Microsoft C Math Functions _cabs

_rotl dmsbintoieee modf

_fieeetomsbin

_rotr exp pow

_fmsbintoieee acos fabs rand

_fpreset asin floor sin

_hypot atan fmod sinh

_lrotl atan2 frexp sqrt

_lrotr ceil ldexp srand cos ldiv tan

_max cosh log tanh

_min div log10

Memory Functions Use the memory functions to dynamically allocate and de-allocate memory for your application to use. Certified Microsoft C Memory Functions _ffree

_fmemcpy

_memccpy memcmp

_fmalloc

_fmemicmp

_memicmp memcpy

_fmemccpy

_fmemmove

_swab memmove

_fmemchr

_fmemset memchr memset

_fmemcmp

String Functions Use the string functions to manipulate ANSI character strings. Certified Microsoft C String Functions

18

_fstrcat

_fstrpbrk

_strlwr strerror

_fstrcmp

_fstrrchr

_strnicmp strlen

_fstrcpy

_fstrset

_strnset strncat

_fstrcspn

_fstrrev

_strrev strncmp

_fstricmp

_fstrspn

_strset strncpy

_fstrlen

_fstrstr

_strupr strpbrk

_fstrlwr

_fstrtok strcat strrchr

_fstrncat

_fstrupr strchr strspn

Trakker Antares PSK Reference Manual

Page 39

Chapter 2, Programming Guidelines

Certified Microsoft C String Functions (continued) _fstrncmp

_nstrdup strcmp strstr

_fstrnicmp

_strdup strcpy strtok

_fstrnset

_stricmp strcspn

Time Functions Use the time functions to retrieve or set the system time. You can use a variety of formats for time. Certified Microsoft C Time Functions difftime localtime mktime gmtime asctime strftime clock time

Note: The terminals do not support time zones. The gmtime() function returns the local time instead of Greenwich time.

Miscellaneous Functions Use the miscellaneous functions to write characters to the display, to perform searches, and to handle functions with a variable number of arguments. Certified Microsoft C Miscellaneous Functions cputs puts va_arg putchar qsort va_end va_start

Unsupported Microsoft C/C++ Functions The PSK does not support C++, classes, application-wide constructors or destructors, or Windows. You cannot use these Microsoft C/C++ functions or the equivalent Borland C/C++ functions. Microsoft C/C++ Functions Not Supported By the PSK Library _access

_dos_allocmem

_ellipse

_fullpath

_arc

_dos_close

_ellipse_w

_getactivepage

_arc_w

_dos_commit

_ellipse_wxy

_getarcinfo

_arc_wxy

_dos_creat

_enable

_getbkcolor

_bdos

_dos_creatnew

_eof

_getcolor

_bios_disk

_dos_findfirst

_execl

_getcurrentposition

Trakker Antares PSK Reference Manual

19

Page 40

Chapter 2, Programming Guidelines

Microsoft C/C++ Functions Not Supported By the PSK Library (continued) _bios_equiplist

_dos_findnext

_execle

_getcurrentposition_w

_bios_keybrd

_dos_freemem

_execlp

_getcwd

_bios_memsize

_dos_getdate

_execlpe

_getdrive

_bios_printer

_dos_getdiskfree

_execv

_getfillmask

_bios_serialcom

_dos_getdrive

_execve

_getfontinfo

_bios_timeofday

_dos_getfileattr

_execvp

_getgtextextent

_c_exit

_floodfill

_execvpe

_pg_resetpalette

_cexit

_floodfill_w

_int86

_pg_resetstyleset

_cgets

_flushall

_int86x

_pg_setchardef

_chain_intr

_fmsbintoieee

_intdos

_pg_setpalette

_chdir

_fonexit

_intdosx

_pg_setstyleset

_chdrive

_fputchar

_isatty

_pg_vlabelchart

_chmod

_fsopen

_kbhit

_pie

_chsize

_fstat

_lineto

_pie_w

_clearscreen

_fstrchr

_lineto_w

_pie_wxy

_close

_fstrdup

_locking

_polygon

_commit

_getgtextvector

_lseek

_polygon_w

_cprintf

_getimage

_makepath

_polygon_wxy

_creat

_getimage_w

_MK_FP

_putenv

_cscanf

_getimage_wxy

_mkdir

_putimage

_disable

_getlinestyle

_mktemp

_putimage_w

_displaycursor

_getphyscoord

_moveto

_putw

_dmwbintoieee

_getpid

_moveto_w

_read

_dos_getftime

_getpixel

_onexit

_rectangle

_dos_gettime

_getpixel_w

_open

_rectangle_w

_dos_getvect

_gettextcolor

_outgtext

_rectangle_wxy

_dos_keep

_gettextcursor

_outmem

_registerfonts

_dos_open

_gettextposition

_outp

_remapallpalette

_dos_read

_gettextwindow

_outpw

_remappalette

_dos_setblock

_getvideoconfig

_outtext

_rmdir

_dos_setdate

_getviewcoord

_pg_analyzechart

_rmtmp

_dos_setdrive

_getviewcoord_w

_pg_analyzechartms

_scrolltextwindow

_dos_setfileattr

_getviewcoord_wxy

_pg_analyzepie

_searchenv

_dos_setftime

_getvisualpage

_pg_analyzescatter

_segread

_dos_settime

_getw

_pg_analyzescatterms

_selectpalette

_dos_setvect

_getwindowcoord

_pg_chart

_setactivepage

_dos_write

_getwritemode

_pg_chartms

_setbkcolor

_dosexterr

_grstatus

_pg_chartpie

_settextcursor

_dup

_harderr

_pg_chartscatter

_settextposition

_dup2

_hardresume

_pg_chartscatterms

_settextrows

20

Trakker Antares PSK Reference Manual

Page 41

Chapter 2, Programming Guidelines

Microsoft C/C++ Functions Not Supported By the PSK Library (continued) _exit

_hardretn

_pg_defaultchart

_settextwindow

_fatexit

_imagesize

_pg_getchardef

_setvideomode

_fdopen

_imagesize_w

_pg_getpalette

_setvideomoderows

_fgetchar

_imagesize_wxy

_pg_getstyleset

_setvieworg

_filelength

_inp

_pg_hlabelchart

_setviewport

_setwindow

_inpw

_pg_initchart

_setvisualpage

_setwritemode

_unregisterfonts abort raise

_snprintf

_vfree assert realloc

_spawnv

_vheapinit atexit rewind

_spawnve

_vheapterm exit setbuf

_spawnvp

_vload fflushall setjmp

_spawnvpe

_vlock fgetpos setvbuf

_splitpath

_vlockcnt fputc signal

_stat

_vmalloc freopen strerror

_strerror

_vmsize fsetpos system

_tell

_vrealloc getc tmpfile

_tempnam

_vsnprintf getenv tmpnam

_umask

_vunlock longjmp vfprintf

_ungetch

_wrapon perror vprintf

_unlink

_write putc vsprintf

Trakker Antares PSK Reference Manual

21

Page 42

Chapter 2, Programming Guidelines

22

Trakker Antares PSK Reference Manual

Page 43

3

Building Applications

This chapter explains how to use the Microsoft® Visual C/C++ interactive developer’s environment (IDE) to build, link, and debug your Trakker Antares PSK applications. To learn how to use Borland® Turbo C++ 4.5, see the documentation that came with Turbo C++. This chapter also explains how to build an application from a command line. This chapter covers these topics: • Programming guidelines for network communications • Building a sample program • Building a .BIN program using Microsoft Visual C/C++ • Building a DOS .EXE program using Microsoft Visual C/C++ • Building your own program from a command line • Downloading applications

Trakker Antares PSK Reference Manual

23

Page 44

Chapter 3, Building Applications

Programming Guidelines for Network Communications Applications that run on the Trakker Antares® terminal and your host computer are implemented based on the client/server model. Therefore, when you build a client/server application, you should pay special attention to these network communications functions: • im_get_rx_status • im_get_tx_status • im_input_status • im_set_no_autosend • im_transmit_buffer • im_transmit_buffer_no_wait • im_transmit_buffer_no_wait_t • im_receive_input For more information about each of these functions, see Chapter 5, “PSK Function Descriptions.” Trakker Antares terminals support UDP/IP and TCP/IP transport protocols. The network communications functions need to be interpreted based on the configuration of your Trakker Antares terminal: UDP Plus or TCP/IP. For example, a common scenario for Trakker Antares terminals is to collect data from a scanned bar code and send the data to a host over a TCP/IP network. The terminal tries to form a TCP connection, which is transparent to the client, the first time the im_transmit_buffer function is called. After a TCP connection is formed by calling im_transmit_buffer, the connection stays open unless one of the following events occurs: • There is an un-recoverable network error. • The client requests a CLOSE. • The terminal is reset. For example, if the terminal is suspended while power management resume is not allowed. • The terminal battery becomes discharged. It is also important to maintain the status of network communications so the client can effectively handle communication failures, such as the server going down or the RF terminal moving out of range. TCP attempts to recover from some failures, such as re-estabilishing a connection closed by the host; however, if the host attempt fails, the client is responsible for initiating the recovery. The client’s most effective recovery mechanism is to reset the terminal.

24

Trakker Antares PSK Reference Manual