| java.lang.Object | |
| ↳ | com.datalogic.device.power.PowerManager |
This class provides access to battery life related methods of the device.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This is the constructor of PowerManager.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This function allows setting a wakeup source.
| |||||||||||
This function allows clearing a wakeup source from those previously set.
| |||||||||||
This function allows to know the reason of last device power-off.
| |||||||||||
This function allows to get the device screen off timeout before automatic
suspension.
| |||||||||||
This function allows to know the source of the last wakeup.
| |||||||||||
This function allows to know if a wakeup source is currently active.
| |||||||||||
This function allows to know if a wakeup source is configurable on a target device.
| |||||||||||
Reset the device.
| |||||||||||
This function allows to set the device timeout before automatic
suspension.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
This is the constructor of PowerManager.
| DeviceException | in case of error. |
|---|
This function allows setting a wakeup source. If the source is already set, no action is performed.
| source | The WakeupSource that should activate the device from sleep and needs to be enabled. |
|---|
int SUCCESS in case of success,
otherwise a possible error code, matching one of the DeviceException error constants.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows clearing a wakeup source from those previously set. If the source was not set, no action is performed.
| source | The WakeupSource that should no longer wake up the device anymore. |
|---|
int SUCCESS in case of success,
otherwise a possible error code, matching one of the DeviceException error constants.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows to know the reason of last device power-off.
RebootReason related to the reason of last device power-off event.
This function allows to get the device screen off timeout before automatic suspension.
| externalPower | The boolean value indicating if the requested timeout is the one running while
powered externally or while the only power source is the internal battery. |
|---|
SuspendTimeout representing the active timeout.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows to know the source of the last wakeup.
WakeupSource, null in case no wake up source woke up the device.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows to know if a wakeup source is currently active.
| source | The WakeupSource that should be checked, whether is currently active or not. |
|---|
boolean true if the source is active, false otherwise.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows to know if a wakeup source is configurable on a target device.
| source | The WakeupSource that should be checked, whether is supported or not. |
|---|
boolean true if the source can be enabled or disabled, false otherwise.
Reset the device. The device will be turned off, then turned on.
| resetType | The BootType type of reboot to perform. |
|---|
int SUCCESS in case of success,
otherwise a possible error code, matching one of the DeviceException error constants.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|
This function allows to set the device timeout before automatic suspension.
| timeout | The SuspendTimeout value of the timeout. |
|---|---|
| externalPower | The boolean value indicating if the timeout is meant for external AC
power or for internal battery. |
int SUCCESS in case of success,
otherwise a possible error code, matching one of the DeviceException error constants.| DeviceException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
|---|