ReadonlyeventsAccess the behavior's events.
Supported features as a flag object.
ReadonlystateAccess the behavior's state.
ReadonlycurrentIndicates the position of the switch. The valid range is zero to NumberOfPositions-1. CurrentPosition value 0 shall be assigned to the default position of the switch: for example the "open" state of a rocker switch, or the "idle" state of a push button switch.
Static ReadonlyclusterBase cluster state include all attribute values but may be extended by subclasses.
Readonlyattributes: { ReadonlycurrentIndicates the position of the switch. The valid range is zero to NumberOfPositions-1. CurrentPosition value 0 shall be assigned to the default position of the switch: for example the "open" state of a rocker switch, or the "idle" state of a push button switch.
ReadonlynumberIndicates the maximum number of positions the switch has. Any kind of switch has a minimum of 2 positions. Also see Multi Position Details for the case NumberOfPositions>2.
Readonlyextensions: readonly [{ This metadata controls which SwitchCluster elements matter.js activates for specific feature combinations.
Readonlyfeatures: { ReadonlylatchingLatchingSwitch
This feature is for a switch that maintains its position after being pressed (or turned).
ReadonlymomentaryMomentarySwitch
This feature is for a switch that does not maintain its position after being pressed (or turned). After releasing, it goes back to its idle position.
ReadonlymomentaryMomentarySwitchLongPress
This feature is for a momentary switch that can distinguish and report long presses from short presses. When this feature flag MSL is present, MS and MSR shall be present as well.
ReadonlymomentaryMomentarySwitchMultiPress
This feature is for a momentary switch that can distinguish and report double press and potentially multiple presses with more events, such as triple press, etc. When this feature flag MSM is present, MS and MSR shall be present as well.
ReadonlymomentaryMomentarySwitchRelease
This feature is for a momentary switch that can distinguish and report release events. When this feature flag MSR is present, MS shall be present as well.
Readonlyid: 59Readonlyname: "Switch"Readonlyrevision: 1Static ReadonlydefaultsStatic Optional ReadonlydependenciesStatic ReadonlyearlyStatic ReadonlyEventsStatic ReadonlyExtensionStatic ReadonlyidThe behavior ID for ClusterBehaviors is the name of the cluster.
Static ReadonlyInterfaceStatic ReadonlyInternalStatic ReadonlynameStatic Optional ReadonlyschemaStatic ReadonlyStateStatic ReadonlysupervisorStaticsupportsDoes 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.
ProtectedcallbackCreate 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: {}ProtectedreactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
StaticalterStaticenableStaticforStaticsetStaticwith
The implemented cluster.