public interface LEDGroupDevice extends Device
LEDGroupDevice interface defines the API for interacting with LED devices.
This interface allows applications to control and manipulate the operation of LED hardware.
To obtain an instance of LEDGroupDevice, use the following code:
LEDGroupDevice ledGroupDevice = (LEDGroupDevice) POSTerminal.getInstance().getDevice("com.cloudpos.device.ledgroup");
Here, "com.cloudpos.device.ledgroup" is a string identifier for the LED device, as defined by the specific implementation.
Applications must request permission to access this device as shown:
<uses-permission android:name="android.permission.CLOUDPOS_LED" />
Device| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_OFF
Light off
|
static int |
STATUS_ON
Light on
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelBlink(int logicalID)
Cancels the ongoing blinking operation of the LED with the specified logical ID.
|
int |
getStatus(int logicalID)
Retrieves the current status of the LED with the specified logical ID.
|
void |
startBlink(int logicalID,
long delayTurnOn,
long delayTurnOff)
Initiates a continuous blinking pattern for the LED with the specified logical ID.
|
void |
startBlink(int logicalID,
long delayTurnOn,
long delayTurnOff,
int counts)
Initiates a continuous blinking pattern for the LED with the specified logical ID.
|
void |
turnOff(int logicalID)
Turns off the LED with the specified logical ID.
|
void |
turnOn(int logicalID)
Turns on the LED with the specified logical ID.
|
cancelRequest, close, getFailCount, getUsageCount, openstatic final int STATUS_OFF
static final int STATUS_ON
void cancelBlink(int logicalID)
throws DeviceException
DeviceException - for standard reasons as documented in DeviceException.int getStatus(int logicalID)
throws DeviceException
STATUS_OFF or STATUS_ON.DeviceException - for standard reasons as documented in DeviceException.void startBlink(int logicalID,
long delayTurnOn,
long delayTurnOff)
throws DeviceException
cancelBlink(int) to abort blinking.logicalID - the LED logicalIDdelayTurnOn - Time in milliseconds for the LED to remain on during each blink.delayTurnOff - Time in milliseconds for the LED to remain off between blinks.DeviceException - for standard reasons as documented in DeviceException.void startBlink(int logicalID,
long delayTurnOn,
long delayTurnOff,
int counts)
throws DeviceException
cancelBlink(int) to abort blinking.logicalID - the LED logicalIDdelayTurnOn - Time in milliseconds for the LED to remain on during each blink.delayTurnOff - Time in milliseconds for the LED to remain off between blinks.counts - Number of blinking cycles to perform.DeviceException - for standard reasons as documented in DeviceException.void turnOff(int logicalID)
throws DeviceException
DeviceException - for standard reasons as documented in DeviceException.void turnOn(int logicalID)
throws DeviceException
DeviceException - for standard reasons as documented in DeviceException.