1#![allow(unused_imports)]
15
16use crate::dm::conformance::{Clause, Condition, Conform, Conformance};
17use crate::dm::meta::{EventPriority, Reporting};
18use crate::dm::spec::{Attribute, Cluster, Command, Event, Feature};
19use crate::dm::{Access, AccessQualities, AttributeQualities, Privilege};
20use crate::error::Result;
21use crate::im::{AttributeId, ClusterId, CommandId, EventId};
22use crate::tlv::{
23 ContainerKind, Element, FromTlv, Nullable, Tag, TlvList, TlvReader, TlvWriter, ToTlv, Value,
24};
25
26pub const ID: ClusterId = 0x0008;
28
29pub const REVISION: u16 = 7;
32
33pub const PICS: &str = "LVL";
35
36pub mod feature {
41 pub const ON_OFF: u32 = 1 << 0;
45 pub const LIGHTING: u32 = 1 << 1;
49 pub const FREQUENCY: u32 = 1 << 2;
53}
54
55pub const FEATURES: &[Feature] = &[
57 Feature {
58 bit: 0,
59 code: "OO",
60 name: "OnOff",
61 conform: Conform::OPTIONAL,
62 },
63 Feature {
64 bit: 1,
65 code: "LT",
66 name: "Lighting",
67 conform: Conform::OPTIONAL,
68 },
69 Feature {
70 bit: 2,
71 code: "FQ",
72 name: "Frequency",
73 conform: Conform {
74 clauses: &[Clause::always(Conformance::Provisional)],
75 },
76 },
77];
78
79pub mod attribute {
81 use crate::im::AttributeId;
82
83 pub const CURRENT_LEVEL: AttributeId = 0x00;
85 pub const REMAINING_TIME: AttributeId = 0x01;
87 pub const MIN_LEVEL: AttributeId = 0x02;
89 pub const MAX_LEVEL: AttributeId = 0x03;
91 pub const CURRENT_FREQUENCY: AttributeId = 0x04;
93 pub const MIN_FREQUENCY: AttributeId = 0x05;
95 pub const MAX_FREQUENCY: AttributeId = 0x06;
97 pub const OPTIONS: AttributeId = 0x0F;
99 pub const ON_OFF_TRANSITION_TIME: AttributeId = 0x10;
101 pub const ON_LEVEL: AttributeId = 0x11;
103 pub const ON_TRANSITION_TIME: AttributeId = 0x12;
105 pub const OFF_TRANSITION_TIME: AttributeId = 0x13;
107 pub const DEFAULT_MOVE_RATE: AttributeId = 0x14;
109 pub const START_UP_CURRENT_LEVEL: AttributeId = 0x4000;
111}
112
113pub mod command {
115 use crate::im::CommandId;
116
117 pub const MOVE_TO_LEVEL: CommandId = 0x00;
119 pub const MOVE: CommandId = 0x01;
121 pub const STEP: CommandId = 0x02;
123 pub const STOP: CommandId = 0x03;
125 pub const MOVE_TO_LEVEL_WITH_ON_OFF: CommandId = 0x04;
127 pub const MOVE_WITH_ON_OFF: CommandId = 0x05;
129 pub const STEP_WITH_ON_OFF: CommandId = 0x06;
131 pub const STOP_WITH_ON_OFF: CommandId = 0x07;
133 pub const MOVE_TO_CLOSEST_FREQUENCY: CommandId = 0x08;
135}
136
137#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
139#[repr(u8)]
140pub enum MoveModeEnum {
141 Up = 0,
143 Down = 1,
145}
146
147impl MoveModeEnum {
148 #[must_use]
150 pub const fn from_value(value: u8) -> Option<Self> {
151 match value {
152 0 => Some(Self::Up),
153 1 => Some(Self::Down),
154 _ => None,
155 }
156 }
157
158 #[must_use]
160 pub const fn value(self) -> u8 {
161 self as u8
162 }
163}
164
165impl ToTlv for MoveModeEnum {
166 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
167 self.value().to_tlv(w, tag)
168 }
169}
170
171impl<'a> FromTlv<'a> for MoveModeEnum {
172 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
173 let value = <u8 as FromTlv<'a>>::from_tlv(reader, element)?;
174 Self::from_value(value).ok_or(crate::Error::new(crate::ErrorCode::TlvOutOfRange))
175 }
176}
177
178#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
180#[repr(u8)]
181pub enum StepModeEnum {
182 Up = 0,
184 Down = 1,
186}
187
188impl StepModeEnum {
189 #[must_use]
191 pub const fn from_value(value: u8) -> Option<Self> {
192 match value {
193 0 => Some(Self::Up),
194 1 => Some(Self::Down),
195 _ => None,
196 }
197 }
198
199 #[must_use]
201 pub const fn value(self) -> u8 {
202 self as u8
203 }
204}
205
206impl ToTlv for StepModeEnum {
207 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
208 self.value().to_tlv(w, tag)
209 }
210}
211
212impl<'a> FromTlv<'a> for StepModeEnum {
213 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
214 let value = <u8 as FromTlv<'a>>::from_tlv(reader, element)?;
215 Self::from_value(value).ok_or(crate::Error::new(crate::ErrorCode::TlvOutOfRange))
216 }
217}
218
219bitflags::bitflags! {
220 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
222 pub struct OptionsBitmap: u8 {
223 const EXECUTE_IF_OFF = 1 << 0;
225 const COUPLE_COLOR_TEMP_TO_LEVEL = 1 << 1;
227 }
228}
229
230impl ToTlv for OptionsBitmap {
231 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
232 self.bits().to_tlv(w, tag)
233 }
234}
235
236impl<'a> FromTlv<'a> for OptionsBitmap {
237 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
238 let bits = <u8 as FromTlv<'a>>::from_tlv(reader, element)?;
239 Self::from_bits(bits).ok_or(crate::Error::new(crate::ErrorCode::TlvOutOfRange))
240 }
241}
242
243#[derive(Debug, Clone, Copy, PartialEq)]
245pub struct MoveToLevelFields {
246 pub level: u8,
248 pub transition_time: Nullable<u16>,
250 pub options_mask: OptionsBitmap,
252 pub options_override: OptionsBitmap,
254}
255
256impl ToTlv for MoveToLevelFields {
257 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
258 w.start_structure(tag)?;
259 self.level.to_tlv(w, Tag::Context(0))?;
260 self.transition_time.to_tlv(w, Tag::Context(1))?;
261 self.options_mask.to_tlv(w, Tag::Context(2))?;
262 self.options_override.to_tlv(w, Tag::Context(3))?;
263 w.end_container()
264 }
265}
266
267impl<'a> FromTlv<'a> for MoveToLevelFields {
268 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
269 if element.value.container() != Some(ContainerKind::Structure) {
270 return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
271 }
272 let mut level = None;
273 let mut transition_time = None;
274 let mut options_mask = None;
275 let mut options_override = None;
276 loop {
277 let Some(field) = reader.next_element()? else {
278 return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
279 };
280 if field.value == Value::EndOfContainer {
281 break;
282 }
283 match field.tag.context() {
284 Some(0) => level = Some(<u8>::from_tlv(reader, &field)?),
285 Some(1) => transition_time = Some(<Nullable<u16>>::from_tlv(reader, &field)?),
286 Some(2) => options_mask = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
287 Some(3) => options_override = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
288 _ => reader.skip_value(&field)?,
292 }
293 }
294 Ok(Self {
295 level: level.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
296 transition_time: transition_time
297 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
298 options_mask: options_mask.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
299 options_override: options_override
300 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
301 })
302 }
303}
304
305#[derive(Debug, Clone, Copy, PartialEq)]
307pub struct MoveFields {
308 pub move_mode: MoveModeEnum,
310 pub rate: Nullable<u8>,
312 pub options_mask: OptionsBitmap,
314 pub options_override: OptionsBitmap,
316}
317
318impl ToTlv for MoveFields {
319 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
320 w.start_structure(tag)?;
321 self.move_mode.to_tlv(w, Tag::Context(0))?;
322 self.rate.to_tlv(w, Tag::Context(1))?;
323 self.options_mask.to_tlv(w, Tag::Context(2))?;
324 self.options_override.to_tlv(w, Tag::Context(3))?;
325 w.end_container()
326 }
327}
328
329impl<'a> FromTlv<'a> for MoveFields {
330 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
331 if element.value.container() != Some(ContainerKind::Structure) {
332 return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
333 }
334 let mut move_mode = None;
335 let mut rate = None;
336 let mut options_mask = None;
337 let mut options_override = None;
338 loop {
339 let Some(field) = reader.next_element()? else {
340 return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
341 };
342 if field.value == Value::EndOfContainer {
343 break;
344 }
345 match field.tag.context() {
346 Some(0) => move_mode = Some(<MoveModeEnum>::from_tlv(reader, &field)?),
347 Some(1) => rate = Some(<Nullable<u8>>::from_tlv(reader, &field)?),
348 Some(2) => options_mask = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
349 Some(3) => options_override = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
350 _ => reader.skip_value(&field)?,
354 }
355 }
356 Ok(Self {
357 move_mode: move_mode.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
358 rate: rate.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
359 options_mask: options_mask.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
360 options_override: options_override
361 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
362 })
363 }
364}
365
366#[derive(Debug, Clone, Copy, PartialEq)]
368pub struct StepFields {
369 pub step_mode: StepModeEnum,
371 pub step_size: u8,
373 pub transition_time: Nullable<u16>,
375 pub options_mask: OptionsBitmap,
377 pub options_override: OptionsBitmap,
379}
380
381impl ToTlv for StepFields {
382 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
383 w.start_structure(tag)?;
384 self.step_mode.to_tlv(w, Tag::Context(0))?;
385 self.step_size.to_tlv(w, Tag::Context(1))?;
386 self.transition_time.to_tlv(w, Tag::Context(2))?;
387 self.options_mask.to_tlv(w, Tag::Context(3))?;
388 self.options_override.to_tlv(w, Tag::Context(4))?;
389 w.end_container()
390 }
391}
392
393impl<'a> FromTlv<'a> for StepFields {
394 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
395 if element.value.container() != Some(ContainerKind::Structure) {
396 return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
397 }
398 let mut step_mode = None;
399 let mut step_size = None;
400 let mut transition_time = None;
401 let mut options_mask = None;
402 let mut options_override = None;
403 loop {
404 let Some(field) = reader.next_element()? else {
405 return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
406 };
407 if field.value == Value::EndOfContainer {
408 break;
409 }
410 match field.tag.context() {
411 Some(0) => step_mode = Some(<StepModeEnum>::from_tlv(reader, &field)?),
412 Some(1) => step_size = Some(<u8>::from_tlv(reader, &field)?),
413 Some(2) => transition_time = Some(<Nullable<u16>>::from_tlv(reader, &field)?),
414 Some(3) => options_mask = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
415 Some(4) => options_override = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
416 _ => reader.skip_value(&field)?,
420 }
421 }
422 Ok(Self {
423 step_mode: step_mode.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
424 step_size: step_size.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
425 transition_time: transition_time
426 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
427 options_mask: options_mask.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
428 options_override: options_override
429 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
430 })
431 }
432}
433
434#[derive(Debug, Clone, Copy, PartialEq)]
436pub struct StopFields {
437 pub options_mask: OptionsBitmap,
439 pub options_override: OptionsBitmap,
441}
442
443impl ToTlv for StopFields {
444 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
445 w.start_structure(tag)?;
446 self.options_mask.to_tlv(w, Tag::Context(0))?;
447 self.options_override.to_tlv(w, Tag::Context(1))?;
448 w.end_container()
449 }
450}
451
452impl<'a> FromTlv<'a> for StopFields {
453 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
454 if element.value.container() != Some(ContainerKind::Structure) {
455 return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
456 }
457 let mut options_mask = None;
458 let mut options_override = None;
459 loop {
460 let Some(field) = reader.next_element()? else {
461 return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
462 };
463 if field.value == Value::EndOfContainer {
464 break;
465 }
466 match field.tag.context() {
467 Some(0) => options_mask = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
468 Some(1) => options_override = Some(<OptionsBitmap>::from_tlv(reader, &field)?),
469 _ => reader.skip_value(&field)?,
473 }
474 }
475 Ok(Self {
476 options_mask: options_mask.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
477 options_override: options_override
478 .ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
479 })
480 }
481}
482
483#[derive(Debug, Clone, Copy, PartialEq)]
485pub struct MoveToClosestFrequencyFields {
486 pub frequency: u16,
488}
489
490impl ToTlv for MoveToClosestFrequencyFields {
491 fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
492 w.start_structure(tag)?;
493 self.frequency.to_tlv(w, Tag::Context(0))?;
494 w.end_container()
495 }
496}
497
498impl<'a> FromTlv<'a> for MoveToClosestFrequencyFields {
499 fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
500 if element.value.container() != Some(ContainerKind::Structure) {
501 return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
502 }
503 let mut frequency = None;
504 loop {
505 let Some(field) = reader.next_element()? else {
506 return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
507 };
508 if field.value == Value::EndOfContainer {
509 break;
510 }
511 match field.tag.context() {
512 Some(0) => frequency = Some(<u16>::from_tlv(reader, &field)?),
513 _ => reader.skip_value(&field)?,
517 }
518 }
519 Ok(Self {
520 frequency: frequency.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
521 })
522 }
523}
524
525pub const ATTRIBUTES: &[Attribute] = &[
527 Attribute {
528 id: 0x0000,
529 name: "CurrentLevel",
530 kind: "uint8",
531 access: Access::read_only(Privilege::View),
532 qualities: AttributeQualities::NULLABLE
533 .union(AttributeQualities::NON_VOLATILE.union(AttributeQualities::SCENE)),
534 reporting: Reporting::Quieter,
535 conform: Conform::MANDATORY,
536 },
537 Attribute {
538 id: 0x0001,
539 name: "RemainingTime",
540 kind: "uint16",
541 access: Access::read_only(Privilege::View),
542 qualities: AttributeQualities::empty(),
543 reporting: Reporting::Quieter,
544 conform: Conform {
545 clauses: &[Clause {
546 verdict: Conformance::Mandatory,
547 when: Condition::Feature(1),
548 }],
549 },
550 },
551 Attribute {
552 id: 0x0002,
553 name: "MinLevel",
554 kind: "uint8",
555 access: Access::read_only(Privilege::View),
556 qualities: AttributeQualities::FIXED,
557 reporting: Reporting::OnChange,
558 conform: Conform {
559 clauses: &[
560 Clause {
561 verdict: Conformance::Described,
562 when: Condition::Named("comparison"),
563 },
564 Clause {
565 verdict: Conformance::Optional,
566 when: Condition::Always,
567 },
568 ],
569 },
570 },
571 Attribute {
572 id: 0x0003,
573 name: "MaxLevel",
574 kind: "uint8",
575 access: Access::read_only(Privilege::View),
576 qualities: AttributeQualities::FIXED,
577 reporting: Reporting::OnChange,
578 conform: Conform {
579 clauses: &[
580 Clause {
581 verdict: Conformance::Described,
582 when: Condition::Named("comparison"),
583 },
584 Clause {
585 verdict: Conformance::Optional,
586 when: Condition::Always,
587 },
588 ],
589 },
590 },
591 Attribute {
592 id: 0x0004,
593 name: "CurrentFrequency",
594 kind: "uint16",
595 access: Access::read_only(Privilege::View),
596 qualities: AttributeQualities::SCENE,
597 reporting: Reporting::Quieter,
598 conform: Conform {
599 clauses: &[Clause {
600 verdict: Conformance::Mandatory,
601 when: Condition::Feature(2),
602 }],
603 },
604 },
605 Attribute {
606 id: 0x0005,
607 name: "MinFrequency",
608 kind: "uint16",
609 access: Access::read_only(Privilege::View),
610 qualities: AttributeQualities::empty(),
611 reporting: Reporting::OnChange,
612 conform: Conform {
613 clauses: &[Clause {
614 verdict: Conformance::Mandatory,
615 when: Condition::Feature(2),
616 }],
617 },
618 },
619 Attribute {
620 id: 0x0006,
621 name: "MaxFrequency",
622 kind: "uint16",
623 access: Access::read_only(Privilege::View),
624 qualities: AttributeQualities::empty(),
625 reporting: Reporting::OnChange,
626 conform: Conform {
627 clauses: &[Clause {
628 verdict: Conformance::Mandatory,
629 when: Condition::Feature(2),
630 }],
631 },
632 },
633 Attribute {
634 id: 0x000F,
635 name: "Options",
636 kind: "OptionsBitmap",
637 access: Access::read_write_with(Privilege::View, Privilege::Operate),
638 qualities: AttributeQualities::empty(),
639 reporting: Reporting::OnChange,
640 conform: Conform::MANDATORY,
641 },
642 Attribute {
643 id: 0x0010,
644 name: "OnOffTransitionTime",
645 kind: "uint16",
646 access: Access::read_write_with(Privilege::View, Privilege::Operate),
647 qualities: AttributeQualities::empty(),
648 reporting: Reporting::OnChange,
649 conform: Conform::OPTIONAL,
650 },
651 Attribute {
652 id: 0x0011,
653 name: "OnLevel",
654 kind: "uint8",
655 access: Access::read_write_with(Privilege::View, Privilege::Operate),
656 qualities: AttributeQualities::NULLABLE,
657 reporting: Reporting::OnChange,
658 conform: Conform::MANDATORY,
659 },
660 Attribute {
661 id: 0x0012,
662 name: "OnTransitionTime",
663 kind: "uint16",
664 access: Access::read_write_with(Privilege::View, Privilege::Operate),
665 qualities: AttributeQualities::NULLABLE,
666 reporting: Reporting::OnChange,
667 conform: Conform::OPTIONAL,
668 },
669 Attribute {
670 id: 0x0013,
671 name: "OffTransitionTime",
672 kind: "uint16",
673 access: Access::read_write_with(Privilege::View, Privilege::Operate),
674 qualities: AttributeQualities::NULLABLE,
675 reporting: Reporting::OnChange,
676 conform: Conform::OPTIONAL,
677 },
678 Attribute {
679 id: 0x0014,
680 name: "DefaultMoveRate",
681 kind: "uint8",
682 access: Access::read_write_with(Privilege::View, Privilege::Operate),
683 qualities: AttributeQualities::NULLABLE,
684 reporting: Reporting::OnChange,
685 conform: Conform::OPTIONAL,
686 },
687 Attribute {
688 id: 0x4000,
689 name: "StartUpCurrentLevel",
690 kind: "uint8",
691 access: Access::read_write_with(Privilege::View, Privilege::Manage),
692 qualities: AttributeQualities::NULLABLE.union(AttributeQualities::NON_VOLATILE),
693 reporting: Reporting::OnChange,
694 conform: Conform {
695 clauses: &[Clause {
696 verdict: Conformance::Mandatory,
697 when: Condition::Feature(1),
698 }],
699 },
700 },
701];
702
703pub const COMMANDS: &[Command] = &[
705 Command {
706 id: 0x00,
707 name: "MoveToLevel",
708 to_server: true,
709 response: None,
710 access: Access::invoke(Privilege::Operate),
711 conform: Conform::MANDATORY,
712 },
713 Command {
714 id: 0x01,
715 name: "Move",
716 to_server: true,
717 response: None,
718 access: Access::invoke(Privilege::Operate),
719 conform: Conform::MANDATORY,
720 },
721 Command {
722 id: 0x02,
723 name: "Step",
724 to_server: true,
725 response: None,
726 access: Access::invoke(Privilege::Operate),
727 conform: Conform::MANDATORY,
728 },
729 Command {
730 id: 0x03,
731 name: "Stop",
732 to_server: true,
733 response: None,
734 access: Access::invoke(Privilege::Operate),
735 conform: Conform::MANDATORY,
736 },
737 Command {
738 id: 0x04,
739 name: "MoveToLevelWithOnOff",
740 to_server: true,
741 response: None,
742 access: Access::invoke(Privilege::Operate),
743 conform: Conform::MANDATORY,
744 },
745 Command {
746 id: 0x05,
747 name: "MoveWithOnOff",
748 to_server: true,
749 response: None,
750 access: Access::invoke(Privilege::Operate),
751 conform: Conform::MANDATORY,
752 },
753 Command {
754 id: 0x06,
755 name: "StepWithOnOff",
756 to_server: true,
757 response: None,
758 access: Access::invoke(Privilege::Operate),
759 conform: Conform::MANDATORY,
760 },
761 Command {
762 id: 0x07,
763 name: "StopWithOnOff",
764 to_server: true,
765 response: None,
766 access: Access::invoke(Privilege::Operate),
767 conform: Conform::MANDATORY,
768 },
769 Command {
770 id: 0x08,
771 name: "MoveToClosestFrequency",
772 to_server: true,
773 response: None,
774 access: Access::invoke(Privilege::Operate),
775 conform: Conform {
776 clauses: &[Clause {
777 verdict: Conformance::Mandatory,
778 when: Condition::Feature(2),
779 }],
780 },
781 },
782];
783
784pub const EVENTS: &[Event] = &[];
786
787pub const CLUSTER: Cluster = Cluster {
789 id: ID,
790 name: "Level Control",
791 revision: REVISION,
792 pics: "LVL",
793 derived_from: None,
794 features: FEATURES,
795 attributes: ATTRIBUTES,
796 commands: COMMANDS,
797 events: EVENTS,
798};