Skip to main content

SceneClusters

Trait SceneClusters 

Source
pub trait SceneClusters {
    // Required methods
    fn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>
       where P: TLVBuilderParent;
    fn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>;
    fn apply<C>(
        &self,
        ctx: &C,
        endpoint_id: u16,
        cluster_id: u32,
        avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>,
        transition_time_ms: u32,
    ) -> impl Future<Output = Result<bool, Error>>
       where C: HandlerContext;
}
Expand description

Tuple-recursive composition of SceneClusterHandlers. Mirrors crate::dm::ChainedHandler: terminated by (), one cluster registers as (impl, ()), multiple as (a, (b, (c, ()))).

Required Methods§

Source

fn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>

Emit one EFS struct per registered cluster whose endpoint_id() matches endpoint_id. EFS structs are written directly into the parent without an outer array wrapper; the caller is responsible for the trailing array terminator.

Source

fn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>

Some(true) if cluster_id is registered and attribute_id is scenable on it; Some(false) if registered but non-scenable (AddScene returns INVALID_COMMAND); None if cluster_id is not registered (lenient — store the bytes, silently skip on recall; matches chip’s firmware-downgrade behaviour).

Source

fn apply<C>( &self, ctx: &C, endpoint_id: u16, cluster_id: u32, avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>, transition_time_ms: u32, ) -> impl Future<Output = Result<bool, Error>>
where C: HandlerContext,

Find the registered cluster matching (cluster_id, endpoint_id) and let it apply avp_list. Returns Ok(true) if handled, Ok(false) if no registered cluster matches.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SceneClusters for ()

Source§

fn capture<P>(&self, _endpoint_id: u16, parent: P) -> Result<P, Error>

Source§

fn check_scenable(&self, _cluster_id: u32, _attribute_id: u32) -> Option<bool>

Source§

fn apply<C>( &self, _ctx: &C, _endpoint_id: u16, _cluster_id: u32, _avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>, _transition_time_ms: u32, ) -> impl Future<Output = Result<bool, Error>>
where C: HandlerContext,

Source§

impl<H, T> SceneClusters for (H, T)

Source§

fn check_scenable(&self, cluster_id: u32, attribute_id: u32) -> Option<bool>

Source§

fn capture<P>(&self, endpoint_id: u16, parent: P) -> Result<P, Error>

Source§

async fn apply<C>( &self, ctx: &C, endpoint_id: u16, cluster_id: u32, avp_list: &TLVContainer<'_, AttributeValuePairStruct<'_>, ArrayContainer>, transition_time_ms: u32, ) -> Result<bool, Error>
where C: HandlerContext,

Implementors§