Package com.zebra.scannercontrol
Class USBCDCScanner
- java.lang.Object
-
- com.zebra.scannercontrol.DCSScannerInfo
-
- com.zebra.scannercontrol.USBCDCScanner
-
public class USBCDCScanner extends DCSScannerInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
USBCDCScanner.SSIDecodeDataPlus
-
Field Summary
-
Constructor Summary
Constructors Constructor Description USBCDCScanner(Context context)
USBCDCScanner(Context context, USBCDCScanner parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
barcodeEvent(byte[] barcodeData, int barcodeType)
void
binaryDataEvent(byte[] binaryData)
protected boolean
breakdownMyTunnel()
void
cleanUp()
int
cmdMPAck(int number)
void
communicationSessionEstablished()
void
communicationSessionTerminated()
boolean
connect()
void
disable()
void
disconnect()
void
enable()
void
enumerateAuxScanners(com.zebra.scannercontrol.Scanner scanner)
protected boolean
enumerateEndPointsAndStartReading()
protected DCSSDKDefs.DCSSDK_RESULT
executeCommand(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, java.lang.String inXML, java.lang.StringBuilder outXML, boolean isSync, boolean isSSICommand)
java.lang.String
getFileName(Uri uri)
java.lang.String
getFilePath(Uri uri)
java.lang.String
getGUID()
java.lang.String
getInternalName()
protected UsbDevice
getmHWDevice()
int
getNotificationEventsMask()
protected boolean
getPacketSize()
int
getProductID()
java.lang.String
getSerialNumber()
java.lang.String
getTunnelAddress()
protected int
getTwoBytes(byte[] buffer, int offset)
int
getVendorID()
void
imageEvent(byte[] imageData)
boolean
initialize(SDKHandler _sdkHandler)
boolean
isBulkFirmwareUpdateAvailable()
boolean
isFirmwareUpdateInProgress()
boolean
isReady()
boolean
isScaleAvailable()
Purpose: Checks whether the scale functionality is available with the underlying barcode scannerboolean
isSsiPlusSupport()
void
postData(byte[] data)
void
readData(byte[] data)
protected void
readDataFromScanner(byte[] buffer, int size)
void
rsmEvent(byte[] eventData)
void
scannerAppeared()
void
scannerDisAppeared()
int
sendHostInit()
void
setBulkFirmwareUpdateAvailable(boolean bulkFirmwareUpdateAvailable)
void
setFirmwareUpdateInProgress(boolean firmwareUpdateInProgress)
void
setGUID(java.lang.String GUID)
void
setInternalName(java.lang.String internalName)
protected void
setmHWDevice(UsbDevice mHWDevice)
protected void
setmUSBManager(UsbManager mUSBManager)
void
setNotificationEventsMask(int notificationEventsMask)
void
setProductID(int productID)
void
setReady(boolean ready)
DCSSDKDefs.DCSSDK_RESULT
setScaleDisable()
Purpose: Disables the scale of the underlying barcode scannerDCSSDKDefs.DCSSDK_RESULT
setScaleEnable()
Purpose: Enables the scale of the underlying barcode scannerstatic void
setSdkHandler(SDKHandler sdkHandler)
void
setSerialNumber(java.lang.String RMDAttrSerialNumber)
void
setSsiPlusSupport(boolean ssiPlusSupport)
protected boolean
setupTunnelToMe()
void
setVendorID(int vendorID)
void
stopRSMEventThread()
Method to stop RSMEvent threadprotected byte[]
tunnelReportContext()
This command is always processed at root nodeprotected byte[]
tunnelReportNextHop()
void
updateAssetInfo()
void
updateScannerName()
void
videoEvent(byte[] videoData)
-
Methods inherited from class com.zebra.scannercontrol.DCSScannerInfo
getAuxiliaryScanners, getConnectionType, getScannerHWSerialNumber, getScannerID, getScannerModel, getScannerName, isActive, isAutoCommunicationSessionReestablishment
-
-
-
-
Field Detail
-
USB_CDC_RESPONSE_ACTION
public static final java.lang.String USB_CDC_RESPONSE_ACTION
- See Also:
- Constant Field Values
-
waitTime
public static final long waitTime
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_DECODE_DATA_RSM_EVENT
public static final int ATTRIBUTE_NUMBER_DECODE_DATA_RSM_EVENT
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_ENABLE_TOPOLOGY_CHANGE
public static final int ATTRIBUTE_NUMBER_ENABLE_TOPOLOGY_CHANGE
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_CONTEXT_ADDRESS
public static final int ATTRIBUTE_NUMBER_CONTEXT_ADDRESS
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_SUPERVISOR_MODE
public static final int ATTRIBUTE_NUMBER_SUPERVISOR_MODE
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_MODEL
public static final int ATTRIBUTE_NUMBER_MODEL
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_SERIAL
public static final int ATTRIBUTE_NUMBER_SERIAL
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_SCALE_AVAILABLE
public static final int ATTRIBUTE_NUMBER_SCALE_AVAILABLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_SCALE_ENABLE_DISABLE
public static final int ATTRIBUTE_NUMBER_SCALE_ENABLE_DISABLE
- See Also:
- Constant Field Values
-
MAX_RSM_PAYLOAD_SIZE
public static final int MAX_RSM_PAYLOAD_SIZE
- See Also:
- Constant Field Values
-
RSM_PAYLOAD_LENGTH_SIZE
public static final int RSM_PAYLOAD_LENGTH_SIZE
- See Also:
- Constant Field Values
-
ATTRIBUTE_DISABLE
public static final short ATTRIBUTE_DISABLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_ENABLE
public static final short ATTRIBUTE_ENABLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE_BYTE
public static final char ATTRIBUTE_TYPE_BYTE
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE_ACTION
public static final char ATTRIBUTE_TYPE_ACTION
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_READ_WEIGHT
public static final int ATTRIBUTE_NUMBER_READ_WEIGHT
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_ZERO_SCALE
public static final int ATTRIBUTE_NUMBER_ZERO_SCALE
- See Also:
- Constant Field Values
-
ATTRIBUTE_NUMBER_RESET_SCALE
public static final int ATTRIBUTE_NUMBER_RESET_SCALE
- See Also:
- Constant Field Values
-
FASTER_FIRMWARE_DATA_INDEX
public static final int FASTER_FIRMWARE_DATA_INDEX
- See Also:
- Constant Field Values
-
HEXADECIMAL_RADIX
public static final int HEXADECIMAL_RADIX
- See Also:
- Constant Field Values
-
BASE_HEX_FORMAT
public static final java.lang.String BASE_HEX_FORMAT
- See Also:
- Constant Field Values
-
FASTER_FIRMWARE_THREAD_STARTED
public static boolean FASTER_FIRMWARE_THREAD_STARTED
-
FASTER_FIRMWARE_SUPPORTED
public static boolean FASTER_FIRMWARE_SUPPORTED
-
bytesSentOverBulk
protected int bytesSentOverBulk
-
hostCapacity
protected int hostCapacity
-
canSendToHost
protected int canSendToHost
-
readWritePermission
public static java.lang.String readWritePermission
-
firmwareFolderName
public static java.lang.String firmwareFolderName
-
ContentUriIdentifierSubString
public static java.lang.String ContentUriIdentifierSubString
-
sdkHandler
protected static SDKHandler sdkHandler
-
-
Constructor Detail
-
USBCDCScanner
public USBCDCScanner(Context context)
-
USBCDCScanner
public USBCDCScanner(Context context, USBCDCScanner parent)
-
-
Method Detail
-
getInternalName
public java.lang.String getInternalName()
-
setInternalName
public void setInternalName(java.lang.String internalName)
-
getProductID
public int getProductID()
-
setProductID
public void setProductID(int productID)
-
getVendorID
public int getVendorID()
-
setVendorID
public void setVendorID(int vendorID)
-
getmHWDevice
protected UsbDevice getmHWDevice()
-
setmHWDevice
protected void setmHWDevice(UsbDevice mHWDevice)
-
setmUSBManager
protected void setmUSBManager(UsbManager mUSBManager)
-
isBulkFirmwareUpdateAvailable
public boolean isBulkFirmwareUpdateAvailable()
-
setBulkFirmwareUpdateAvailable
public void setBulkFirmwareUpdateAvailable(boolean bulkFirmwareUpdateAvailable)
-
getGUID
public java.lang.String getGUID()
-
setGUID
public void setGUID(java.lang.String GUID)
-
isSsiPlusSupport
public boolean isSsiPlusSupport()
-
setSsiPlusSupport
public void setSsiPlusSupport(boolean ssiPlusSupport)
-
initialize
public boolean initialize(SDKHandler _sdkHandler)
-
enumerateEndPointsAndStartReading
protected boolean enumerateEndPointsAndStartReading()
-
updateScannerName
public void updateScannerName()
-
sendHostInit
public int sendHostInit()
-
connect
public boolean connect()
-
disconnect
public void disconnect()
-
postData
public void postData(byte[] data)
-
readData
public void readData(byte[] data)
-
cleanUp
public void cleanUp()
-
readDataFromScanner
protected void readDataFromScanner(byte[] buffer, int size)
-
cmdMPAck
public int cmdMPAck(int number)
-
getTunnelAddress
public java.lang.String getTunnelAddress()
-
getNotificationEventsMask
public int getNotificationEventsMask()
-
setNotificationEventsMask
public void setNotificationEventsMask(int notificationEventsMask)
-
setSdkHandler
public static void setSdkHandler(SDKHandler sdkHandler)
-
isFirmwareUpdateInProgress
public boolean isFirmwareUpdateInProgress()
-
setFirmwareUpdateInProgress
public void setFirmwareUpdateInProgress(boolean firmwareUpdateInProgress)
-
getSerialNumber
public java.lang.String getSerialNumber()
-
setSerialNumber
public void setSerialNumber(java.lang.String RMDAttrSerialNumber)
-
communicationSessionEstablished
public void communicationSessionEstablished()
-
scannerAppeared
public void scannerAppeared()
-
barcodeEvent
public void barcodeEvent(byte[] barcodeData, int barcodeType)
-
imageEvent
public void imageEvent(byte[] imageData)
-
videoEvent
public void videoEvent(byte[] videoData)
-
binaryDataEvent
public void binaryDataEvent(byte[] binaryData)
-
rsmEvent
public void rsmEvent(byte[] eventData)
-
getPacketSize
protected boolean getPacketSize()
-
enumerateAuxScanners
public void enumerateAuxScanners(com.zebra.scannercontrol.Scanner scanner)
-
tunnelReportNextHop
protected byte[] tunnelReportNextHop()
-
setupTunnelToMe
protected boolean setupTunnelToMe()
-
breakdownMyTunnel
protected boolean breakdownMyTunnel()
-
tunnelReportContext
protected byte[] tunnelReportContext()
This command is always processed at root node- Returns:
-
executeCommand
protected DCSSDKDefs.DCSSDK_RESULT executeCommand(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, java.lang.String inXML, java.lang.StringBuilder outXML, boolean isSync, boolean isSSICommand)
-
getFileName
public java.lang.String getFileName(Uri uri)
-
getFilePath
public java.lang.String getFilePath(Uri uri)
-
getTwoBytes
protected int getTwoBytes(byte[] buffer, int offset)
-
scannerDisAppeared
public void scannerDisAppeared()
-
stopRSMEventThread
public void stopRSMEventThread()
Method to stop RSMEvent thread
-
communicationSessionTerminated
public void communicationSessionTerminated()
-
updateAssetInfo
public void updateAssetInfo()
-
isScaleAvailable
public boolean isScaleAvailable()
Purpose: Checks whether the scale functionality is available with the underlying barcode scanner- Returns:
- true if there is a scale in the underlying barcode scanner and false , if not.
-
setScaleEnable
public DCSSDKDefs.DCSSDK_RESULT setScaleEnable()
Purpose: Enables the scale of the underlying barcode scanner- Returns:
- DCSSDK_RESULT_SUCCESS if enabling is success. If there is no scale present returns : DCSSDK_RESULT_SCALE_NOT_PRESENT
-
setScaleDisable
public DCSSDKDefs.DCSSDK_RESULT setScaleDisable()
Purpose: Disables the scale of the underlying barcode scanner- Returns:
- DCSSDK_RESULT_SUCCESS if disabling is success. If there is no scale present returns : DCSSDK_RESULT_SCALE_NOT_PRESENT
-
isReady
public boolean isReady()
-
setReady
public void setReady(boolean ready)
-
enable
public void enable()
-
disable
public void disable()
-
-