public class

LedManager

extends Object
java.lang.Object
   ↳ com.datalogic.device.notification.LedManager

Class Overview

This class provides access to leds related methods of the device.

Summary

Public Constructors
LedManager()
This is the constructor of LedManager.
Public Methods
int blinkLed(Led id, int count, int onMS, int offMS)
Blinking led method.
int blinkLed(Led id, int ARGB, int count, int onMS, int offMS)
Blinking led method.
int setLed(Led id, boolean enable)
Setting led method.
int setLed(Led id, boolean enable, int ARGB)
Setting led method.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LedManager ()

Added in revision 1

This is the constructor of LedManager.

Throws
DeviceException in case of error.

Public Methods

public int blinkLed (Led id, int count, int onMS, int offMS)

Added in revision 1

Blinking led method. This method start blinking a led without blocking the caller thread.

Parameters
id Specifies which Led to control.
count int value that specifies how many on/off cycles should be performed before the LED is turned off. If set to zero, then the LED is turned off immediately. If set to -1, the LED is cycled until it is explicitly turned off.
onMS int value that specifies how long (in ms) during an on/off cycle the LED should be turned on. If set to zero, the LED is simply turned off.
offMS int range that specifies how long (in ms) during an on/off cycle the LED should be turned off. If set to zero, the LED remains on until all cycles are complete.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Throws
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int blinkLed (Led id, int ARGB, int count, int onMS, int offMS)

Added in revision 1

Blinking led method. This method start blinking a led without blocking the caller thread.

Parameters
id Specifies which Led to control.
ARGB int value that specifies the led color in RGB 24 bits format, following the standard components defined in android.graphics.Color.
count int value that specifies how many on/off cycles should be performed before the LED is turned off. If set to zero, then the LED is turned off immediately. If set to -1, the LED is cycled until it is explicitly turned off.
onMS int value that specifies how long (in ms) during an on/off cycle the LED should be turned on. If set to zero, the LED is simply turned off.
offMS int range that specifies how long (in ms) during an on/off cycle the LED should be turned off. If set to zero, the LED remains on until all cycles are complete.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Throws
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int setLed (Led id, boolean enable)

Added in revision 1

Setting led method. This method turns on or off a led without blocking the caller thread.

Parameters
id Specifies which Led to control.
enable A boolean value set to true that enables the LED and a value of false that disables the LED.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Throws
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int setLed (Led id, boolean enable, int ARGB)

Added in revision 1

Setting led method. This method turns on or off a led without blocking the caller thread.

Parameters
id Specifies which Led to control.
enable boolean value set to true to enable the LED, while set to false to disable the LED.
ARGB int value that specifies the led color in RGB 24 bits format, following the standard components defined in android.graphics.Color.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.
Throws
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.