pub struct Identify<'a, H: IdentifyHooks> { /* private fields */ }Expand description
Identify, with the device’s hooks.
Implementations§
Source§impl<'a, H: IdentifyHooks> Identify<'a, H>
impl<'a, H: IdentifyHooks> Identify<'a, H>
Sourcepub const WITH_TRIGGER_EFFECT: Optional<'static>
pub const WITH_TRIGGER_EFFECT: Optional<'static>
Everything §1.2.6 leaves to the product: TriggerEffect.
Sourcepub const fn new(hooks: &'a H, kind: IdentifyTypeEnum) -> Self
pub const fn new(hooks: &'a H, kind: IdentifyTypeEnum) -> Self
A cluster over hooks, presenting itself the way kind says.
§1.2.5.2: “The value None SHALL NOT be used if the device is capable of presenting its
identification state using one of the other methods” — a device that can flash a light
and says None has told a commissioner not to bother asking, which is the opposite of
what the cluster is for.
Sourcepub fn conforming(optional: &Optional<'_>) -> Result<Conforming<2, 2, 0, 0>>
pub fn conforming(optional: &Optional<'_>) -> Result<Conforming<2, 2, 0, 0>>
The descriptor for an instance, derived from the specification’s own tables.
Sourcepub fn is_identifying(&self) -> bool
pub fn is_identifying(&self) -> bool
Whether the endpoint is identifying itself.
Sourcepub const fn kind(&self) -> IdentifyTypeEnum
pub const fn kind(&self) -> IdentifyTypeEnum
How this endpoint presents itself.
Sourcepub fn set_time(&self, seconds: u16, now: Instant)
pub fn set_time(&self, seconds: u16, now: Instant)
Sets IdentifyTime, starting or stopping the state (§1.2.5.1).
The one place the hook is called, so a write from a client and an Identify command
cannot behave differently — which they would if each did its own bookkeeping.
Sourcepub fn wake_at(&self) -> Option<Instant>
pub fn wake_at(&self) -> Option<Instant>
When Identify::poll next has something to do.
Trait Implementations§
Source§impl<H: IdentifyHooks> Cluster for Identify<'_, H>
So a tuple of clusters can dispatch to it by id.
impl<H: IdentifyHooks> Cluster for Identify<'_, H>
So a tuple of clusters can dispatch to it by id.
Source§impl<H: IdentifyHooks> ClusterHandler for Identify<'_, H>
impl<H: IdentifyHooks> ClusterHandler for Identify<'_, H>
Source§fn read(
&self,
resolved: &Resolved<'_>,
_ctx: &InteractionContext<'_>,
w: &mut TlvWriter<'_>,
tag: Tag,
) -> Result<(), Status>
fn read( &self, resolved: &Resolved<'_>, _ctx: &InteractionContext<'_>, w: &mut TlvWriter<'_>, tag: Tag, ) -> Result<(), Status>
Source§fn write(
&self,
resolved: &Resolved<'_>,
data: &[u8],
_op: WriteOp,
ctx: &InteractionContext<'_>,
) -> Result<(), Status>
fn write( &self, resolved: &Resolved<'_>, data: &[u8], _op: WriteOp, ctx: &InteractionContext<'_>, ) -> Result<(), Status>
data — the encoded TLV element, tag included — into the attribute. Read moreSource§fn invoke(
&self,
resolved: &ResolvedCommand<'_>,
fields: Option<&[u8]>,
ctx: &InteractionContext<'_>,
_w: &mut TlvWriter<'_>,
_tag: Tag,
) -> Result<Option<CommandId>, StatusIb>
fn invoke( &self, resolved: &ResolvedCommand<'_>, fields: Option<&[u8]>, ctx: &InteractionContext<'_>, _w: &mut TlvWriter<'_>, _tag: Tag, ) -> Result<Option<CommandId>, StatusIb>
Source§impl<H: IdentifyHooks> Identifying for Identify<'_, H>
§1.3.7.6’s AddGroupIfIdentifying asks the endpoint whether it is identifying; this is
the answer when the endpoint has an Identify cluster.
impl<H: IdentifyHooks> Identifying for Identify<'_, H>
§1.3.7.6’s AddGroupIfIdentifying asks the endpoint whether it is identifying; this is
the answer when the endpoint has an Identify cluster.