-
Notifications
You must be signed in to change notification settings - Fork 19
PowerPolicySchema
LaCivita, Jeremy edited this page May 26, 2022
·
1 revision
Version The Firebolt JS Manage SDK [Alpha 4]
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 |
type PowerState = 'active' | 'standby' | 'suspended'
Examples
List of possible power states.
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"
}
]
}
}
}
A configuration describing when to move to which power states.
type TransitionPolicy = {
conditions: PolicyCondition[]
}
Examples
A set of conditions that will initiate a specific power state transtion if they are ALL true.
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
}