Class UsbConnection

Object
com.zebra.sdk.comm.ConnectionA
com.zebra.sdk.comm.UsbConnection
All Implemented Interfaces:
Connection, ConnectionWithWriteLogging, com.zebra.sdk.comm.internal.ConnectionI

public class UsbConnection extends ConnectionA implements com.zebra.sdk.comm.internal.ConnectionI
Establishes a direct connection to an attached Zebra USB printer without requiring the presence of a USB driver
  • Constructor Details

    • UsbConnection

      public UsbConnection(String symbolicName) throws ConnectionException
      Initializes a new instance of the UsbConnection class. This constructor will attempt a connection to the printer specified in the symbolic name.
      Parameters:
      symbolicName - the USB symbolic name for the device returned by the UsbDiscoverer.getZebraUsbPrinters() member function.
      Throws:
      ConnectionException - if the system is not running the Windows operating system or if the device cannot be found.
    • UsbConnection

      public UsbConnection(String symbolicName, int maxTimeoutForRead, int timeToWaitForMoreData) throws ConnectionException
      Initializes a new instance of the UsbConnection class. This constructor will attempt a connection to the printer specified in the symbolic name.
      Parameters:
      symbolicName - the USB symbolic name for the device returned by the UsbDiscoverer.getZebraUsbPrinters() member function.
      maxTimeoutForRead - Maximum time to wait for read data
      timeToWaitForMoreData - maximum time to wait for more data after initial data is sent from printer
      Throws:
      ConnectionException - if the system is not running the Windows operating system or if the device cannot be found.
  • Method Details