public class Device
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Device.CartonContentsReportListener
Defines the Interface for the CartonContentsReport Listener
|
static interface |
Device.DeviceEventReportListener
Defines the Interface for the DeviceEventReport Listener
|
class |
Device.DeviceException
General exception while communication with the Speedway
|
static interface |
Device.OperationSummaryReportListener
Defines the Interface for the OperationSummaryReport Listener
|
static interface |
Device.TagOperationReportListener
Defines the Interface for the TagOperationReport Listener
|
| Modifier and Type | Field and Description |
|---|---|
protected static byte |
FORMATTING_LENGTH |
protected static byte[] |
FRAME_MARKER_BYTES |
static java.lang.String |
JUNIT_TEST_TAG |
protected static int |
MAX_SENSIBLE_FRAME_LENGTH |
protected static int |
PORT |
protected static byte |
VERSION_BYTE |
| Constructor and Description |
|---|
Device(java.lang.String ipOrHost)
Provides the application a communication interface with the Device
|
Device(java.lang.String ipOrHost,
int timeoutMS)
Provides the application a communication interface with the Device
|
public static final java.lang.String JUNIT_TEST_TAG
protected static int PORT
protected static byte[] FRAME_MARKER_BYTES
protected static byte VERSION_BYTE
protected static byte FORMATTING_LENGTH
protected static int MAX_SENSIBLE_FRAME_LENGTH
public Device(java.lang.String ipOrHost,
int timeoutMS)
throws java.io.IOException
ipOrHost - of the Speedway Device. Can be an IP address or host name.timeoutMS - Connection timeout in millisecondsjava.io.IOException - TCP/IP communication failurepublic Device(java.lang.String ipOrHost)
throws java.io.IOException
ipOrHost - of the Speedway Device. Can be an IP address or host name. Default timeout 1 second.java.io.IOException - TCP/IP communication failurepublic static byte[] buildPayloadBuffer(byte[] payloadBytes)
protected void txToReader(StpApi.Command command) throws java.io.IOException
java.io.IOExceptionprotected byte[] getNextToHost()
throws com.impinj.stp.Device.BadBytesReceivedException,
java.io.IOException
BadBytesReceivedException - an error in CRC or reading from the data streamjava.io.IOException - TCP/IP communication failurecom.impinj.stp.Device.BadBytesReceivedExceptionpublic void setDebug(boolean on)
on - sends debug messages if true (Default: false)public void stpClose()
public StpApi.ConnectResp handshake() throws Device.DeviceException
Device.DeviceException - when command failspublic java.util.List<StpApi.Version> getVersions() throws Device.DeviceException
Device.DeviceException - when command failspublic StpApi.StartResp start() throws Device.DeviceException
Device.DeviceException - when command failspublic StpApi.StopResp stop() throws Device.DeviceException
Device.DeviceException - when command failspublic StpApi.EngageResp engage() throws Device.DeviceException
Device.DeviceException - when command failspublic StpApi.DisengageResp disengage() throws Device.DeviceException
Device.DeviceException - when command failspublic StpApi.ConnectResp runConnectCommand(StpApi.ConnectCommand cmd) throws Device.DeviceException
cmd - Builder object for ConnectCommandDevice.DeviceException - when command fails (See error Message)public StpApi.GetVersionsReaderResp runGetVersionsReaderCommand(StpApi.GetVersionsReaderCommand cmd) throws Device.DeviceException
cmd - Builder object for GetVersionsReaderCommandDevice.DeviceException - when command fails (See error Message)public StpApi.StartResp runStartCommand(StpApi.StartCommand cmd) throws Device.DeviceException
cmd - Builder object for StartCommandDevice.DeviceException - when command fails (See error Message)public StpApi.StopResp runStopCommand(StpApi.StopCommand cmd) throws Device.DeviceException
cmd - Builder object for StopCommandDevice.DeviceException - when command fails (See error Message)public StpApi.SetDeviceConfigResp runSetDeviceConfigCommand(StpApi.SetDeviceConfigCommand cmd) throws Device.DeviceException
cmd - Builder object for SetDeviceConfigCommandDevice.DeviceException - when command fails (See error Message)public StpApi.GetDeviceConfigResp runGetDeviceConfigCommand(StpApi.GetDeviceConfigCommand cmd) throws Device.DeviceException
cmd - Builder object for GetDeviceConfigCommandDevice.DeviceException - when command fails (See error Message)public StpApi.SetAntennaConfigResp runSetAntennaConfigCommand(StpApi.SetAntennaConfigCommand cmd) throws Device.DeviceException
cmd - Builder object for SetAntennaConfigCommandDevice.DeviceException - when command fails (See error Message)public StpApi.GetAntennaConfigResp runGetAntennaConfigCommand(StpApi.GetAntennaConfigCommand cmd) throws Device.DeviceException
cmd - Builder object for GetAntennaConfigCommandDevice.DeviceException - when command fails (See error Message)public StpApi.EngageResp runEngageCommand(StpApi.EngageCommand cmd) throws Device.DeviceException
cmd - Builder object for EngageCommandDevice.DeviceException - when command fails (See error Message)public StpApi.DisengageResp runDisengageCommand(StpApi.DisengageCommand cmd) throws Device.DeviceException
cmd - Builder object for DisengageCommandDevice.DeviceException - when command fails (See error Message)public StpApi.SetOperationResultGPOResp runSetOperationResultGPOCommand(StpApi.SetOperationResultGPOCommand cmd) throws Device.DeviceException
cmd - Builder object for SetOperationResultGPOCommandDevice.DeviceException - when command fails (See error Message)public StpApi.AddSerializationJobResp runAddSerializationJobCommand(StpApi.AddSerializationJobCommand cmd) throws Device.DeviceException
cmd - Builder object for AddSerializationJobCommandDevice.DeviceException - when command fails (See error Message)public StpApi.RemoveSerializationJobResp runRemoveSerializationJobCommand(StpApi.RemoveSerializationJobCommand cmd) throws Device.DeviceException
cmd - Builder object for RemoveSerializationJobCommandDevice.DeviceException - when command fails (See error Message)public StpApi.AddTIDTableEntriesResp runAddTIDTableEntriesCommand(StpApi.AddTIDTableEntriesCommand cmd) throws Device.DeviceException
cmd - Builder object for AddTIDTableEntriesCommandDevice.DeviceException - when command fails (See error Message)public StpApi.AddOrderedListEntriesResp runAddOrderedListEntriesCommand(StpApi.AddOrderedListEntriesCommand cmd) throws Device.DeviceException
cmd - Builder object for AddOrderedListEntriesCommandDevice.DeviceException - when command fails (See error Message)public StpApi.SetInventoryJobResp runSetInventoryJobCommand(StpApi.SetInventoryJobCommand cmd) throws Device.DeviceException
cmd - Builder object for SetInventoryJobCommandDevice.DeviceException - when command fails (See error Message)public StpApi.SetCartonContentsJobResp runSetCartonContentsJobCommand(StpApi.SetCartonContentsJobCommand cmd) throws Device.DeviceException
cmd - Builder object for SetCartonContentsJobCommandDevice.DeviceException - when command fails (See error Message)public StpApi.GetOperationDataResp runGetOperationDataCommand(StpApi.GetOperationDataCommand cmd) throws Device.DeviceException
cmd - Builder object for GetOperationDataCommandDevice.DeviceException - when command fails (See error Message)public StpApi.AddLicenseKeyResp runAddLicenseKeyCommand(StpApi.AddLicenseKeyCommand cmd) throws Device.DeviceException
cmd - Builder object for AddLicenseKeyCommandDevice.DeviceException - when command fails (See error Message)public StpApi.GetDeviceStateResp runGetDeviceStateCommand(StpApi.GetDeviceStateCommand cmd) throws Device.DeviceException
cmd - Builder object for GetDeviceStateCommandDevice.DeviceException - when command fails (See error Message)public void addOperationSummaryReportListener(Device.OperationSummaryReportListener report)
report - OperationSummaryReport Listener to be addedpublic void removeOperationSummaryReportListener(Device.OperationSummaryReportListener report)
report - OperationSummaryReport Listener to be removedpublic void addTagOperationReportListener(Device.TagOperationReportListener report)
report - TagOperationReport Listener to be addedpublic void removeTagOperationReportListener(Device.TagOperationReportListener report)
report - TagOperationReport Listener to be removedpublic void addDeviceEventReportListener(Device.DeviceEventReportListener report)
report - DeviceEventReport Listener to be addedpublic void removeDeviceEventReportListener(Device.DeviceEventReportListener report)
report - DeviceEventReport Listener to be removedpublic void addCartonContentsReportListener(Device.CartonContentsReportListener report)
report - CartonContentsReport Listener to be addedpublic void removeCartonContentsReportListener(Device.CartonContentsReportListener report)
report - CartonContentsReport Listener to be removedpublic java.lang.String kdkVersion()