Skip to content

PowerPolicySchema

LaCivita, Jeremy edited this page May 26, 2022 · 1 revision

title: PowerPolicy

PowerPolicy Schema


Version The Firebolt JS Manage SDK [Alpha 4]

JSON-Schema

This document was generated from a JSON-Schema, and is intended to provide a human readable overview and examples of the methods contained in the module.

For the full schema, see the link below.

Schema
powerpolicy.json

Table of Contents

Schemas

PowerState

type PowerState = 'active' | 'standby' | 'suspended'
Examples

Details

List of possible power states.


PowerPolicy

type PowerPolicy = {
  defaults: {
    networkEnabledDuringSuspended: boolean  // Whether the network should remain active while in the suspended state.
    suspendedTimer: bigint                  // The duration, starting from when the device goes to standby, after which the device will go into suspended if it is not awoken first.
  }
  transitions: {
    activeToStandby: TransitionPolicy       // A set of conditions that will initiate a specific power state transtion if they are ALL true.
    standbyToSuspended: TransitionPolicy    // A set of conditions that will initiate a specific power state transtion if they are ALL true.
    suspendedToStandby: TransitionPolicy    // A set of conditions that will initiate a specific power state transtion if they are ALL true.
    standbyToActive: TransitionPolicy       // A set of conditions that will initiate a specific power state transtion if they are ALL true.
  }
}
Examples
{
  "defaults": {
    "networkEnabledDuringSuspended": false,
    "suspendedTimer": 1000
  },
  "transitions": {
    "standbyToActive": {
      "conditions": [
        {
          "remoteKey": "*"
        }
      ]
    },
    "activeToStandby": {
      "conditions": [
        {
          "remoteKey": "power"
        },
        {
          "deviceKey": "power"
        }
      ]
    },
    "standbyToSuspended": {
      "conditions": []
    },
    "suspendedToStandby": {
      "conditions": [
        {
          "remoteKey": "power"
        }
      ]
    }
  }
}

Details

A configuration describing when to move to which power states.


TransitionPolicy

type TransitionPolicy = {
  conditions: PolicyCondition[]
}
Examples

Details

A set of conditions that will initiate a specific power state transtion if they are ALL true.


PolicyCondition

type PolicyCondition = {
  remoteKey?: 'power' | '*'      // Requires a specific, or any, remote key to be pressed to activate this policy
  deviceKey?: 'power' | '*'      // Requires a specific, or any, hardware key to be pressed to activate this policy
  externalDevicesIdle?: boolean  // Requires that no external devices are performing any critical, uninteruptible tasks, e.g. software updates
}
Examples

Clone this wiki locally