This is the default server implementation of IcdManagementBehavior.

Hierarchy (view full)

Constructors

  • Parameters

    • agent: Agent
    • backing: BehaviorBacking

    Returns IcdManagementServer

Properties

[reference]: Datasource<StateType>
agent: Agent
cluster: never

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<ClusterEvents<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    activeModeDuration$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    activeModeThreshold$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    idleModeDuration$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    userActiveModeTriggerInstruction$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<string, any>>;
} & {
    activeModeDuration$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    activeModeThreshold$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    idleModeDuration$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    userActiveModeTriggerInstruction$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<string, any>>;
} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    checkInProtocolSupport: BitFlag;
    longIdleTimeSupport: BitFlag;
    userActiveModeTrigger: BitFlag;
}>

Supported features as a flag object.

session: SecureSession
state: Omit<ClusterState.Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {} & {} & {
    activeModeDuration: number;
    activeModeThreshold: number;
    idleModeDuration: number;
} & {
    userActiveModeTriggerInstruction?: string;
}

Access the behavior's state.

Type declaration

  • ReadonlyactiveModeDuration: number

    Indicates the minimum interval in milliseconds the server typically will stay in active mode after initial transition out of idle mode. The ActiveModeDuration does not include the ActiveModeThreshold.

    MatterSpecification.v13.Core § 9.17.6.2

  • ReadonlyactiveModeThreshold: number

    Indicates the minimum amount of time in milliseconds the server typically will stay active after network activity when in active mode.

    MatterSpecification.v13.Core § 9.17.6.3

  • ReadonlyidleModeDuration: number

    Indicates the maximum interval in seconds the server can stay in idle mode. The IdleModeDuration shall NOT be smaller than the ActiveModeDuration.

    MatterSpecification.v13.Core § 9.17.6.1

Type declaration

  • Optional ReadonlyuserActiveModeTriggerInstruction?: string

    The meaning of the attribute is dependent upon the UserActiveModeTriggerHint attribute value, and the conformance is in indicated in the "dependency" column in UserActiveModeTriggerHint table. The UserActiveModeTriggerInstruction attribute may give additional information on how to transition the device to Active Mode. If the attribute is present, the value shall be encoded as a valid UTF-8 string with a maximum length of 128 bytes. If the UserActiveModeTriggerHint has the ActuateSensorSeconds, ActuateSensorTimes, ResetButtonSeconds, ResetButtonTimes, SetupButtonSeconds or SetupButtonTimes set, the string shall consist solely of an encoding of N as a decimal

    unsigned integer using the ASCII digits 0-9, and without leading zeros.

    For example, given UserActiveModeTriggerHint="2048", ResetButtonTimes is set which indicates "Press Reset Button for N seconds". Therefore, a value of UserActiveModeTriggerInstruction="10" would indicate that N is 10 in that context.

    When CustomInstruction is set by the UserActiveModeTriggerHint attribute, indicating presence of a custom string, the ICD SHOULD perform localization (translation to user’s preferred language, as indicated in the Device’s currently configured locale). The Custom Instruction option SHOULD NOT be used by an ICD that does not have knowledge of the user’s language preference.

    ResetButtonLightsBlink or SetupButtonLightsBlink), information on color of light may be made available via the UserActiveModeTriggerInstruction attribute. When using such color indication in the UserActiveModeTriggerInstruction attribute, only basic primary and secondary colors that could unambiguously be decoded by a commissioner and understood by an end-user, but without worry of localization, SHOULD be used, e.g. white, red, green, blue, orange, yellow, purple. The length of the attribute SHOULD be kept small.

    MatterSpecification.v13.Core § 9.17.6.8

Base cluster state include all attribute values but may be extended by subclasses.

defaults: ClusterState.Type<IcdManagement.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, IcdManagementInterface>>
dependencies?: Iterable<Type, any, any>
early: boolean
Events: ClusterEvents.Type<IcdManagement.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, IcdManagementInterface>>
ExtensionInterface: {}
id

The behavior ID for ClusterBehaviors is the name of the cluster.

Internal: (new () => {})

Type declaration

    • new (): {}
    • Implementation of internal state. Subclasses may override to extend.

      Returns {}

    name: string
    schema?: Schema
    State: (new () => ClusterState.Type<IcdManagement.Cluster, Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior, IcdManagementInterface>>)
    supervisor: RootSupervisor
    supports: ((other: Type) => boolean)

    Type declaration

      • (other): boolean
      • Does this behavior support functionality of a specific implementation?

        Parameters

        Returns boolean

    Methods

    • 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.

      Parameters

      • fn: (() => void)

        the elevated logic

          • (): void
          • Returns void

      Returns void

    • Type Parameters

      • This extends Behavior
      • K extends string | number | symbol

      Parameters

      • this: This
      • attributeName: K

      Returns void

    • Create 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!

      Type Parameters

      • A extends any[]
      • R

      Parameters

      Returns ((...args: A) => undefined | R)

        • (...args): undefined | R
        • Parameters

          • Rest...args: A

          Returns undefined | R

    • 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.

      Parameters

      • Optional_options: {}

        Returns MaybePromise

      • Install a Reactor.

        Important: The reactor MUST be a real JS function - arrow functions will not work!

        Type Parameters

        Parameters

        Returns void

      • Type Parameters

        • This extends Behavior
        • K extends string | number | symbol

        Parameters

        • this: This
        • attributeName: K

        Returns Exclude<This["state"][K], undefined>

      • This command allows a client to request that the server stays in active mode for at least a given time duration (in milliseconds) from when this command is received.

        This StayActiveDuration may be longer than the ActiveModeThreshold value and would, typically, be used by the client to request the server to stay active and responsive for this period to allow a sequence of message exchanges during that period. The client may slightly overestimate the duration it wants the ICD to be active for, in order to account for network delays.

        Parameters

        Returns MaybePromise<IcdManagement.StayActiveResponse>

        MatterSpecification.v13.Core § 9.17.7.4

      • Description used in diagnostic messages.

        Returns string

      • Type Parameters

        Parameters

        Returns This