The implemented cluster.
Readonly
eventsAccess the behavior's events.
Readonly
operationalThis event is generated when a reportable error condition is detected. A device that generates this event shall also set the OperationalState attribute to Error, indicating an error condition.
This event shall contain the following fields:
Optional
Readonly
operationThis event is generated when the overall operation ends, successfully or otherwise. For example, the completion of a cleaning operation in a Robot Vacuum Cleaner, or the completion of a wash cycle in a Washing Machine.
This event shall contain the following fields:
Supported features as a flag object.
Readonly
stateAccess the behavior's state.
Readonly
currentThis attribute represents the current phase of operation being performed by the server. This shall be the positional index representing the value from the set provided in the PhaseList Attribute, where the first item in that list is an index of 0. Thus, this attribute shall have a maximum value that is "length(PhaseList) - 1".
Null if the PhaseList attribute is null or if the PhaseList attribute is an empty list.
Readonly
operationalThis attribute shall specify the details of any current error condition being experienced on the device when the OperationalState attribute is populated with Error. Please see ErrorStateStruct for general requirements on the population of this attribute.
When there is no error detected, this shall have an ErrorStateID of NoError.
Readonly
operationalThis attribute specifies the current operational state of a device. This shall be populated with a valid OperationalStateID from the set of values in the OperationalStateList Attribute.
Readonly
operationalThis attribute describes the set of possible operational states that the device exposes. An operational state is a fundamental device state such as Running or Error. Details of the phase of a device when, for example, in a state of Running are provided by the CurrentPhase attribute.
All devices shall, at a minimum, expose the set of states matching the commands that are also supported by the cluster instance, in addition to Error. The set of possible device states are defined in the OperationalStateEnum. A device type requiring implementation of this cluster shall define the set of states that are applicable to that specific device type.
Readonly
phaseIndicates a list of names of different phases that the device can go through for the selected function or mode. The list may not be in sequence order. For example in a washing machine this could include items such as "pre-soak", "rinse", and "spin". These phases are manufacturer specific and may change when a different function or mode is selected.
A null value indicates that the device does not present phases during its operation. When this attribute’s value is null, the CurrentPhase attribute shall also be set to null.
Optional
Readonly
countdownIndicates the estimated time left before the operation is completed, in seconds. Changes to this value shall NOT be reported in a subscription (note the C Quality). A Client implementation may periodically poll this value to ensure alignment of any local rendering of the CountdownTime with the device provided value.
A value of 0 means that the operation has completed.
When this attribute is null, that represents that there is no time currently defined until operation completion. This may happen, for example, because no operation is in progress or because the completion time is unknown.
Static
Readonly
clusterBase cluster state include all attribute values but may be extended by subclasses.
Static
Readonly
defaultsStatic
Optional
Readonly
dependenciesStatic
Readonly
earlyStatic
Readonly
EventsStatic
Readonly
ExtensionStatic
Readonly
idThe behavior ID for ClusterBehaviors is the name of the cluster.
Static
Readonly
InterfaceStatic
Readonly
InternalImplementation of internal state. Subclasses may override to extend.
Static
Readonly
nameStatic
Optional
Readonly
schemaStatic
Readonly
StateStatic
Readonly
supervisorStatic
supportsDoes this behavior support functionality of a specific implementation?
Release resources. This is the public API for releasing application resources held by behaviors in internal state.
Execute logic with elevated privileges.
The provided function executes with privileges escalated to offline mode. This is not commonly necessary.
Elevated logic effectively ignores ACLs so should be used with care.
Note that interactions with the behavior will remain elevated until the synchronous completion of this call. You should only elevate privileges for synchronous logic.
the elevated logic
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!
On receipt of this command, the device shall start seeking the charging dock, if possible in the current state of the device.
If this command is received when already in the SeekingCharger state the device shall respond with an OperationalCommandResponse command with an ErrorStateID of NoError but the command shall have no other effect.
A device that receives this command in any state which does not allow seeking the charger, such as Charging or Docked, shall respond with an OperationalCommandResponse command with an ErrorStateID of CommandInvalidInState and shall have no other effect.
Otherwise, on success:
• The OperationalState attribute shall be set to SeekingCharger.
• The device shall respond with an OperationalCommandResponse command with an ErrorStateID of NoError.
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!
Static
alterStatic
enableStatic
forStatic
setStatic
with
This is the default server implementation of RvcOperationalStateBehavior.