public interface Device
All the application use Device object to visit the devices in terminal. The device in the terminal is exclusive device,every device must be opened by one device object in the same time, if the device has different logic classification,each logic classification has been opened by one device object.
The following is not allowed:
But It permits that the different device object open a different logic classification device. Some special device can be opened sharable,for example security device.
Modifier and Type | Method and Description |
---|---|
void |
cancelRequest()
Attempts to cancel a pending request.
|
void |
close()
Disconnect a device from the device object.
|
long |
getFailCount()
Gets the fail count of the three card, it can not be reset after get.
|
long |
getUsageCount()
Gets the three card using counts, it can not be reset after get.
|
void |
open()
Uses default logical ID to open the device for use.
|
void open() throws DeviceException
DeviceException
void close() throws DeviceException
If a continuous activity has been started by the device object, this activity is stopped. For example, the led object stop any continuous blink when it close.
Once closed, the device object is no longer associated with any particular device, open() may then be used to reestablish a connection to either the former device object or a new device object.
If there is a asynchronous request before close, then the asynchronous request will be cancelled.
DeviceException
- :
void cancelRequest() throws DeviceException
The exact performance of this command is operation-specific and falls into one of 2 categories.
DeviceException
- :
long getUsageCount()
long getFailCount()