class Admin
Defined at line 4757 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/hlcpp/fuchsia/hardware/power/statecontrol/cpp/fidl.h
Provides methods to request that the system be transitioned into a supported power state.
Note (see https://fxbug.dev/42136295):
These methods do not return until after the state transition has been completed. In most cases
(e.g. Reboot), a successful transition means that the caller does not actually observe the
completion because the system will be rebooted before the call is completed. The implication is
that using a synchronous FIDL client with these methods will result in a blocked thread for the
duration of the call, or even for the remainder of the component's life (in the case of Reboot).
Therefore, if a synchronous FIDL client is to be used with this protocol then care should be
taken to avoid handling any shutdown-induced callbacks on the same thread that was used to
initiate the transition. Example callbacks include [`fuchsia.process.lifecycle/Lifecycle.Stop`]
and [`fuchsia.hardware.power.statecontrol/RebootMethodsWatcher.OnReboot`].
Alternatively, the caller could choose to use an asynchronous FIDL client with this protocol to
avoid blocking their calling thread.
Public Members
static const char[] Name_
Public Methods
void ~Admin ()
void PowerFullyOn (PowerFullyOnCallback callback)
Asks the device to enter a fully on state.
void Shutdown (::fuchsia::hardware::power::statecontrol::ShutdownOptions options, ShutdownCallback callback)
Asks the device to enter the state specified by `options.action`.
Arguments:
- options: The options with which to perform this request.
`ZX_ERR_INVALID_ARGS` is returned if `action` is absent.
`reasons` may be omitted, but adding a new enum value
instead is strongly encouraged.
void PerformReboot (::fuchsia::hardware::power::statecontrol::RebootOptions options, PerformRebootCallback callback)
Asks the device to reboot.
Arguments:
- options: The options with which to perform this requests.
`ZX_ERR_INVALID_ARGS` is returned if the options are
malformed (i.e. `reasons` is absent or empty).
# Deprecation
Use Shutdown, which allows callers to specify the intended action and reasons for the
action.
void RebootToBootloader (RebootToBootloaderCallback callback)
Asks the device to reboot into the bootloader.
# Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to
bootloader.
void RebootToRecovery (RebootToRecoveryCallback callback)
Asks the device to reboot into the recovery partition.
# Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to
recovery.
void Poweroff (PoweroffCallback callback)
Asks all devices to enter a powered off state.
# Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a poweroff.
void Mexec (::zx::vmokernel_zbi,::zx::vmodata_zbi,MexecCallbackcallback)
Performs a kernel mexec.
It is expected that the ZBI items specified by
`zx_system_mexec_payload_get()` have not yet been appended to the
provided data ZBI.
void SuspendToRam (SuspendToRamCallback callback)
Asks the device to enter the suspend to RAM (S3) power state.
# Removal
Suspend to RAM is not supported. The server always returns ZX_ERR_NOT_SUPPORTED.