A cluster describes a set of related functionality.

Hierarchy (view full)

Implements

Constructors

Properties

asOf?: `${number}.${number}`

The first Matter specification in which this element appears.

classification?: Classification

Encodes both classification and scope from the Matter specification.

description?: string

A short summary of the element.

details?: string

A paragraph summary of the element.

errors?: DefinitionError[]
id: number

The ID of the element per Matter specification, either global or context-specific. A "machine appropriate" semantic differentiator.

isSeed?: boolean

Is this a "seed" element? These are global types and cluster elements defined in the core specification, without which we are fairly incapacitated.

isType?: boolean

Indicates that an element defines a datatype.

isTypeScope: boolean = true

Indicates that an element may have type definitions as children.

name: string

The key used for storing this element. A "human appropriate" semantic differentiator.

operationalBase?: Model<BaseElement>

Normally base performs lookup based on type. If instead a model is installed it is used as the base.

The operational base also enables resolution from the operational base's tree. This enables resolution on operational models that are not installed in a parent hierarchy.

pics?: string

The cluster's PICS code.

tag: Cluster = ClusterElement.Tag
type?: string

If an element derives from another element, the name of the parent element goes here.

until?: `${number}.${number}`

The Matter specification revision in which this element was removed.

Reference to Matter specification document.

Tag: ElementTag = ClusterElement.Tag
types: {
    [type: string]: (new (definition: any) => Model);
} = ...

Factory support. Populated by derivatives upon definition.

Accessors

  • get discriminator(): undefined | string
  • Obtain a discriminator that differentiates different models with the same name

    Returns undefined | string

  • get effectiveId(): undefined | number
  • Allows subclasses to pull a working ID from an alternate source.

    Returns undefined | number

  • get effectiveType(): undefined | string
  • In some circumstances the base type can be inferred. This inference happens here.

    Does not recurse so only returns the direct base type.

    Returns undefined | string

  • get key(): undefined | string
  • Get a string that uniquely identifies this model. This is normally the effective ID but some models require a generated identifier.

    Returns undefined | string

  • get path(): string
  • The path ("." delimited) in the Matter tree.

    This is informational and generally tries to adhere to JS API conventions.

    Returns string

Methods

  • Freeze the model hierarchy rooted at this model.

    When using a model as operational schema we implement various optimizations that assume the schema is immutable. This function enforces that assumption.

    To make changes to a frozen model use clone.

    Returns void