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 4 of 21

Symbol Palm Terminal Scanner System Software Manual: Chapter 2 Scanner Commands, pages 17 to 26

Pages 17 to 26 of 168, from Symbol Palm Terminal Scanner System Software Manual

The original document is the PDF (1.2 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 Symbol SPT-1700

Page 17

Chapter 2 Scanner Commands Introduction The Scan Manager API in this section give you commands to manipulate the scanner. Using these commands, an application should perform the following functions: !

Enable or disable scanning

!

Start a decode

!

Turn the LED on or off

!

Sound any of the defined beep patterns

!

Set the scanner into “aim” (laser-pointer) mode

!

Get version information for the various terminal software components

2-1

Page 18

Symbol Palm Terminal Scanner System Software Manual

Returned Status Definitions The scanner commands in this chapter may return one of the status codes described in Table 2-1. Table 2-1. Returned Status Codes STATUS CODE

DEFINITION

Any non-negative value (0 to 32767)

Parameter value.

STATUS_OK

The function’s parameters were verified. If a function must wait for an ACK from the scanner, STATUS_OK indicates that the ACK was received.

NOT_SUPPORTED

The last packet received from the scanner generated either a NAK_DENIED or NAK_BAD_CONTEXT status. This usually indicates that the specified parameter is not supported by this scanner, or the scanner was unable to comply with the request.

COMMUNICATIONS_ERROR Either a timeout condition or the maximum number of retries (or both) occurred. The previous transmit message was not verified through an ACK, and therefore, is questionable.

2-2

BAD_PARAM

One or more of the function call parameters supplied by the user was not in the expected range.

BATCH_ERROR

The limits of a batch function have been exceeded. Unless otherwise indicated, functions that start with ScanSet are responsible for generating a batch command to establish scanner parameters. The parameters are not sent to the scanner until the ScanCmdSendParams() function is called, at which time a new batch is started.

ERROR_UNDEFINED

An error condition exists that is not specifically associated with the scanner or its communications.

Page 19

Scanner Commands

Scanner Commands Table 2-2 lists the scanner commands described in this chapter. Table 2-2. Scanner Commands FUNCTION

PAGE

ScanCloseDecoder

2-4

ScanCmdAimOff

2-5

ScanCmdAimOn

2-6

ScanCmdBeep

2-7

ScanCmdGetAllParams

2-9

ScanCmdLedOff

2-10

ScanCmdLedOn

2-11

ScanCmdParamDefaults

2-12

ScanCmdScanDisable

2-13

ScanCmdScanEnable

2-14

ScanCmdSendParams

2-15

ScanCmdStartDecode

2-16

ScanCmdStopDecode

2-17

ScanGetAimMode

2-18

ScanGetDecodedData

2-19

ScanGetExtendedDecodedData

2-22

ScanGetDecoderVersion

2-23

ScanGetLedState

2-24

ScanGetScanEnabled

2-25

ScanGetScanManagerVersion

2-26

ScanGetScanPortDriverVersion

2-27

ScanOpenDecoder

2-28

2-3

Page 20

Symbol Palm Terminal Scanner System Software Manual

ScanCloseDecoder Purpose Closes the Scan Manager shared library and frees up system resources.

Prototype int ScanCloseDecoder ( void);

Returned Status Zero=No errors closing shared library Non-zero=Error closing shared library

Comments Must be called by all applications that call the ScanOpenDecoder function. Failure to do so will cause system errors and unpredictable results.

See Also ScanOpenDecoder

2-4

Page 21

Scanner Commands

ScanCmdAimOff Purpose Takes the scanner out of the “aim” mode (also known as “laser pointer” mode). Note: SPT 170x0-2D does not support aim mode.

Prototype int ScanCmdAimOff ( void);

Returned Status STATUS_OK If an error occurs, the returned status is one of the following: BAD_PARAM COMMUNICATIONS_ERROR NOT_SUPPORTED

See Also ScanCmdAimOn

2-5

Page 22

Symbol Palm Terminal Scanner System Software Manual

ScanCmdAimOn Purpose Places the scanner into its “aim” mode (also known as “laser pointer” mode). Note: SPT 170x0-2D does not support aim mode.

Prototype int ScanCmdAimOn ( void);

Returned Status STATUS_OK If an error occurs, the returned status is one of the following: BAD_PARAM COMMUNICATIONS_ERROR NOT_SUPPORTED

Comments This function call only tells the scanner that you want to use the scanner laser for aiming, not decoding. To execute the aim, the user must press the scanner’s trigger, or a ScanCmdStartDecode command must be sent.

See Also ScanCmdAimOff

2-6

Page 23

Scanner Commands

ScanCmdBeep Purpose Executes the specified beep sequence. Prototype int ScanCmdBeep ( BeepType beep);

Parameters -> beep

Must be one of the following values: ONE_SHORT_HIGH TWO_SHORT_HIGH THREE_SHORT_HIGH FOUR_SHORT_HIGH FIVE_SHORT_HIGH ONE_SHORT_LOW TWO_SHORT_LOW THREE_SHORT_LOW FOUR_SHORT_LOW FIVE_SHORT_LOW ONE_LONG_HIGH TWO_LONG_HIGH THREE_LONG_HIGH FOUR_LONG_HIGH FIVE_LONG_HIGH ONE_LONG_LOW TWO_LONG_LOW THREE_LONG_LOW FOUR_LONG_LOW FIVE_LONG_LOW FAST_WARBLE SLOW_WARBLE MIX1 MIX2 MIX3 MIX4

2-7

Page 24

Symbol Palm Terminal Scanner System Software Manual

DECODE_BEEP BOOTUP_BEEP PARAMETER_DEFAULTS_ BEEP

Returned Status STATUS_OK If an error occurs, the returned status is the following: BAD_PARAM COMMUNICATIONS_ERROR NOT_SUPPORTED

2-8

Page 25

Scanner Commands

ScanCmdGetAllParams Purpose Retrieves the current parameters from the scanner. Prototype int ScanCmdGetAllParams( unsigned char *ptr, int maxlength);

Parameters -> ptr[]

-> maxlength

Array where the scanner’s parameter information is deposited. Maximum size (in bytes) of the parameter values stored in the ptr[] array.

Returned Status Number of bytes copied into ptr[]. If an error occurs, the returned status is one of the following: COMMUNICATION_ERROR NOT_SUPPORTED

Comments The location of the array where the parameters are stored begins with ptr[0]. The parameters are returned as data pairs consisting of (parameter_number and parameter_value). You must parse through the data pairs and associate each parameter_number with a specific scanner capability. If the number of bytes you specify in maxlength is less than the number of scanner parameters retrieved, the remaining parameters are lost. To make sure you retrieve all of the parameters, set Ptr to at least 256 bytes. As you use ScanSet commands to set the decoder’s parameters, the new parameters will not be reflected in the ptr[] array. You must update your own parameter storage when you change parameters.

2-9

Page 26

Symbol Palm Terminal Scanner System Software Manual

ScanCmdLedOff Purpose Immediately turns off the scanner’s green LED. Prototype int ScanCmdLedOff ( void);

Returned Status STATUS_OK If an error occurs, the returned status is one of the following: BAD_PARAM COMMUNICATIONS_ERROR NOT_SUPPORTED

See Also ScanCmdLedOn

2-10