| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.power.profile |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div> |
| |
| |
| ## **PROTOCOLS** |
| |
| ## Watcher {#Watcher} |
| *Defined in [fuchsia.power.profile/profile.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.profile/profile.fidl;l=25)* |
| <p>Protocol for observing changes to the system power profile.</p> |
| |
| |
| ### Watch {#Watcher.Watch} |
| |
| <p>Watches for changes to the system power profile.</p> |
| <p>On a given connection, the first call will return immediately with the current system power |
| profile, while subsequent calls will only return a new <code>profile</code> as the system power profile |
| changes. This follows the |
| <a href="https://fuchsia.dev/fuchsia-src/concepts/api/fidl#hanging-get">hanging get</a> pattern. Any |
| errors are considered fatal and will result in the channel being closed.</p> |
| |
| |
| |
| #### Request {#Watcher.Watch_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Watcher.Watch_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>profile</code></td> |
| <td> |
| <code><a class='link' href='#Profile'>Profile</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **ENUMS** |
| |
| ### Profile [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Profile data-text="Profile"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.power.profile/profile.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.profile/profile.fidl;l=8)* |
| <p>System power profiles that may be returned by [Watcher.Watch].</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Profile.IDLE"> |
| <td><h3 id="Profile.IDLE" class="add-link hide-from-toc">IDLE</h3></td> |
| <td><code>1</code></td> |
| <td><p>There is no active work in the system. On a system that supports it, the device may be put |
| into a lower-power or suspended state at any time.</p> |
| </td> |
| </tr> |
| <tr id="Profile.BACKGROUND_ACTIVE"> |
| <td><h3 id="Profile.BACKGROUND_ACTIVE" class="add-link hide-from-toc">BACKGROUND_ACTIVE</h3></td> |
| <td><code>2</code></td> |
| <td><p>Some background activity is occurring that should prevent the system from dropping into a |
| non-running or suspended state (example: downloading an OTA, performing a backup, or |
| CPU-based hotword monitoring).</p> |
| </td> |
| </tr> |
| <tr id="Profile.USER_ACTIVE"> |
| <td><h3 id="Profile.USER_ACTIVE" class="add-link hide-from-toc">USER_ACTIVE</h3></td> |
| <td><code>3</code></td> |
| <td><p>The device is providing some user-visible experience such as running an app in the |
| foreground or streaming audio, or has recently received interaction from a user.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |