interface DescriptorBehavior {
    [reference]: Datasource<StateType>;
    agent: Agent;
    cluster: never;
    context: ActionContext;
    endpoint: Endpoint<Empty>;
    env: Environment;
    events: EventEmitter & Omit<Events, never> & {
        clientList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
        deviceTypeList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<TypeFromFields<{
            deviceType: FieldType<DeviceTypeId>;
            revision: FieldType<number>;
        }>[], any>>;
        partsList$Changing: ClusterEvents.AttributeObservable<Attribute<EndpointNumber[], any>>;
        serverList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
    } & {} & {
        clientList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
        deviceTypeList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<TypeFromFields<{
            deviceType: FieldType<DeviceTypeId>;
            revision: FieldType<number>;
        }>[], any>>;
        partsList$Changed: ClusterEvents.AttributeObservable<Attribute<EndpointNumber[], any>>;
        serverList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
    } & {} & {} & {};
    features: TypeFromBitSchema<{
        tagList: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<{}, never> & {
        partsList: EndpointNumber[];
    } & {} & {
        clientList: ClusterId[];
        deviceTypeList: TypeFromFields<{
            deviceType: FieldType<DeviceTypeId>;
            revision: FieldType<number>;
        }>[];
        serverList: ClusterId[];
    } & {};
    [asyncDispose](): MaybePromise;
    asAdmin(fn: (() => void)): void;
    assertAttributeEnabled<This, K>(this: This, attributeName: K): void;
    callback<A, R>(reactor: Reactor<A, R>, options?: Reactor.Options): ((...args: A) => undefined | R);
    initialize(_options?: {}): MaybePromise;
    reactTo<O>(observable: O, reactor: Reactor<Parameters<O["emit"]>, ReturnType<O["emit"]>>, options?: Reactor.Options): void;
    requireAttributeEnabled<This, K>(this: This, attributeName: K): Exclude<This["state"][K], undefined>;
    toString(): string;
    State: any;
}

Hierarchy (view full)

Properties

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

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<Events, never> & {
    clientList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
    deviceTypeList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<TypeFromFields<{
        deviceType: FieldType<DeviceTypeId>;
        revision: FieldType<number>;
    }>[], any>>;
    partsList$Changing: ClusterEvents.AttributeObservable<Attribute<EndpointNumber[], any>>;
    serverList$Changing: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
} & {} & {
    clientList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
    deviceTypeList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<TypeFromFields<{
        deviceType: FieldType<DeviceTypeId>;
        revision: FieldType<number>;
    }>[], any>>;
    partsList$Changed: ClusterEvents.AttributeObservable<Attribute<EndpointNumber[], any>>;
    serverList$Changed: ClusterEvents.AttributeObservable<FixedAttribute<ClusterId[], any>>;
} & {} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{
    tagList: BitFlag;
}>

Supported features as a flag object.

Type declaration

  • ReadonlytagList: BitFlag

    TagList

    See the Disambiguation section in the System Model spec for conformance requirements for this feature and the corresponding attribute.

    MatterSpecification.v13.Core § 9.5.4.1

session: SecureSession
state: Omit<{}, never> & {
    partsList: EndpointNumber[];
} & {} & {
    clientList: ClusterId[];
    deviceTypeList: TypeFromFields<{
        deviceType: FieldType<DeviceTypeId>;
        revision: FieldType<number>;
    }>[];
    serverList: ClusterId[];
} & {}

Access the behavior's state.

Type declaration

  • ReadonlypartsList: EndpointNumber[]

    This attribute indicates composition of the device type instance. Device type instance composition shall include the endpoints in this list.

    See Endpoint Composition for more information about which endpoints to include in this list.

    MatterSpecification.v13.Core § 9.5.6.4

Type declaration

  • ReadonlyclientList: ClusterId[]

    This attribute shall list each cluster ID for the client clusters present on the endpoint instance.

    MatterSpecification.v13.Core § 9.5.6.3

  • ReadonlydeviceTypeList: TypeFromFields<{
        deviceType: FieldType<DeviceTypeId>;
        revision: FieldType<number>;
    }>[]

    This is a list of device types and corresponding revisions declaring endpoint conformance (see DeviceTypeStruct). At least one device type entry shall be present.

    An endpoint shall conform to all device types listed in the DeviceTypeList. A cluster instance that is in common for more than one device type in the DeviceTypeList shall be supported as a shared cluster instance on the endpoint.

    MatterSpecification.v13.Core § 9.5.6.1

  • ReadonlyserverList: ClusterId[]

    This attribute shall list each cluster ID for the server clusters present on the endpoint instance.

    MatterSpecification.v13.Core § 9.5.6.2

Methods

  • 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