diff --git a/src/Symbol/MsrMgrLib.h b/src/Symbol/MsrMgrLib.h new file mode 100644 index 0000000..d2b386c --- /dev/null +++ b/src/Symbol/MsrMgrLib.h @@ -0,0 +1,381 @@ +/*********************************************************************** + * + Copyright (c) 1999 Symbol Technologies. + All rights reserved. + + * FileName: + * MsrMgrLib.h + * + * Description: + * MSR Manager library API definitions. + * + * History: + * 5/19/99 H.Z. + * 12/31/00 Inv. Removed PalmCompatibility.h for PalmOS 3.5 conversion + * + *******************************************************************/ + + +#ifndef __MSR_MGR_LIB_H__ +#define __MSR_MGR_LIB_H__ + +// Palm common definitions +#include +#include + + +/******************************************************************** + * Type and creator of Sample Library database + ********************************************************************/ +#define MsrMgrLibCreatorID 'MSR1' // MSR Library database creator +#define MsrMgrLibTypeID 'libr' // Standard library database type + + +/******************************************************************** + * Internal library name which can be passed to SysLibFind() + ********************************************************************/ +#define MsrMgrLibName "MsrMgr.lib" + + +/******************************************************************** + * Internal definition + ********************************************************************/ +// Maximum string length in a card information (include Raw Data) +#define MAX_CARD_DATA 400 +// maximum characters for preamble and postamble +#define MAX_PRE_POST_SIZE 10 +// maximum added field number +#define MAX_AFLD_NUM 6 +// maximum added field string length +#define MAX_AFLD_LEN 6 +// maximum data edit send command number +#define MAX_SCMD_NUM 4 +// maximum length in a data edit send command +#define MAX_SCMD_LEN 40 +// maximum characters in whole data edit send command +#define MAX_SCMD_CHAR 110 +// maximum flexible field number +#define MAX_FFLD_NUM 16 +// maximum length in a flexible field setting command +#define MAX_FFLD_LEN 20 +// maximum characters in whole flexible field setting command +#define MAX_FFLD_CHAR 60 +// Baud rate for command communication +#define COMM_BAUDRATE 9600 +// maximum reserved character to define +#define MAX_RES_CHAR_NUM 6 +// maximum track number +#define MAX_TRACK_NUM 3 +// characters for track format +#define TRACK_FORMAT_LEN 5 + +// Key event received when data is ready from MSR 3000 +#define msrDataReadyKey 0x15af + +/************************************************************ + * MSR Manager Library result codes + * (appErrorClass is reserved for 3rd party apps/libraries. + * It is defined in SystemMgr.h) + *************************************************************/ + +#define MsrMgrNormal 0 // normal +#define MsrMgrErrGlobal (appErrorClass | 1) // glbal parameter error +#define MsrMgrErrParam (appErrorClass | 2) // invalid parameter +#define MsrMgrErrNotOpen (appErrorClass | 3) // library is not open +#define MsrMgrErrStillOpen (appErrorClass | 4) // returned from MSRLibClose() if + // the library is still open by others +#define MsrMgrErrMemory (appErrorClass | 5) // memory error occurred +#define MsrMgrErrSize (appErrorClass | 6) // card information overflow +#define MsrMgrErrNAK (appErrorClass | 7) // firmware NAK answer +#define MsrMgrErrTimeout (appErrorClass | 8) // waiting timeout +#define MsrMgrErrROM (appErrorClass | 9) // ROM check error +#define MsrMgrErrRAM (appErrorClass | 10) // RAM check error +#define MsrMgrErrEEPROM (appErrorClass | 11) // EEPROM check error +#define MsrMgrErrRes (appErrorClass | 12) // error response +#define MsrMgrErrChecksum (appErrorClass | 13) // check sum error +#define MsrMgrBadRead (appErrorClass | 14) // Bad read for buffered mode +#define MsrMgrNoData (appErrorClass | 15) // No data for buffered mode +#define MsrMgrLowBattery (appErrorClass | 16) // No enough battery for MSR 3000 + + +//----------------------------------------------------------------------------- +// MSR library function trap ID's. Each library call gets a trap number: +// MsrMgrLibTrapXXXX which serves as an index into the library's dispatch table. +// The constant sysLibTrapCustom is the first available trap number after +// the system predefined library traps Open,Close,Sleep & Wake. +//----------------------------------------------------------------------------- + +typedef enum { + msrLibTrapGetSetting = sysLibTrapCustom, + msrLibTrapSendSetting, + msrLibTrapGetVersion, + msrLibTrapGetStatus, + msrLibTrapSelfDiagnose, + msrLibTrapSetBufferMode, + msrLibTrapArmtoRead, + msrLibTrapSetTerminator, + msrLibTrapSetPreamble, + msrLibTrapSetPostamble, + msrLibTrapSetTrackSelection, + msrLibTrapSetTrackSeparator, + msrLibTrapSetLRC, + msrLibTrapSetDataEdit, + msrLibTrapSetAddedField, + msrLibTrapSetDataEditSend, + msrLibTrapSetFlexibleField, + msrLibTrapGetDataBuffer, + msrLibTrapReadMSRBuffer, + msrLibTrapReadMSRUnbuffer, + msrLibTrapSetDefault, + msrLibTrapSetDecoderMode, + msrLibTrapSetTrackFormat, + msrLibTrapSetReservedChar + } MSRLibTrapNumberEnum; + + +/******************************************************************** + * Public Structures + ********************************************************************/ + +// Library globals +typedef struct ReservedChar { + UInt8 format; + char SR_Bits; + char SR_Chars; + } ReservedChar; + +typedef struct MSRSetting { + UInt8 Buffer_mode; + UInt8 Terminator; + char Preamble[MAX_PRE_POST_SIZE+1]; + char Postamble[MAX_PRE_POST_SIZE+1]; + UInt8 Track_selection; + UInt8 Track_separator; + UInt8 LRC_setting; + UInt8 Data_edit_setting; + UInt8 Decoder_mode; + UInt8 Track_format[MAX_TRACK_NUM][TRACK_FORMAT_LEN]; + ReservedChar Reserved_chars[MAX_RES_CHAR_NUM]; + char Added_field[MAX_AFLD_NUM][MAX_AFLD_LEN+1]; + char Send_cmd[MAX_SCMD_NUM][MAX_SCMD_LEN]; + char Flexible_field[MAX_FFLD_NUM][MAX_FFLD_LEN]; + } MSRSetting; + +typedef MSRSetting* MSRSetting_Ptr; +typedef char * MSRCardInfo_Ptr; +typedef ReservedChar* ReservedChar_Ptr; + + +/******************************************************************** + * API Prototypes + ********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + + +//-------------------------------------------------- +// Standard library open, close, sleep and wake functions +//-------------------------------------------------- + +extern Err MsrOpen(UInt16 refNum, UInt32 *msrVerP, UInt32 *libVerP) + SYS_TRAP(sysLibTrapOpen); + +extern Err MsrClose(UInt16 refNum) + SYS_TRAP(sysLibTrapClose); + +extern Err MsrSleep(UInt16 refNum) + SYS_TRAP(sysLibTrapSleep); + +extern Err MsrWake(UInt16 refNum) + SYS_TRAP(sysLibTrapWake); + +extern Err MsrGetSetting(UInt16 refNum, MSRSetting *userMSRP) + SYS_TRAP(msrLibTrapGetSetting); + +extern Err MsrSendSetting(UInt16 refNum, MSRSetting userMSR) + SYS_TRAP(msrLibTrapSendSetting); + +extern Err MsrGetVersion(UInt16 refNum, UInt32 *msrVerP, UInt32 *libVerP) + SYS_TRAP(msrLibTrapGetVersion); + +extern Err MsrGetStatus(UInt16 refNum, UInt8* statusP) + SYS_TRAP(msrLibTrapGetStatus); + +extern Err MsrSelfDiagnose(UInt16 refNum) + SYS_TRAP(msrLibTrapSelfDiagnose); + +extern Err MsrSetBufferMode(UInt16 refNum, UInt8 mode) + SYS_TRAP(msrLibTrapSetBufferMode); + +extern Err MsrArmtoRead(UInt16 refNum) + SYS_TRAP(msrLibTrapArmtoRead); + +extern Err MsrSetTerminator(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetTerminator); + +extern Err MsrSetPreamble(UInt16 refNum, char *setting) + SYS_TRAP(msrLibTrapSetPreamble); + +extern Err MsrSetPostamble(UInt16 refNum, char *setting) + SYS_TRAP(msrLibTrapSetPostamble); + +extern Err MsrSetTrackSelection(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetTrackSelection); + +extern Err MsrSetTrackSeparator(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetTrackSeparator); + +extern Err MsrSetLRC(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetLRC); + +extern Err MsrSetDataEdit(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetDataEdit); + +extern Err MsrSetAddedField(UInt16 refNum, char setting[MAX_AFLD_NUM][MAX_AFLD_LEN+1]) + SYS_TRAP(msrLibTrapSetAddedField); + +extern Err MsrSetDataEditSend(UInt16 refNum, char setting[MAX_SCMD_NUM][MAX_SCMD_LEN]) + SYS_TRAP(msrLibTrapSetDataEditSend); + +extern Err MsrSetFlexibleField(UInt16 refNum, char setting[MAX_FFLD_NUM][MAX_FFLD_LEN]) + SYS_TRAP(msrLibTrapSetFlexibleField); + +extern Err MsrGetDataBuffer(UInt16 refNum, MSRCardInfo_Ptr userCardInfoP, UInt8 get_Type) + SYS_TRAP(msrLibTrapGetDataBuffer); + +extern Err MsrReadMSRBuffer(UInt16 refNum, MSRCardInfo_Ptr userCardInfoP, UInt16 waitTime) + SYS_TRAP(msrLibTrapReadMSRBuffer); + +extern Err MsrReadMSRUnbuffer(UInt16 refNum, MSRCardInfo_Ptr cardInfo) + SYS_TRAP(msrLibTrapReadMSRUnbuffer); + +extern Err MsrSetDefault(UInt16 refNum) + SYS_TRAP(msrLibTrapSetDefault); + +extern Err MsrSetDecoderMode(UInt16 refNum, UInt8 setting) + SYS_TRAP(msrLibTrapSetDecoderMode); + +extern Err MsrSetTrackFormat(UInt16 refNum, UInt8 track_ID, UInt8 format, + UInt8 SS_Bits, UInt8 SS_ASCII, UInt8 ES_Bits, UInt8 ES_ASCII) + SYS_TRAP(msrLibTrapSetTrackFormat); + +extern Err MsrSetReservedChar(UInt16 refNum, ReservedChar_Ptr setting) + SYS_TRAP(msrLibTrapSetReservedChar); + + +#ifdef __cplusplus +} +#endif + +// character setting definition +#define BS 0x08 +#define STX 0x02 +#define ETX 0x03 +#define ACK 0x06 +#define NAK 0x0F +#define WAKE 0x10 + +#define LF 0x0A +#define CR 0x0D +#define DC1 0X11 +#define DC3 0X13 + +#define MsrSendCmd 'S' +#define MsrReceiveCmd 'R' + +// setting constant +#define MsrUnbufferedMode '0' +#define MsrBufferedMode '1' + +#define MsrArmtoReadMode '0' +#define MsrClearBufferMode '1' + +#define MsrTerminatorCRLF '0' +#define MsrTerminatorCR '1' +#define MsrTerminatorLF '2' +#define MsrTerminatorNone '3' + +#define MsrAnyTrack '0' +#define MsrTrack1Only '1' +#define MsrTrack2Only '2' +#define MsrTrack1Track2 '3' +#define MsrTrack3Only '4' +#define MsrTrack1Track3 '5' +#define MsrTrack2Track3 '6' +#define MsrAllThreeTracks '7' + +#define MsrNoLRC '0' +#define MsrSendLRC '1' + +#define MsrDisableDataEdit '0' +#define MsrDataEditMatch '1' +#define MsrDataEditUnmatch '3' + +#define MsrGetAllTracks '0' +#define MsrGetTrack1 '1' +#define MsrGetTrack2 '2' +#define MsrGetTrack3 '3' + +#define MsrStatus '0' +#define MsrDiagnose '1' +#define MsrVersionNo '2' +#define MsrBufferMode '3' + +#define MsrNormalDecoder '0' +#define MsrGenericDecoder '1' +#define MsrRawDataDecoder '2' + +#define MsrTrack1Format '1' +#define MsrTrack2Format '2' +#define MsrTrack3Format '3' + +#define Msr5BitsFormat '0' +#define Msr7BitsFormat '1' + +// track ID for raw data +#define MsrTrack1ID 1 +#define MsrTrack2ID 2 +#define MsrTrack3ID 3 + +// function id definition +#define MsrSetTrackSelectionFunID 0x13 +#define MsrSetTrackSeparatorFunID 0x17 +#define MsrSetDefaultFunID 0x18 +#define MsrSetBufferModeFunID 0x19 +#define MsrArmtoReadFunID 0x1A +#define MsrSetDataEditFunID 0x1B +#define MsrSetLRCFunID 0x1C +#define MsrGetSettingFunID 0x1F +#define MsrSetTerminatorFunID 0x21 +#define MsrGetDataFunID 0x22 +#define MsrGetStatusFunID 0x23 +#define MsrTrack1FormatFunID 0x24 +#define MsrTrack2FormatFunID 0x25 +#define MsrTrack3FormatFunID 0x26 +#define MsrSpecialCharFunID 0x27 +#define MsrSetDecoderModeFunID 0x28 +#define MsrSetPreambleFunID 0xD2 +#define MsrSetPostambleFunID 0xD3 +#define MsrSetFlexFieldFunID 0xF1 +#define MsrDataEditSendFunID 0xF2 +#define MsrSetAddedFieldFunID 0xF3 + +#define MsrCCSMDFunID 0xE0 +#define MsrDMVSMDFunID 0xE1 +#define MsrAAMVASMDFunID 0xE2 +#define MsrFLEXSMDFunID 0xE3 +#define MsrLengthMatchFunID 0xF0 +#define MsrStringMatchFunID 0xF1 +#define MsrSearchBeforeFunID 0xF2 +#define MsrSearchBetweenFunID 0xF3 +#define MsrSearchAfterFunID 0xF4 + +#define MsrStatusMask 0xC0 //11000000b +#define MsrROMStatusERR 0X00 //00000000b +#define MsrRAMStatusERR 0X40 //01000000b +#define MsrEEPROMStatusERR 0X80 //10000000b +#define MsrStatusOK 0XC0 //11000000b + +#endif // __MSR_MGR_LIB_H__ diff --git a/src/Symbol/PTPRINT.H b/src/Symbol/PTPRINT.H new file mode 100644 index 0000000..d9edb23 --- /dev/null +++ b/src/Symbol/PTPRINT.H @@ -0,0 +1,148 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 1998 Symbol Technologies, Inc. +* +* FILE: ptPrint.h +* +* SYSTEM: Symbol Print API. +* +* HEADER: Print API Library Header +* +* DESCRIPTION: Provides function declarations and other types for +* use by a print application. +* +* HISTORY: 02/19/99 Mitchs Created +* 12/31/00 Inv. Removed PalmCompatibility.h for PalmOS 3.5 conversion +* +* +*************************************************************************/ +#pragma once + +#ifdef __cplusplus + extern "C" { +#endif +#include + + +/* + * Return Code Status + */ +typedef enum tagPTStatus +{ + PTStatusOK = 0, + PTStatusFail, + PTStatusRomIncompatible, + PTStatusBadParmeter, + PTStatusTransportNotAvail, + PTStatusErrLine, + PTStatusNotOpen, + PTStatusAlreadyOpen, + PTStatusNoMemory, + PTStatusAlreadyConnect, + PTStatusPrinterNotFound, + PTStatusTimeOut, + PTStatusPending, + PTStatusNoPeerAddr, + PTStatusIrBindFailed, + PTStatusIrNoDeviceFound, + PTStatusIrDicoverFail, + PTStatusIrConnectFailed, + PTStatusIrConnectLapFailed, + PTStatusIrQueryFailed, + PTStatusPrintCapFailed + +} PTStatus; + +/* + * Supported Transports + */ +typedef enum tagPTTransports +{ + PTUnknown = 0, + PTSerial, + PTIr + +} PTTransport; + +/* + * Communication Settings + */ +typedef struct tagPTConnectSettings { + + UInt32 baudRate; // baud rate + UInt32 timeOut; // time out in System Ticks + UInt32 flags; // + UInt16 recvBufSize; // receive buffer size + +} PTConnectSettings; + +typedef PTConnectSettings * PTConnectSettingsPtr; + +/* + * Serial Defaults + */ +#define PTDefaultSerBaudRate 9600 +#define PTDefaultSerFlags serDefaultSettings +#define PTDefaultSerTimeout (5 * sysTicksPerSecond) + +/* + * Ir Defaults + */ +#define PTDefaultIrBaudRate irOpenOptSpeed57600 +#define PTDefaultIrTimeout (4 * sysTicksPerSecond) +#define PTDefaultSerRecvBuf 512 + +/******************************************************************* + * Low-Level API Functions * + * Functions for opening and closing * + *******************************************************************/ + +PTStatus ptOpenPrinter( Char * printerModel, PTTransport transport, + PTConnectSettingsPtr customSettings ); + +PTStatus ptClosePrinter( ); + +PTStatus ptConnectPrinter( Char * printerName ); + +PTStatus ptDisconnectPrinter(); + +PTStatus ptInitPrinter( MemPtr initPtr, UInt32 length ); + +PTStatus ptResetPrinter( MemPtr resetPtr, UInt32 length ); + +PTStatus ptQueryPrinter( MemPtr queryPtr, UInt32 length, + MemPtr queryResPtr, UInt32* rtnLength ); + +PTStatus ptWritePrinter( MemPtr buffer, UInt32 length ); + +PTStatus ptQueryPrintCap( MemPtr query, MemPtr queryResPtr, + UInt32* rtnLength ); + +PTStatus ptPrintApiVersion( Char * ptr, Int16 len ); + +/******************************************************************* + * High-Level API Functions * + *******************************************************************/ + +PTStatus ptStartPrintBuffer( UInt32 size ); + +PTStatus ptSetFont( Char * fontBuffPtr ); + +PTStatus ptTextToBuffer( UInt16 xStart, UInt16 yStart, Char * pText ); + +PTStatus ptLineToBuffer( UInt16 xStart, UInt16 yStart, + UInt16 xEnd, UInt16 yEnd, UInt16 lineThickness ); + +PTStatus ptRectToBuffer( UInt16 xTopLeft, UInt16 yTopLeft, + UInt16 xBottomRight, UInt16 yBottomRight, + UInt16 lineThickness ); + +PTStatus ptResetPrintBuffer(); + +PTStatus ptPrintPrintBuffer( Char * printerName ); + +#ifdef __cplusplus + } +#endif +/******************************************************************* + * end of file * + *******************************************************************/ diff --git a/src/Symbol/S24API.H b/src/Symbol/S24API.H new file mode 100644 index 0000000..4d1d8d6 --- /dev/null +++ b/src/Symbol/S24API.H @@ -0,0 +1,13 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 2001 Symbol Technologies, Inc. +* +* FILE: S24API.h +* +*************************************************************************/ +#ifndef __S24API_H__ +#define __S24API_H__ + +#include "S24Defines.h" +#include "S24APIStruct.h" + +#endif // __S24API_H__ diff --git a/src/Symbol/S24APIStruct.h b/src/Symbol/S24APIStruct.h new file mode 100644 index 0000000..bccbca3 --- /dev/null +++ b/src/Symbol/S24APIStruct.h @@ -0,0 +1,40 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 2001 Symbol Technologies, Inc. +* +* FILE: S24APIStruct.h +* +*************************************************************************/ +#pragma once + +#include "S24Defines.h" + +// These prefs can be get/set using netIFSettingS24Preferences +// They are also changeable in the S24 Preferences Panel +typedef struct +{ + Char szESSID[S24_ESS_ID_LENGTH + 1]; // ESS ID to use when associating + Boolean bShowESSID; // Show ESS ID string on association screen? + Boolean bUseDHCP; // Shall we use DHCP? + Boolean bEnableDNS; // Enable DNS? + NetIPAddr addrStaticIP; // Static IP of the S24 device + NetIPAddr addrSubnetMask; // Subnet mask for the S24 device + NetIPAddr addrGateway; // Gateway used by the S24 device + NetIPAddr addrPrimaryDNS; // Primary DNS used by the S24 device + NetIPAddr addrSecondaryDNS; // Secondary DNS used by the S24 device + Char szHostName[S24_HOST_NAME_LEN]; // Host name of the S24 device + Char szDomainName[S24_DOMAIN_NAME_LEN]; // Domain name of the S24 device +} S24UserNetworkPrefs; + +// Callsign data structure +typedef struct +{ + Boolean valid; // Is it valid? + UInt8 callsign[S24_MKK_CALLSIGN_LEN]; // Callsign data +} S24MKKCallsign; + +// I/F setting structure, used to pass complex data structures to NetLibIFSettingGet/Set +typedef struct +{ + UInt16 option; // I/F setting option, ie: S24 preference number + MemPtr buffer; // Buffer to store retrieved setting +} S24IFSetting; diff --git a/src/Symbol/S24Defines.h b/src/Symbol/S24Defines.h new file mode 100644 index 0000000..cf3e182 --- /dev/null +++ b/src/Symbol/S24Defines.h @@ -0,0 +1,51 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 2001 Symbol Technologies, Inc. +* +* FILE: S24Defines.h +* +*************************************************************************/ +#pragma once + +#define S24_MAC_ADDR_LENGTH 6 // 48 bit MAC/IEEE address +#define S24_BSS_ID_LENGTH S24_MAC_ADDR_LENGTH +#define S24_ESS_ID_LENGTH 32 // ESS ID length +#define S24_MKK_CALLSIGN_LEN 15 // MKK Callsign length +#define S24_COUNTRY_TEXT_LEN 34 // Country Text length +#define S24_VER_STRING_LEN 20 // Version string length +#define S24_HOST_NAME_LEN 40 // Host name length +#define S24_DOMAIN_NAME_LEN 40 // Domain name length + +#define netIFCreatorS24 's24i' // Creator ID of the S24 network interface +#define netIFInstanceS24 0 // Instance of the S24 network interface + +// S24 Network Interface Settings +typedef enum +{ + netIFSettingS24Device = netIFSettingCustom, // Is this an S24 device? (read only) + netIFSettingS24EssID, // Adapter's ESS ID + netIFSettingS24AccessPointBSSID, // AP's BSSID (read only) + netIFSettingS24DriverVersion, // Driver version (read only) + netIFSettingS24AssociationStatus, // Association status (read only) + netIFSettingS24MKKCallsign, // MKK callsign (read only) + netIFSettingS24CountryText, // Country text (read only) + netIFSettingS24FirmwareVersion, // Firmware version (read only) + netIFSettingS24FirmwareDate, // Firmware date (read only) + netIFSettingS24Preferences // S24 Preferences +} s24NetIFSettings; + +// S24 Preferences used by netIFSettingS24Preferences +// They are also changeable in the S24 Preferences Panel +typedef enum +{ + s24PrefESSID = 0x1000, // ESS ID to use when associating + s24PrefShowESSID, // Show ESS ID string on association screen? + s24PrefUseDHCP, // Shall we use DHCP? + s24PrefEnableDNS, // Enable DNS? + s24PrefStaticIP, // Static IP of the S24 Device + s24PrefSubnetMask, // Subnet mask for the S24 Device + s24PrefGateway, // Gateway used by the S24 Device + s24PrefPrimaryDNS, // Primary DNS used by the S24 Device + s24PrefSecondaryDNS, // Secondary DNS used by the S24 Device + s24PrefHostName, // Host name of the S24 device + s24PrefDomainName // Domain name of the S24 device +} s24Preferences; diff --git a/src/Symbol/SCANMGR.H b/src/Symbol/SCANMGR.H new file mode 100644 index 0000000..52eee92 --- /dev/null +++ b/src/Symbol/SCANMGR.H @@ -0,0 +1,216 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 1998 Symbol Technologies, Inc. +* +* FILE: ScanMgr.h +* +* SYSTEM: Symbol barcode scanner for Palm III. +* +* HEADER: Scan Manager Library Header +* +* DESCRIPTION: Provides function declarations and other types for +* use by a scanner-aware application. +* +* HISTORY: 4/13/98 SS Created +* 11/27/00 CFS updated type names for PalmOS 3.5 +* ... +*************************************************************************/ +#pragma once +#ifdef __cplusplus + extern "C" { +#endif +#include "ScanMgrDef.h" + +/******************************************************************* + * Function to check if we're on a PalmSymbol device + *******************************************************************/ +Int16 ScanIsPalmSymbolUnit(); + +/******************************************************************* + * Functions for opening and closing the decoder (required!) * + *******************************************************************/ +Int16 ScanOpenDecoder(); +Int16 ScanCloseDecoder(); + +/******************************************************************* + * Parameters send/retrieve functions * + *******************************************************************/ +Int16 ScanCmdSendParams( BeepType beep ); +Int16 ScanCmdGetAllParams( UInt8* pbParams, UInt16 max_length ); + +/******************************************************************* + * Versioning functions * + *******************************************************************/ +Int16 ScanGetScanManagerVersion( Char * pszVer, UInt16 max_length ); +Int16 ScanGetScanPortDriverVersion( Char * pszVer, UInt16 max_length ); +Int16 ScanGetDecoderVersion( Char * pszVer, UInt16 max_length); + +/******************************************************************* + * Decoder Data Retrieval Function * + *******************************************************************/ +Int16 ScanGetDecodedData( MESSAGE *ptr); +Int16 ScanGetExtendedDecodedData( Int16 length, Int16 *type, UInt8 *extendedData); + +/******************************************************************* + * Functions to enable/disable scanning of various barcode types * + *******************************************************************/ +Int16 ScanSetBarcodeEnabled( BarType barcodeType, Boolean bEnable ); +Int16 ScanGetBarcodeEnabled( BarType barcodeType ); + +/******************************************************************* + * Functions for get/set the barcode lengths to be scanned * + *******************************************************************/ +Int16 ScanSetBarcodeLengths( BarType barcodeType, UInt16 lengthType, UInt16 length1, UInt16 length2 ); +Int16 ScanGetBarcodeLengths( BarType barcodeType, UInt16* pLengthType, UInt16* pLength1, UInt16* pLength2 ); + +/******************************************************************* + * Preamble functions... * + *******************************************************************/ +Int16 ScanSetUpcPreamble( BarType barcodeType, Int16 preamble); +Int16 ScanGetUpcPreamble( BarType barcodeType); + +/******************************************************************* + * Prefix/Suffix functions... * + *******************************************************************/ +Int16 ScanSetPrefixSuffixValues( Int8 prefix, Int8 suffix_1, Int8 suffix_2 ); +Int16 ScanGetPrefixSuffixValues( Char * pPrefix, Char * pSuffix_1, Char * pSuffix_2 ); + +Int16 ScanSetCode32Prefix( Boolean bEnable ); +Int16 ScanGetCode32Prefix(); + +/******************************************************************* + * Functions to get/set which barcode conversions are in effect * + *******************************************************************/ +Int16 ScanSetConvert( ConvertType conversion, Boolean bEnable); +Int16 ScanGetConvert( ConvertType conversion); + + +/******************************************************************* + * Check Digit setup functions * + *******************************************************************/ +Int16 ScanSetTransmitCheckDigit( BarType barType, UInt16 check_digit ); +Int16 ScanGetTransmitCheckDigit( BarType barType ); + +Int16 ScanSetCode39CheckDigitVerification( UInt16 check_digit ); +Int16 ScanGetCode39CheckDigitVerification(); + +Int16 ScanSetI2of5CheckDigitVerification( UInt16 check_digit ); +Int16 ScanGetI2of5CheckDigitVerification(); + +Int16 ScanSetMsiPlesseyCheckDigits( UInt16 check_digits ); +Int16 ScanGetMsiPlesseyCheckDigits(); + +Int16 ScanSetMsiPlesseyCheckDigitAlgorithm( UInt16 algorithm ); +Int16 ScanGetMsiPlesseyCheckDigitAlgorithm(); + +/******************************************************************* + * Supplemental/Redundancy Functions... * + *******************************************************************/ +Int16 ScanSetDecodeUpcEanSupplementals( UInt16 supplementals ); +Int16 ScanGetDecodeUpcEanSupplementals(); + +Int16 ScanSetDecodeUpcEanRedundancy( UInt16 supplemental_redundancy ); +Int16 ScanGetDecodeUpcEanRedundancy(); + +/******************************************************************* + * Miscellaneous Functions... * + *******************************************************************/ + +Int16 ScanSetCode39FullAscii( Boolean bEnable ); +Int16 ScanGetCode39FullAscii(); + +Int16 ScanSetClsiEditing( Boolean bEnable ); +Int16 ScanGetClsiEditing(); + +Int16 ScanSetNotisEditing( Boolean bEnable ); +Int16 ScanGetNotisEditing(); + +Int16 ScanSetUpcEanSecurityLevel( UInt16 security_level ); +Int16 ScanGetUpcEanSecurityLevel(); + +Int16 ScanSetEanZeroExtend( Boolean bEnable ); +Int16 ScanGetEanZeroExtend(); + +Int16 ScanSetHostSerialResponseTimeOut( UInt16 time_out ); +Int16 ScanGetHostSerialResponseTimeOut(); + + +/******************************************************************* + * Decoder Command Functions... * + *******************************************************************/ +// Stu 4/16/98: Took out - this has been renamed to ScanGetDecodedData() +// Int16 ScanCmdDecodeData( MESSAGE *ptr ); +Int16 ScanCmdParamDefaults(); + +Int16 ScanCmdScanEnable(); +Int16 ScanCmdScanDisable(); + +Int16 ScanCmdStartDecode(); +Int16 ScanCmdStopDecode(); + +Int16 ScanCmdLedOn(); +Int16 ScanCmdLedOff(); + +Int16 ScanCmdAimOn(); +Int16 ScanCmdAimOff(); + +Int16 ScanGetAimMode(); +Int16 ScanGetScanEnabled(); +Int16 ScanGetLedState(); + +/******************************************************************* + * Decoder Hardware Functions... * + *******************************************************************/ +Int16 ScanSetLaserOnTime( UInt16 laser_on_time); +Int16 ScanGetLaserOnTime(); + +Int16 ScanSetDecodeLedOnTime( UInt16 led_on_time); +Int16 ScanGetDecodeLedOnTime(); + +Int16 ScanSetAngle( UInt16 scan_angle ); +Int16 ScanGetAngle(); + +Int16 ScanSetAimDuration( UInt16 aim_duration); +Int16 ScanGetAimDuration(); + +Int16 ScanSetTriggeringModes( UInt16 triggering_mode); +Int16 ScanGetTriggeringModes(); + +Int16 ScanSetTimeOutBetweenSameSymbol( UInt16 time_out ); +Int16 ScanGetTimeOutBetweenSameSymbol(); + +Int16 ScanSetLinearCodeTypeSecurityLevel( UInt16 security_level ); +Int16 ScanGetLinearCodeTypeSecurityLevel(); + +Int16 ScanSetBidirectionalRedundancy( UInt16 redundancy ); +Int16 ScanGetBidirectionalRedundancy(); + +Int16 ScanSetTransmitCodeIdCharacter( UInt16 code_id ); +Int16 ScanGetTransmitCodeIdCharacter(); + +Int16 ScanSetScanDataTransmissionFormat( UInt16 transmission_format ); +Int16 ScanGetScanDataTransmissionFormat(); + +/******************************************************************* + * Beeper Functions... * + *******************************************************************/ +Int16 ScanCmdBeep( BeepType beep ); + +Int16 ScanSetBeepAfterGoodDecode( Boolean bEnableBeep ); +Int16 ScanGetBeepAfterGoodDecode(); + +Int16 ScanSetBeepFrequency( FrequencyType type, Int16 beep_freq ); +Int16 ScanGetBeepFrequency( FrequencyType type ); + +Int16 ScanSetBeepDuration( DurationType type, Int16 beep_duration ); +Int16 ScanGetBeepDuration( DurationType type ); + +/******************************************************************* + * Trigger Sled Functions * + *******************************************************************/ +Int16 ScanCmdTrigSledOn(); +Int16 ScanCmdTrigSledOff(); +Int16 ScanGetTrigSledMode(); + +#ifdef __cplusplus + } +#endif diff --git a/src/Symbol/ScanMgrDef.h b/src/Symbol/ScanMgrDef.h new file mode 100644 index 0000000..9085be4 --- /dev/null +++ b/src/Symbol/ScanMgrDef.h @@ -0,0 +1,306 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 1998 Symbol Technologies, Inc. +* +* FILE: ScanMgrDef.h +* +* SYSTEM: Symbol barcode scanner for Palm III. +* +* HEADER: Scan Manager common defines. +* +* DESCRIPTION: Provies all common defines for such things as opcode values, +* error codes and parameter values for scan manager functions. +* +* HISTORY: 4/13/98 SS Created +* 3/30/00 JHD IV kept typedef enum tagScanMgrEvent in this module +* MW +* CFS added C++ #ifdef to +* 3/15/01 MikeF Broke out Symbol Events +* ... +*************************************************************************/ +#pragma once + +#include "SymbolEvents.h" + +/******************************************************************* + * Symbol unit hardware token (checked in ScanIsPalmSymbolUnit) + *******************************************************************/ + #ifdef __cplusplus + extern "C" { +#endif +#define SymbolROMToken 'scnr' + +/******************************************************************* + * Range Values + *******************************************************************/ +#define MIN_BEEP_DURATION 0 +#define MAX_BEEP_DURATION 10000 +#define MIN_BEEP_FREQUENCY 0 +#define MAX_BEEP_FREQUENCY 15000 +#define MIN_UPCEAN_REDUNDANCY 2 +#define MAX_UPCEAN_REDUNDANCY 20 +#define MIN_LASER_ON_TIME 5 +#define MAX_LASER_ON_TIME 99 +#define MAX_AIM_DURATION 99 +#define MAX_TIMEOUT_BETWEEN_SYMBOL 10 +#define MAX_DECODE_LED_ON_TIME 100 + + +/******************************************************************* + * Enumerated Types + *******************************************************************/ + +// BarType is used with several API functions to indicate which barcode type +// you wish to operate on. The functions that use BarType are: +// ScanSetBarcodeEnabled, SetBarcodeLengths, SetUpcPreamble, SetTransmitCheckDigit +typedef enum tagBarType +{ + barCODE39 = 0x00, + barUPCA = 0x01, + barUPCE = 0x02, + barEAN13 = 0x03, + barEAN8 = 0x04, + barD25 = 0x05, + barI2OF5 = 0x06, + barCODABAR = 0x07, + barCODE128 = 0x08, + barCODE93 = 0x09, + barTRIOPTIC39 = 0x0D, + barUCC_EAN128 = 0x0E, + barMSI_PLESSEY = 0x0B, + barUPCE1 = 0x0C, + barBOOKLAND_EAN= 0x53, + barISBT128 = 0x54, + barCOUPON = 0x55, + barPDF417 = 0x0F +} BarType; + +// BeepType defines various beep patterns you can sound with the following commands: +// ScanCmdSendParams, ScanCmdBeep +typedef enum tagBeepType +{ + No_Beep = 0x00, + 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, + + Decode_Beep, + Bootup_Beep, + Parameter_Entry_Error_Beep, + Parameter_Defaults_Beep, + Parameter_Entered_Beep, + Host_Convert_Error_Beep, + Transmit_Error_Beep, + Parity_Error_Beep, + + Last_Beep +} BeepType; + +// ConvertType specifieds the various barcode conversions that can be +// enabled/disabled by the function "ScanSetConvert". +typedef enum tagConvertType +{ + convertUpcEtoUpcA, + convertUpcE1toUpcA, + convertCode39toCode32, + convertEan8toEan13, + convertI2of5toEan13 + +} ConvertType; + + +// Param Types - internal +#define SHORT_BEEP_DUR 0x20 +#define MEDIUM_BEEP_DUR 0x21 +#define LONG_BEEP_DUR 0x22 +#define HIGH_FREQ 0x23 +#define MEDIUM_FREQ 0x24 +#define LOW_FREQ 0x25 +#define DECODE_BEEP_DUR 0x27 +#define DECODE_BEEP_FREQ 0x28 + +// Types of durations that can be set with ScanSetBeepDuration +typedef enum +{ + decodeDuration = DECODE_BEEP_DUR, + shortDuration = SHORT_BEEP_DUR, + mediumDuration = MEDIUM_BEEP_DUR, + longDuration = LONG_BEEP_DUR +} DurationType; + +// Types of frequencies that can be set with ScanSetBeepFrequency +typedef enum +{ + decodeFrequency = DECODE_BEEP_FREQ, + lowFrequency = LOW_FREQ, + mediumFrequency = MEDIUM_FREQ, + highFrequency = HIGH_FREQ +} FrequencyType; + +typedef enum +{ + buttonDateBook = 0, + buttonAddressBook, + buttonTodoList, + buttonMemoPad +} ButtonType; +/******************************************************************* + * Return Codes that come back from the various Scan Mgr API calls + *******************************************************************/ +#define STATUS_OK 0 +#define NOT_SUPPORTED -2 +#define COMMUNICATIONS_ERROR -3 +#define BAD_PARAM -4 +#define BATCH_ERROR -5 +#define ERROR_UNDEFINED -6 + + +/******************************************************************** + * Parameter values for various Scan Mgr API calls + ********************************************************************/ +// triggering modes + #define LEVEL 0x00 + #define PULSE 0x02 + #define HOST 0x08 + +// enable or disable for various params + #define DISABLE 0x00 + #define ENABLE 0x01 + +// Linear code type security + #define SECURITY_LEVEL0 0x00 + #define SECURITY_LEVEL1 0x01 + #define SECURITY_LEVEL2 0x02 + #define SECURITY_LEVEL3 0x03 + #define SECURITY_LEVEL4 0x04 + +// UPC/EAN Supplementals + #define IGNORE_SUPPLEMENTALS 0x00 + #define DECODE_SUPPLEMENTALS 0x01 + #define AUTODISCRIMINATE_SUPPLEMENTALS 0x02 + +// Transmit Check Digit options + #define DO_NOT_TRANSMIT_CHECK_DIGIT 0x00 + #define TRANSMIT_CHECK_DIGIT 0x01 + +// Preamble options + #define NO_PREAMBLE 0x00 + #define SYSTEM_CHARACTER 0x01 + #define SYSTEM_CHARACTER_COUNTRY_CODE 0x02 + +// Length types for the barcode SetLengths calls + #define ANY_LENGTH 0x00 + #define ONE_DISCRETE_LENGTH 0x01 + #define TWO_DISCRETE_LENGTHS 0x02 + #define LENGTH_WITHIN_RANGE 0x03 + +// CheckDigit verification options + #define DISABLE_CHECK_DIGIT 0x00 + #define USS_CHECK_DIGIT 0x01 + #define OPCC_CHECK_DIGIT 0x02 + +// MSI Plessey checkdigit options + #define ONE_CHECK_DIGIT 0x00 + #define TWO_CHECK_DIGITS 0x01 + +// MSI Plessey check digit algorithms + #define MOD10_MOD11 0x00 + #define MOD10_MOD10 0x01 + +// Transmit Code ID Character options + #define AIM_CODE_ID_CHARACTER 0x01 + #define SYMBOL_CODE_ID_CHARACTER 0x02 + +// Prefix/Suffix value options + #define PREFIX_SUFFIX_VALUES_P 0x69 + #define PREFIX_SUFFIX_VALUES_S1 0x68 + #define PREFIX_SUFFIX_VALUES_S2 0x6A + +// Scan data transmission formats + #define DATA_AS_IS 0x00 + #define DATA_SUFFIX1 0x01 + #define DATA_SUFFIX2 0x02 + #define DATA_SUFFIX1_SUFFIX2 0x03 + #define PREFIX_DATA 0x04 + #define PREFIX_DATA_SUFFIX1 0x05 + #define PREFIX_DATA_SUFFIX2 0x06 + #define PREFIX_DATA_SUFFIX1_SUFFIX2 0x07 + +// Scan angle options + #define SCAN_ANGLE_WIDE 0xB6 + #define SCAN_ANGLE_NARROW 0xB5 + +// barcode data types returned along with the decode data... + #define BCTYPE_NOT_APPLICABLE 0x00 + #define BCTYPE_CODE39 0x01 + #define BCTYPE_CODABAR 0x02 + #define BCTYPE_CODE128 0x03 + #define BCTYPE_D2OF5 0x04 + #define BCTYPE_IATA2OF5 0x05 + #define BCTYPE_I2OF5 0x06 + #define BCTYPE_CODE93 0x07 + #define BCTYPE_UPCA 0x08 + #define BCTYPE_UPCA_2SUPPLEMENTALS 0x48 + #define BCTYPE_UPCA_5SUPPLEMENTALS 0x88 + #define BCTYPE_UPCE0 0x09 + #define BCTYPE_UPCE0_2SUPPLEMENTALS 0x49 + #define BCTYPE_UPCE0_5SUPPLEMENTALS 0x89 + #define BCTYPE_EAN8 0x0A + #define BCTYPE_EAN8_2SUPPLEMENTALS 0x4A + #define BCTYPE_EAN13_5SUPPLEMENTALS 0x8B + #define BCTYPE_EAN8_5SUPPLEMENTALS 0x8A + #define BCTYPE_EAN13 0x0B + #define BCTYPE_EAN13_2SUPPLEMENTALS 0x4B + #define BCTYPE_MSI_PLESSEY 0x0E + #define BCTYPE_EAN128 0x0F + #define BCTYPE_UPCE1 0x10 + #define BCTYPE_UPCE1_2SUPPLEMENTALS 0x50 + #define BCTYPE_UPCE1_5SUPPLEMENTALS 0x90 + #define BCTYPE_CODE39_FULL_ASCII 0x13 + #define BCTYPE_TRIOPTIC_CODE39 0x15 + #define BCTYPE_BOOKLAND_EAN 0x16 + #define BCTYPE_COUPON_CODE 0x17 + #define BCTYPE_ISBT128 0x19 + #define BCTYPE_CODE32 0x20 + #define BCTYPE_PDF417 0x11 + +// custom launch codes for the Scan Manager software: +typedef enum { + myAppCmdBatteryAlert = sysAppLaunchCmdCustomBase, + myAppCmdS24BatteryAlert, + myAppCmdNotUsed +} MyAppCustomActionCodes; + +#define EXTENDED_DATA_FLAG 0x01 +#ifdef __cplusplus + } +#endif +/******************************************************************* + * end of file * + *******************************************************************/ diff --git a/src/Symbol/ScanMgrStruct.h b/src/Symbol/ScanMgrStruct.h new file mode 100644 index 0000000..698ecf8 --- /dev/null +++ b/src/Symbol/ScanMgrStruct.h @@ -0,0 +1,123 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 1998 Symbol Technologies, Inc. +* +* FILE: ScanMgrStruct.h +* +* SYSTEM: Symbol barcode scanner for Palm III. +* +* HEADER: Scan Manager structure definitions +* +* DESCRIPTION: Provides the structure definitions used by the internal +* functions of the decoder shared library. +* +* HISTORY: 4/13/98 SS Created +* 12/31/00 Inv. Removed PalmCompatibility.h for PalmOS 3.5 conversion +* +* ... +*************************************************************************/ +#pragma once on + +#ifdef __cplusplus + extern "C" { +#endif + +// The ScanEvent record. +typedef struct +{ + eventsEnum eType; + Boolean penDown; + Int16 screenX; + Int16 screenY; + union scanData + { + struct scanGen + { + UInt16 data1; // Use this variable as flag to tell app if decode data has multiple packets. + UInt16 data2; + UInt16 data3; + UInt16 data4; + UInt16 data5; + UInt16 data6; + UInt16 data7; + UInt16 data8; + } scanGen; + + struct + { + UInt16 batteryLevel; // The current voltage measured in millivolts + UInt16 batteryErrorType; // not used + } batteryError; + + } scanData; // End of union + +} ScanEventType; +typedef ScanEventType *ScanEventPtr; + +/******************************************************************* + * Message structure used to hold decoder messages * + * Used by ScanGetDecodeData to return barcode type and data * + *******************************************************************/ +#define MAX_PACKET_LENGTH 258 //origin for 1D: 258 +typedef struct tagMESSAGE +{ + Int16 length; // length of the data + Int16 type; // contains the barcode type when the msg is DecodeData + Int16 status; // should be STATUS_OK + UInt8 data[MAX_PACKET_LENGTH]; // the message data +} MESSAGE; + +#define MAX_DCD_LENGTH 3000 //origin for 1D: 258 +/******************************************************************* + * * + *******************************************************************/ + +typedef struct tagMESSAGE_Dcd +{ + Int16 length; // length of the data + Int16 type; // contains the barcode type when the msg is DecodeData + Int16 status; // should be STATUS_OK + UInt8 data[MAX_DCD_LENGTH]; // the message data +} MESSAGE_Dcd; + +/******************************************************************* + * BATCH structure used to hold all the decoder parameters to be * + * sent to the decoder. Not used by application programmers. * + *******************************************************************/ +#define MAX_BATCH_PARAM 247 +typedef struct tagBATCH +{ + Int16 length; + Int16 data[MAX_BATCH_PARAM + 3]; +} BATCH; + +/******************************************************************* + * Communication structure COMM_STRUCT is used in the Scan Manager * + * internal code. * + * Note that the communications parameters are preset for this * + * version of the decoder and need not be changed by applications. * + *******************************************************************/ +typedef struct tagCOMM_STRUCT +{ + Int16 port; + Int16 baud; + Int16 parity; + Int16 stop_bits; + Int16 host_timeout; +} COMM_STRUCT; + + +#define PACKET_CONTINUATION 0x0002 + +/******************************************************************* + + * Decoder Parameters * + + *******************************************************************/ + + +#define MAX_DECODER_PARMS 1024 + + +#ifdef __cplusplus + } +#endif diff --git a/src/Symbol/SymbolEvents.h b/src/Symbol/SymbolEvents.h new file mode 100644 index 0000000..425c5f8 --- /dev/null +++ b/src/Symbol/SymbolEvents.h @@ -0,0 +1,56 @@ +/************************************************************************ +* +* COPYRIGHT: Copyright © 2001 Symbol Technologies, Inc. +* +* FILE: SymbolEvents.h +* +* SYSTEM: Symbol Palm Platform. +* +* HEADER: Symbol Generated Palm Event defines. +* +* DESCRIPTION: defines all Symbol Specific Events. +* +* HISTORY: 03/15/01 Created +* +*************************************************************************/ + +#ifndef _Symbol_Events__h_ +#define _Symbol_Events__h_ + + #ifdef __cplusplus + extern "C" { +#endif + +typedef enum tagSymbolEvent +{ + scanDecodeEvent = 0x7fff+0x800, // A decode has finished (valid or invalid decode) + scanBatteryErrorEvent, // Battery too low to perform scan + scanTriggerEvent, // A scan attempt was initiated - hard or soft trigger + s24BatteryErrorEvent, + symbolRFUA, // DO NOT USE symbolRFUA, reserved for symbol use only + symbolRFUB, // DO NOT USE symbolRFUB, reserved for symbol use only + symbolRFUC, // DO NOT USE symbolRFUC, reserved for symbol use only + symbolRFUD, // DO NOT USE symbolRFUD, reserved for symbol use only + symbolRFUE, // DO NOT USE symbolRFUE, reserved for symbol use only + symbolRFUF, // DO NOT USE symbolRFUF, reserved for symbol use only + symbolRFUG, // DO NOT USE symbolRFUG, reserved for symbol use only + symbolRFUH, // DO NOT USE symbolRFUH, reserved for symbol use only + + WanLowBatteryEvent, //The system has detected that the battery voltage is too low + //to operate the WAM radio. The voltage to the radio has been + //removed. + WanBatteryErrorEvent, //The battery has become dislodged or replaced. + //The voltage to the radio has been removed. + lastSymbolEvent + +} SymbolEvents; + + +#ifdef __cplusplus + } +#endif + +#endif +/******************************************************************* + * end of file * + *******************************************************************/ diff --git a/src/Symbol/UserControl.h b/src/Symbol/UserControl.h new file mode 100644 index 0000000..9ce513b --- /dev/null +++ b/src/Symbol/UserControl.h @@ -0,0 +1,49 @@ +/************************************************************************ +* COPYRIGHT: Copyright © 2001 Symbol Technologies, Inc. +* +* FILE: UserControl.h +* +* SYSTEM: Symbol GSM Driver +* +* HEADER: User Defined Control Header +* +* DESCRIPTION: Definitions used for obtaining driver version +* and modem information from the GSM modem driver +* using the Serial manager User Defined Control Code +* +* HISTORY: 07/28/00 M. Faith Created +* 01/30/01 M. Faith Added Symbol Copyright statement +* 03/11/02 M. Faith Added G18 Modem Definition +* +*************************************************************************/ + + +/* + * Info Control Block + */ +typedef struct _modemInfoCB { + UInt16 cmd; + UInt16 reserved1; + UInt16 retVal; + UInt16 retVal2; + void *paramPtr; + } modemInfoCB; + +/* + * Control Block Commands + */ +#define MI_GET_MODEM_TYPE 1 +#define MI_GET_DRIVER_VER 2 + + +/* + * Control Block Return Values + */ +#define MI_INVALID_CONTROL_CMD -1 + +#define UBINETICS_MODEM 1 +#define WAVECOM_MODEM 2 +#define MOTOROLA_G18_MODEM 3 + + +