1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Generated by `cargo xtask` from the CSA data model 1.6. Do not edit.
//
// Low Power โ cluster 0x0508.
//
// 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.
//! Low Power (cluster `0x0508`, revision 1).
//!
//! 1 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 = 0x0508;
/// The highest revision the specification's history defines โ what `ClusterRevision`
/// must report (Core ยง7.13.1).
pub const REVISION: u16 = 1;
/// The PICS code, which a certification declaration names the cluster by.
pub const PICS: &str = "LOWPOWER";
/// 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;
/// `Sleep`.
pub const SLEEP: CommandId = 0x00;
}
/// 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: "Sleep",
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: "Low Power",
revision: REVISION,
pics: "LOWPOWER",
derived_from: None,
features: FEATURES,
attributes: ATTRIBUTES,
commands: COMMANDS,
events: EVENTS,
};