Readonly
eventsAccess the behavior's events.
Supported features as a flag object.
Readonly
stateAccess the behavior's state.
Readonly
endpointIndicates a list of endpoints that are powered by the source defined by this cluster. Multiple instances of this cluster may list the same endpoint, because it is possible for power for an endpoint to come from multiple sources. In that case the Order attribute indicates their priority.
For each power source on a node, there shall only be one instance of this cluster.
A cluster instance with an empty list shall indicate that the power source is for the entire node, which includes all endpoints.
A cluster instance with a non-empty list shall include the endpoint, upon which the cluster instance resides.
The above rules allow that some endpoints can have an unknown power source, and therefore would not be indicated by any instance of this cluster.
Empty list examples
Typically, there is one power source for the node. Also common is mains power for the node with battery backup power for the node. In both these common cases, for each cluster instance described, the list is empty.
Populated list example
A node has a mains power source with Order as 0 (zero), but some application endpoints (not all) have a battery back up source with Order as 1, which means this list is empty for the Power Source cluster associated with the mains power, because it indicates the entire node, but the Power Source cluster instance associated with the battery backup would list the endpoints that have a battery backup.
Readonly
order: numberIndicates the relative preference with which the Node will select this source to provide power. A source with a lower order shall be selected by the Node to provide power before any other source with a higher order, if the lower order source is available (see Status).
Note, Order is read-only and therefore NOT intended to allow clients control over power source selection.
Readonly
status: PowerSource.PowerSourceStatusIndicates the participation of this power source in providing power to the Node as specified in PowerSourceStatusEnum.
Readonly
description: stringThis attribute shall provide a user-facing description of this source, used to distinguish it from other power sources, e.g. "DC Power", "Primary Battery" or "Battery back-up". This attribute shall NOT be used to convey information such as battery form factor, or chemistry.
Release resources. This is the public API for releasing application resources held by behaviors in internal state.
Protected
callbackCreate a generic callback function that has the same properties as a Reactor.
Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!
Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.
This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.
Optional
_options: {}Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
The implemented cluster.