Class Power

    Definition

    Namespace:
    Tizen.System
    Assembly:
    Tizen.System.dll

    The Power class provides methods to control the power service.

    public static class Power
    Inheritance
    object
    Power
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Methods

    View Source

    CancelWaitCallback(UInt64)

    Notify the deviced that it needs undoing the current transition.

    Declaration
    public static void CancelWaitCallback(UInt64 wait_callback_id)
    Parameters
    Type Name Description
    UInt64 wait_callback_id

    Wait callback id to cancel.

    Remarks

    Notify the deviced that the current transition should be rewinded. This function only works on the id received from device_power_state_wait_callback() and device_power_transient_state_wait_callback(). Above functions are mapped to (PowerState)StateWaitCallback/(PowerTransientState)StateWaitCallback Event handler.

    Examples
    public static void MyPowerCallback(object sender, PowerStateWaitEventArgs args)
    {
        Do something with args...
        Power.CancelWaitCallback(args.WaitCallbackId);
    }
    See Also
    PowerStateWaitEventArgs
    PowerTransientStateWaitEventArgs
    ConfirmWaitCallback(UInt64)
    View Source

    ChangeState(PowerState, int)

    Send request for changing power state asynchronously.

    Declaration
    public static void ChangeState(PowerState state, int timeout_sec)
    Parameters
    Type Name Description
    PowerState state

    Target state.

    int timeout_sec

    Timeout for the async reply in second, maximum of 10 seconds. If you put 0, then it will be set 10 sec automatically.

    Remarks

    If it is need to get result callback event, then follow below description. However, if it is not necessary, skip add callback event. After change state request, callback event is called only once per change request.

    1. Add callback event to power state request callback that you want to change.
    2. This callback event will be invoked later by timeout or success/failure.
    3. After callback event is called, it is better to clean up that subscribed callback events.
    Examples
    public static void PowerStateChangedCallback(Object sender, PowerStateChangeRequestEventArgs args)
    {
        args.Retval // If this value is negative, this means that the request failed.
        Do something with args...
    }
    Power.SleepStateChangeRequestCallback += PowerStateChangedCallback;
    Power.ChangeState(PowerState.Sleep, 5);
    
    or just use like below
    Power.ChangeState(PowerState.Normal, 10);
    See Also
    PowerStateChangeRequestEventArgs
    PowerState
    View Source

    CheckRebootAllowed()

    Check if reboot is possible on the current device state.

    Declaration
    public static int CheckRebootAllowed()
    Returns
    Type Description
    int
    Remarks

    The return value will be 0(not possible) or 1(possible).

    Examples
    int retval = 0;
    retval = Power.CheckRebootAllowed();
    View Source

    ConfirmWaitCallback(UInt64)

    Notify the deviced that it is ready for the actual action.

    Declaration
    public static void ConfirmWaitCallback(UInt64 wait_callback_id)
    Parameters
    Type Name Description
    UInt64 wait_callback_id

    Wait callback id to confirm.

    Remarks

    Notify the deviced that it is ok to take an actual action of change state. This function only works on the id received from device_power_state_wait_callback() and device_power_transient_state_wait_callback(). Above functions are mapped to (PowerState)StateWaitCallback/(PowerTransientState)StateWaitCallback Event handler.

    Examples
    public static void MyPowerCallback(object sender, PowerStateWaitEventArgs args)
    {
        Do Something...
        Power.ConfirmWaitCallback(args.WaitCallbackId);
    }
    See Also
    PowerStateWaitEventArgs
    PowerTransientStateWaitEventArgs
    CancelWaitCallback(UInt64)
    View Source

    GetLockState(PowerLock)

    Gets the status of power lock is locked or not based on specific power lock type.

    Declaration
    public static PowerLockState GetLockState(PowerLock type)
    Parameters
    Type Name Description
    PowerLock type

    Type of power lock.

    Returns
    Type Description
    PowerLockState
    Remarks

    Retrieves the status of a power lock.

    Examples
    PowerLockState lock_state = Power.GetLockState(PowerLock.Cpu);
    See Also
    PowerLock
    PowerLockState
    View Source

    GetWakeupReason()

    Gets the reason for the last device wakeup based on the scenario.

    Declaration
    public static PowerTransitionReason GetWakeupReason()
    Returns
    Type Description
    PowerTransitionReason
    Remarks

    This api is not supported at TV profile.

    Examples
    PowerTransitionReason transition_reason = Power.GetWakeupReason();
    See Also
    PowerTransitionReason
    View Source

    PowerOff()

    Requests the current device's power state change to be changed to powered off.

    Declaration
    public static void PowerOff()
    Remarks

    It operates synchronously and powers off the current device.

    Examples
    Tizen.System.Power.PowerOff();
    View Source

    Reboot(string)

    Sends a request to the deviced Rebooting the current device.

    Declaration
    public static void Reboot(string reason)
    Parameters
    Type Name Description
    string reason
    Remarks

    It operates asynchronously.

    Examples
    Tizen.System.Power.Reboot(null);
    See Also
    CheckRebootAllowed()
    View Source

    ReleaseCpuLock()

    [Obsolete("Please do not use! this will be deprecated")]

    Declaration
    public static void ReleaseCpuLock()
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    View Source

    ReleaseLock(PowerLock)

    Releases the given specific power lock type which was locked before.

    Declaration
    public static void ReleaseLock(PowerLock type)
    Parameters
    Type Name Description
    PowerLock type

    The power type to request lock.

    Remarks

    If display feature(http://tizen.org/feature/display) is false, then only the type POWER_LOCK_CPU is effective, and the other type returns DEVICE_ERROR_NOT_SUPPORTED.
    And even thoguh the display feature is false, it requires display privilege(http://tizen.org/privilege/display).

    Examples
    Tizen.System.Power.ReleaseLock(Tizen.System.Power.PowerLock.Cpu);
    See Also
    RequestLock(PowerLock, int)
    PowerLock
    View Source

    RequestCpuLock(int)

    [Obsolete("Please do not use! this will be deprecated")]

    Declaration
    public static void RequestCpuLock(int timeout)
    Parameters
    Type Name Description
    int timeout

    The positive number in milliseconds or 0 for the permanent lock. So you must release the permanent lock of the power state with ReleaseCpuLock() if timeout_ms is zero.

    Remarks

    If the process dies, then every lock will be removed.

    View Source

    RequestLock(PowerLock, int)

    Locks the given lock state for a specified time. After the given timeout (in milliseconds), unlock the given lock state automatically.

    Declaration
    public static void RequestLock(PowerLock type, int timeout)
    Parameters
    Type Name Description
    PowerLock type

    The power type to request lock.

    int timeout

    The positive number in milliseconds or 0 for the permanent lock. So you must release the permanent lock of the power state with ReleaseLock() if timeout_ms is zero.

    Remarks

    If display feature(http://tizen.org/feature/display) is false, then only the type POWER_LOCK_CPU is effective, and the other type returns DEVICE_ERROR_NOT_SUPPORTED.
    And even thoguh the display feature is false, it requires display privilege(http://tizen.org/privilege/display).
    Scenario 1. If the same application requests the same power lock more than twice before it is released or expired,
    the timeout will be updated to the latest requested time.
    For example:
    The first request has a timeout of 5000ms.
    The second request has a timeout of 1000ms.
    If the second request is made before the first request is released or expired,
    the timeout will be updated to the latest requested time, which is 1000ms.
    Scenario 2. If different applications request the same power lock type,
    the power state timeout will be set to the maximum of the requested timeouts.
    For example:
    Application A requests POWER_LOCK_CPU with a timeout of 5000ms.
    Application B requests the same POWER_LOCK_CPU with a timeout of 1000ms.
    Unless Application A releases the POWER_LOCK_CPU lock,
    the timeout for POWER_LOCK_CPU will remain at the maximum requested time, which is 5000ms.

    Examples
    Tizen.System.Power.RequestLock(Tizen.System.Power.PowerLock.Cpu, 2000);
    See Also
    ReleaseLock(PowerLock)
    PowerLock

    Events

    View Source

    CpuLockStateChangedCallback

    CpuLockStateChangedCallback is triggered when the PowerLock.Cpu status is changed to Lock or Unlock

    Declaration
    public static event EventHandler<PowerLockStateChangedEventArgs> CpuLockStateChangedCallback
    Event Type
    Type Description
    EventHandler<><PowerLockStateChangedEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerLockStateChangeCallback(object sender, PowerLockStateChangedEventArgs args)
    {
        PowerLock lock_type = args.PowerLockType;
        PowerLockState lock_state = args.PowerLockState;
    }
    Power.CpuLockStateChangedCallback += PowerLockStateChangeCallback;
    See Also
    PowerLockStateChangedEventArgs
    View Source

    DisplayDimLockStateChangedCallback

    DisplayDimLockStateChangedCallback is triggered when the PowerLock.DisplayDim status is changed to Lock or Unlock

    Declaration
    public static event EventHandler<PowerLockStateChangedEventArgs> DisplayDimLockStateChangedCallback
    Event Type
    Type Description
    EventHandler<><PowerLockStateChangedEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerLockStateChangeCallback(object sender, PowerLockStateChangedEventArgs args)
    {
        PowerLock lock_type = args.PowerLockType;
        PowerLockState lock_state = args.PowerLockState;
    }
    Power.DisplayDimLockStateChangedCallback += PowerLockStateChangeCallback;
    See Also
    PowerLockStateChangedEventArgs
    View Source

    DisplayNormalLockStateChangedCallback

    DisplayNormalLockStateChangedCallback is triggered when the PowerLock.DisplayNormal status is changed to Lock or Unlock

    Declaration
    public static event EventHandler<PowerLockStateChangedEventArgs> DisplayNormalLockStateChangedCallback
    Event Type
    Type Description
    EventHandler<><PowerLockStateChangedEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerLockStateChangeCallback(object sender, PowerLockStateChangedEventArgs args)
    {
        PowerLock lock_type = args.PowerLockType;
        PowerLockState lock_state = args.PowerLockState;
    }
    Power.DisplayNormalLockStateChangedCallback += PowerLockStateChangeCallback;
    See Also
    PowerLockStateChangedEventArgs
    View Source

    ExitStateChangeRequestCallback

    ExitStateChangeRequestCallback is triggered when the request to change to Exit power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> ExitStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.ExitStateChangeRequestCallback += PowerStateChangeRequestCallback;
    See Also
    PowerStateChangeRequestEventArgs
    View Source

    ExitStateWaitCallback

    ExitStateWaitCallback is triggered when the Power state changes to Exit.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> ExitStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.ExitStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    NormalStateChangeRequestCallback

    NormalStateChangeRequestCallback is triggered when the request to change to Normal power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> NormalStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.NormalStateChangeRequestCallback += PowerStateChangeRequestCallback;
    View Source

    NormalStateWaitCallback

    NormalStateWaitCallback is triggered when the Power state changes to Normal.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> NormalStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.NormalStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    PoweroffStateChangeRequestCallback

    PoweroffStateChangeRequestCallback is triggered when the request to change to Poweroff power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> PoweroffStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.PoweroffStateChangeRequestCallback += PowerStateChangeRequestCallback;
    See Also
    PowerStateChangeRequestEventArgs
    View Source

    PoweroffStateWaitCallback

    PoweroffStateWaitCallback is triggered when the Power state changes to Poweroff.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> PoweroffStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.PoweroffStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    RebootStateChangeRequestCallback

    RebootStateChangeRequestCallback is triggered when the request to change to Reboot power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> RebootStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.RebootStateChangeRequestCallback += PowerStateChangeRequestCallback;
    See Also
    PowerStateChangeRequestEventArgs
    View Source

    RebootStateWaitCallback

    RebootStateWaitCallback is triggered when the Power state changes to Reboot.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> RebootStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.RebootStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    SleepStateChangeRequestCallback

    SleepStateChangeRequestCallback is triggered when the request to change to Sleep power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> SleepStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.SleepStateChangeRequestCallback += PowerStateChangeRequestCallback;
    See Also
    PowerStateChangeRequestEventArgs
    View Source

    SleepStateWaitCallback

    SleepStateWaitCallback is triggered when the Power state changes to Sleep.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> SleepStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.SleepStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    StartStateChangeRequestCallback

    StartStateChangeRequestCallback is triggered when the request to change to Start power state is handled from deviced.

    Declaration
    public static event EventHandler<PowerStateChangeRequestEventArgs> StartStateChangeRequestCallback
    Event Type
    Type Description
    EventHandler<><PowerStateChangeRequestEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateChangeRequestCallback(object sender, PowerStateChangeRequestEventArgs args)
    {
        PowerState power_state = args.PowerState;
        int retval = args.Retval;
    }
    Power.StartStateChangeRequestCallback += PowerStateChangeRequestCallback;
    See Also
    PowerStateChangeRequestEventArgs
    View Source

    StartStateWaitCallback

    StartStateWaitCallback is triggered when the Power state changes to Start.

    Declaration
    public static event EventHandler<PowerStateWaitEventArgs> StartStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerStateWaitCallback(object sender, PowerStateWaitEventArgs args)
    {
        PowerState prev_state = args.PrevState;
        PowerState next_state = args.NextState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.StartStateWaitCallback += PowerStateWaitCallback;
    See Also
    PowerStateWaitEventArgs
    View Source

    TransientResumingEarlyStateWaitCallback

    TransientResumingEarlyStateWaitCallback is triggered when the Power transient state changes to ResumingEarly.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingEarlyStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientResumingEarlyStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    View Source

    TransientResumingLateStateWaitCallback

    TransientResumingLateStateWaitCallback is triggered when the Power transient state changes to ResumingLate.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingLateStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientResumingLateStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    View Source

    TransientResumingStateWaitCallback

    TransientResumingStateWaitCallback is triggered when the Power transient state changes to Resuming.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientResumingStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    View Source

    TransientSuspendingEarlyStateWaitCallback

    TransientSuspendingEarlyStateWaitCallback is triggered when the Power transient state changes to SuspendingEarly.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingEarlyStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientSuspendingEarlyStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    View Source

    TransientSuspendingLateStateWaitCallback

    TransientSuspendingLateStateWaitCallback is triggered when the Power transient state changes to SuspendingLate.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingLateStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientSuspendingLateStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    View Source

    TransientSuspendingStateWaitCallback

    TransientSuspendingStateWaitCallback is triggered when the Power transient state changes to Suspending.

    Declaration
    public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingStateWaitCallback
    Event Type
    Type Description
    EventHandler<><PowerTransientStateWaitEventArgs>
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Examples
    public static void PowerTransientStateWaitCallback(object sender, PowerTransientStateWaitEventArgs args)
    {
        PowerTransientState transient_state = args.TransientState;
        ulong wait_callback_id = args.WaitCallbackId;
        PowerTransitionReason transition_reason = args.TransitionReason;
    }
    Power.TransientSuspendingStateWaitCallback += PowerTransientStateWaitCallback;
    See Also
    PowerTransientStateWaitEventArgs
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX