This is the default server implementation of MicrowaveOvenControlBehavior.

The Matter specification requires the MicrowaveOvenControl cluster to support features we do not enable by default. You should use MicrowaveOvenControlServer.with to specialize the class for the features your implementation supports.

Hierarchy (view full)

Constructors

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> & {
    cookTime$Changing: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    maxCookTime$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    wattRating$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
} & {
    cookTime$Changed: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    maxCookTime$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    wattRating$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    powerAsNumber: BitFlag;
    powerInWatts: BitFlag;
    powerNumberLimits: 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> & {
    cookTime: number;
} & {} & {
    maxCookTime: number;
} & {
    wattRating?: number;
}

Access the behavior's state.

Type declaration

  • ReadonlycookTime: number

    Indicates the total cook time associated with the operation of the device.

    This attribute shall remain unchanged during the operation of the oven unless the value is changed via a command or out-of-band action.

    MatterSpecification.v13.Cluster § 8.13.5.1

Type declaration

  • ReadonlymaxCookTime: number

    Indicates the maximum value to which the CookTime attribute can be set.

    MatterSpecification.v13.Cluster § 8.13.5.2

Type declaration

  • Optional ReadonlywattRating?: number

    Indicates the rating, in Watts, of the microwave power of the oven.

    Supporting this attribute can assist clients in suggesting cooking settings for various foods and beverages.

    MatterSpecification.v13.Cluster § 8.13.5.9

cluster: Of<{
    attributes: {
        cookTime: Attribute<number, any>;
        maxCookTime: FixedAttribute<number, any>;
        wattRating: OptionalFixedAttribute<number, any>;
    };
    commands: {
        addMoreTime: OptionalCommand<TypeFromFields<{
            timeToAdd: FieldType<number>;
        }>, void, any>;
        setCookingParameters: Command<TypeFromFields<{
            cookMode: OptionalFieldType<number>;
            cookTime: OptionalFieldType<number>;
            powerSetting: OptionalFieldType<number>;
            startAfterSetting: OptionalFieldType<boolean>;
            wattSettingIndex: OptionalFieldType<number>;
        }>, void, any>;
    };
    extensions: readonly [{
        component: {
            attributes: {
                powerSetting: Attribute<number, any>;
            };
        };
        flags: {
            powerAsNumber: true;
        };
    }, {
        component: {
            attributes: {
                maxPower: FixedAttribute<number, any>;
                minPower: FixedAttribute<number, any>;
                powerStep: FixedAttribute<number, any>;
            };
        };
        flags: {
            powerNumberLimits: true;
        };
    }, {
        component: {
            attributes: {
                selectedWattIndex: Attribute<number, any>;
                supportedWatts: FixedAttribute<number[], any>;
            };
        };
        flags: {
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerNumberLimits: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: true;
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerInWatts: false;
        };
    }];
    features: {
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    };
    id: 95;
    name: "MicrowaveOvenControl";
    revision: 1;
}>

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

Type declaration

  • Readonlyattributes: {
        cookTime: Attribute<number, any>;
        maxCookTime: FixedAttribute<number, any>;
        wattRating: OptionalFixedAttribute<number, any>;
    }
    • ReadonlycookTime: Attribute<number, any>

      Indicates the total cook time associated with the operation of the device.

      This attribute shall remain unchanged during the operation of the oven unless the value is changed via a command or out-of-band action.

      MatterSpecification.v13.Cluster § 8.13.5.1

    • ReadonlymaxCookTime: FixedAttribute<number, any>

      Indicates the maximum value to which the CookTime attribute can be set.

      MatterSpecification.v13.Cluster § 8.13.5.2

    • ReadonlywattRating: OptionalFixedAttribute<number, any>

      Indicates the rating, in Watts, of the microwave power of the oven.

      Supporting this attribute can assist clients in suggesting cooking settings for various foods and beverages.

      MatterSpecification.v13.Cluster § 8.13.5.9

  • Readonlycommands: {
        addMoreTime: OptionalCommand<TypeFromFields<{
            timeToAdd: FieldType<number>;
        }>, void, any>;
        setCookingParameters: Command<TypeFromFields<{
            cookMode: OptionalFieldType<number>;
            cookTime: OptionalFieldType<number>;
            powerSetting: OptionalFieldType<number>;
            startAfterSetting: OptionalFieldType<boolean>;
            wattSettingIndex: OptionalFieldType<number>;
        }>, void, any>;
    }
    • ReadonlyaddMoreTime: OptionalCommand<TypeFromFields<{
          timeToAdd: FieldType<number>;
      }>, void, any>

      This command is used to add more time to the CookTime attribute of the server. This command supports these fields:

      MatterSpecification.v13.Cluster § 8.13.6.3

    • ReadonlysetCookingParameters: Command<TypeFromFields<{
          cookMode: OptionalFieldType<number>;
          cookTime: OptionalFieldType<number>;
          powerSetting: OptionalFieldType<number>;
          startAfterSetting: OptionalFieldType<boolean>;
          wattSettingIndex: OptionalFieldType<number>;
      }>, void, any>

      This command is used to set the cooking parameters associated with the operation of the device.

      This command supports the following fields:

      MatterSpecification.v13.Cluster § 8.13.6.2

  • Readonlyextensions: readonly [{
        component: {
            attributes: {
                powerSetting: Attribute<number, any>;
            };
        };
        flags: {
            powerAsNumber: true;
        };
    }, {
        component: {
            attributes: {
                maxPower: FixedAttribute<number, any>;
                minPower: FixedAttribute<number, any>;
                powerStep: FixedAttribute<number, any>;
            };
        };
        flags: {
            powerNumberLimits: true;
        };
    }, {
        component: {
            attributes: {
                selectedWattIndex: Attribute<number, any>;
                supportedWatts: FixedAttribute<number[], any>;
            };
        };
        flags: {
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerNumberLimits: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: true;
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerInWatts: false;
        };
    }]

    This metadata controls which MicrowaveOvenControlCluster elements matter.js activates for specific feature combinations.

  • Readonlyfeatures: {
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    }
    • ReadonlypowerAsNumber: BitFlag

      PowerAsNumber

      Power is specified as a unitless number or a percentage

    • ReadonlypowerInWatts: BitFlag

      PowerInWatts

      Power is specified in Watts

    • ReadonlypowerNumberLimits: BitFlag

      PowerNumberLimits

      Supports the limit attributes used with the PWRNUM feature

  • Readonlyid: 95
  • Readonlyname: "MicrowaveOvenControl"
  • Readonlyrevision: 1
defaults: ClusterState.Type<Of<{
    attributes: {
        cookTime: Attribute<number, any>;
        maxCookTime: FixedAttribute<number, any>;
        wattRating: OptionalFixedAttribute<number, any>;
    };
    commands: {
        addMoreTime: OptionalCommand<TypeFromFields<{
            timeToAdd: FieldType<number>;
        }>, void, any>;
        setCookingParameters: Command<TypeFromFields<{
            cookMode: OptionalFieldType<number>;
            cookTime: OptionalFieldType<number>;
            powerSetting: OptionalFieldType<number>;
            startAfterSetting: OptionalFieldType<boolean>;
            wattSettingIndex: OptionalFieldType<number>;
        }>, void, any>;
    };
    extensions: readonly [{
        component: {
            attributes: {
                powerSetting: Attribute<number, any>;
            };
        };
        flags: {
            powerAsNumber: true;
        };
    }, {
        component: {
            attributes: {
                maxPower: FixedAttribute<number, any>;
                minPower: FixedAttribute<number, any>;
                powerStep: FixedAttribute<number, any>;
            };
        };
        flags: {
            powerNumberLimits: true;
        };
    }, {
        component: {
            attributes: {
                selectedWattIndex: Attribute<number, any>;
                supportedWatts: FixedAttribute<number[], any>;
            };
        };
        flags: {
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerNumberLimits: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: true;
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerInWatts: false;
        };
    }];
    features: {
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    };
    id: 95;
    name: "MicrowaveOvenControl";
    revision: 1;
}>, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, MicrowaveOvenControlInterface>>
dependencies?: Iterable<Type, any, any>
early: boolean
Events: ClusterEvents.Type<Of<{
    attributes: {
        cookTime: Attribute<number, any>;
        maxCookTime: FixedAttribute<number, any>;
        wattRating: OptionalFixedAttribute<number, any>;
    };
    commands: {
        addMoreTime: OptionalCommand<TypeFromFields<{
            timeToAdd: FieldType<number>;
        }>, void, any>;
        setCookingParameters: Command<TypeFromFields<{
            cookMode: OptionalFieldType<number>;
            cookTime: OptionalFieldType<number>;
            powerSetting: OptionalFieldType<number>;
            startAfterSetting: OptionalFieldType<boolean>;
            wattSettingIndex: OptionalFieldType<number>;
        }>, void, any>;
    };
    extensions: readonly [{
        component: {
            attributes: {
                powerSetting: Attribute<number, any>;
            };
        };
        flags: {
            powerAsNumber: true;
        };
    }, {
        component: {
            attributes: {
                maxPower: FixedAttribute<number, any>;
                minPower: FixedAttribute<number, any>;
                powerStep: FixedAttribute<number, any>;
            };
        };
        flags: {
            powerNumberLimits: true;
        };
    }, {
        component: {
            attributes: {
                selectedWattIndex: Attribute<number, any>;
                supportedWatts: FixedAttribute<number[], any>;
            };
        };
        flags: {
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerNumberLimits: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: true;
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerInWatts: false;
        };
    }];
    features: {
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    };
    id: 95;
    name: "MicrowaveOvenControl";
    revision: 1;
}>, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, MicrowaveOvenControlInterface>>
ExtensionInterface: {}
id

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

Internal: (new () => {})
name: string
schema?: Schema
State: (new () => ClusterState.Type<Of<{
    attributes: {
        cookTime: Attribute<number, any>;
        maxCookTime: FixedAttribute<number, any>;
        wattRating: OptionalFixedAttribute<number, any>;
    };
    commands: {
        addMoreTime: OptionalCommand<TypeFromFields<{
            timeToAdd: FieldType<number>;
        }>, void, any>;
        setCookingParameters: Command<TypeFromFields<{
            cookMode: OptionalFieldType<number>;
            cookTime: OptionalFieldType<number>;
            powerSetting: OptionalFieldType<number>;
            startAfterSetting: OptionalFieldType<boolean>;
            wattSettingIndex: OptionalFieldType<number>;
        }>, void, any>;
    };
    extensions: readonly [{
        component: {
            attributes: {
                powerSetting: Attribute<number, any>;
            };
        };
        flags: {
            powerAsNumber: true;
        };
    }, {
        component: {
            attributes: {
                maxPower: FixedAttribute<number, any>;
                minPower: FixedAttribute<number, any>;
                powerStep: FixedAttribute<number, any>;
            };
        };
        flags: {
            powerNumberLimits: true;
        };
    }, {
        component: {
            attributes: {
                selectedWattIndex: Attribute<number, any>;
                supportedWatts: FixedAttribute<number[], any>;
            };
        };
        flags: {
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerNumberLimits: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: true;
            powerInWatts: true;
        };
    }, {
        component: false;
        flags: {
            powerAsNumber: false;
            powerInWatts: false;
        };
    }];
    features: {
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    };
    id: 95;
    name: "MicrowaveOvenControl";
    revision: 1;
}>, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, MicrowaveOvenControlInterface>>)
supervisor: RootSupervisor
supports: ((other: Type) => boolean)

Type declaration

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

      Parameters

      Returns boolean

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