matter-kit 0.3.0

Matter (CSA smart-home standard) protocol implementation in Rust: no_std, no-alloc, executor-agnostic
Documentation
// Generated by `cargo xtask` from the CSA data model 1.6. Do not edit.
//
// Oven Cavity Operational State โ€” cluster 0x0048.
//
// Regenerate with `cargo xtask clusters --dm <checkout>/data_model/1.6`; `cargo xtask check`
// is the CI gate that keeps this file honest. The XML itself is not vendored here โ€” it
// carries the CSA's own copyright notice and is not redistributable.

//! Oven Cavity Operational State (cluster `0x0048`, revision 2).
//!
//! 5 identifiers, 0 feature bits, and the specification's own conformance for
//! every element. `CLUSTER` is the whole table.

#![allow(unused_imports)]

use crate::dm::conformance::{Clause, Condition, Conform, Conformance};
use crate::dm::meta::{EventPriority, Reporting};
use crate::dm::spec::{Attribute, Cluster, Command, Event, Feature};
use crate::dm::{Access, AccessQualities, AttributeQualities, Privilege};
use crate::error::Result;
use crate::im::{AttributeId, ClusterId, CommandId, EventId};
use crate::tlv::{
    ContainerKind, Element, FromTlv, Nullable, Tag, TlvList, TlvReader, TlvWriter, ToTlv, Value,
};

/// The cluster id.
pub const ID: ClusterId = 0x0048;

/// The highest revision the specification's history defines โ€” what `ClusterRevision`
/// must report (Core ยง7.13.1).
pub const REVISION: u16 = 2;

/// The PICS code, which a certification declaration names the cluster by.
pub const PICS: &str = "OVENOPSTATE";

/// This cluster defines no features, so its `FeatureMap` is always zero.
pub const FEATURES: &[Feature] = &[];

/// The command ids.
pub mod command {
    use crate::im::CommandId;

    /// `Pause`.
    pub const PAUSE: CommandId = 0x00;
    /// `Stop`.
    pub const STOP: CommandId = 0x01;
    /// `Start`.
    pub const START: CommandId = 0x02;
    /// `Resume`.
    pub const RESUME: CommandId = 0x03;
    /// `OperationalCommandResponse`.
    pub const OPERATIONAL_COMMAND_RESPONSE: CommandId = 0x04;
}

/// Every attribute the specification defines, with its conformance.
pub const ATTRIBUTES: &[Attribute] = &[];

/// Every command, with its conformance.
pub const COMMANDS: &[Command] = &[
    Command {
        id: 0x00,
        name: "Pause",
        to_server: true,
        response: None,
        access: Access::invoke(Privilege::Operate),
        conform: Conform::DISALLOWED,
    },
    Command {
        id: 0x01,
        name: "Stop",
        to_server: true,
        response: None,
        access: Access::invoke(Privilege::Operate),
        conform: Conform::MANDATORY,
    },
    Command {
        id: 0x02,
        name: "Start",
        to_server: true,
        response: None,
        access: Access::invoke(Privilege::Operate),
        conform: Conform::MANDATORY,
    },
    Command {
        id: 0x03,
        name: "Resume",
        to_server: true,
        response: None,
        access: Access::invoke(Privilege::Operate),
        conform: Conform::DISALLOWED,
    },
    Command {
        id: 0x04,
        name: "OperationalCommandResponse",
        to_server: true,
        response: None,
        access: Access::invoke(Privilege::Operate),
        conform: Conform::MANDATORY,
    },
];

/// Every event, with its conformance.
pub const EVENTS: &[Event] = &[];

/// The whole cluster, as the specification defines it.
pub const CLUSTER: Cluster = Cluster {
    id: ID,
    name: "Oven Cavity Operational State",
    revision: REVISION,
    pics: "OVENOPSTATE",
    derived_from: Some("Operational State"),
    features: FEATURES,
    attributes: ATTRIBUTES,
    commands: COMMANDS,
    events: EVENTS,
};