Expand description
Re-export the rs-matter crate
The Interaction Model as defined by the Matter Core spec: the interactions
(Read, Subscribe/Report, Write, Invoke, Timed) and their TLV-serde encoding
types, plus the engine - InteractionModel - that drives those
interactions against a crate::dm data model.
It also contains a requestor-side IM client (client) and a very simple
responder - busy - which always returns a busy status code to all
incoming IM requests.
Modules§
- busy
- client
- Interaction Model Client implementation.
- encoding
- The Interaction Model Encoding as defined by the Matter Core spec: the
wire-level TLV-serde types and path primitives - request/response payloads
(
ReadReq,ReportDataReq,WriteReq,InvReq, …), paths (AttrPath,CmdPath,EventPath,GenericPath), status codes and opcodes. - events
- expand
- Interaction-Model path expansion.
- invoker
- The Interaction-Model engine’s per-item handler invoker.
- subscriptions
Structs§
- Attr
Data - A data response for an attribute in the Interaction Model.
- Attr
Data Array Builder - Array builder for the
WriteRequestsfield. The array is opened inwrite_requests(); this type provides.push()(start one entry) and.end()(close the array, return to the message builder). - Attr
Data Builder - Streaming builder for a single
AttrDataentry inside theWriteRequestsarray. - Attr
Path - A path to an attribute in the Interaction Model.
- Attr
Path Array Builder - Array builder for the
AttributeRequestsfield. Opened byReadReqBuilder::attr_requests; close with.end()to return to the message builder. - Attr
Path Builder - Streaming builder for one
AttrPath(AttributePathIB) entry. - Attr
Status - A status response for an attribute in the Interaction Model.
- Cluster
Path - Cluster Path
- CmdData
- Data associated with a command invocation.
- CmdData
Array Builder - Array builder for the
InvokeRequestsfield. Opened byInvReqBuilder::invoke_requests; close with.end()to return to the message builder. - CmdData
Builder - Streaming builder for one
CmdDataentry inside theInvokeRequestsarray. - CmdPath
- A path to a command in the Interaction Model.
- CmdStatus
- Status of a command invocation.
- Data
Version Filter - Data Version Filter
- Device
Load - Resource-utilisation metrics for the node, as reported by
GeneralDiagnostics::DeviceLoadStatus. - Event
Data - A data response for an event in the Interaction Model.
- Event
Filter - Event Filter
- Event
Path - Event Path
- Event
Status - A status response for an event in the Interaction Model.
- Generic
Path - A generic (possibly a wildcard) path with endpoint, clusters, and a leaf
- Interaction
Model - The implementation needs a
DataModelinstance to interact with the underlying clusters of the data model. - Interaction
Model State - An
ExchangeHandlerimplementation capable of handling responder exchanges for the Interaction Model protocol. The mutable, owned-together state aInteractionModeloperates on: the subscriptions table, the events queue and the network store. - InvReq
- A request to invoke commands in the Interaction Model.
- InvReq
Builder - Streaming builder for an
InvokeRequestMessage. Type-state-tagged so the compiler enforces in-order field writes. - Invoke
Resp - A response to an invoke request in the Interaction Model.
- ReadReq
- A request to read attributes and events from a Matter device.
- Read
ReqBuilder - Streaming builder for a
ReadRequestMessage. Type-state-tagged so the compiler enforces in-order field writes; optional fields are implicitly skipped by not calling their setter. - Report
Data Resp - Report Data Message
- Status
- An IM status structure that contains an
IMStatusCodeand an optional cluster status code. - Status
Resp - An IM status response structure used for sending/receiving status responses in the Interaction Model.
- Subscribe
Req - A request to subscribe to attributes and events from a Matter device.
- Subscribe
ReqBuilder - Streaming builder for a
SubscribeRequestMessage. Type-state-tagged so the compiler enforces in-order field writes; optional fields are implicitly skipped by not calling their setter. - Subscribe
Resp - A response to a subscription request.
- Timed
Req - A structure representing a timed request in the Interaction Model.
- Write
Req - A request to write attributes to a Matter device.
- Write
ReqBuilder - Streaming builder for a
WriteRequestMessage. Type-state-tagged so the compiler enforces in-order field writes. Optional fields are implicitly skipped by simply not calling their setter — later-field setters are available on all earlier states. - Write
Resp - A response to a write request.
Enums§
- Attr
Data Tag - Tags corresponding to the fields in the
AttrDataIBTLV structure. - Attr
Path Tag - Tags corresponding to the fields in the
AttributePathIBTLV structure (Matter Core spec).AttrPathis encoded as a TLV list with positional context tags 0..5. Used by callers that need to perform low-level TLV serde onAttrPathdata. - Attr
Resp - Attribute Response
- Attr
Resp Tag - Tags corresponding to the fields in the
AttributeReportIBTLV structure. - CmdData
Tag - Tags corresponding to the fields in the
CmdDatastruct. - CmdPath
Tag - Tags corresponding to the fields in the
CommandPathIBTLV structure (Matter Core spec).CmdPathis encoded as a TLV list with positional context tags 0..2. Used by callers that need to perform low-level TLV serde onCmdPathdata. - CmdResp
- Response to a command invocation.
- CmdResp
Tag - Tags corresponding to the fields in the
CmdRespenum. - Event
Data Tag - Tags corresponding to the fields in the
EventDataIBTLV structure. - Event
Data Timestamp - Event
Priority - An enum type describing the priority each event might have
- Event
Resp - Event Response
- Event
Resp Tag - Tags corresponding to the fields in the
EventReportIBTLV structure. - IMStatus
Code - An enumeration of all possible error codes that can be returned by the Interaction Model.
- InvReq
Tag - Tags corresponding to the fields in the
InvReqstruct. - InvResp
Tag - Tags corresponding to the fields in the
InvokeResponseMessageIM struct. - OpCode
- An enumeration of all possible opcodes used in the Interaction Model.
- Read
ReqTag - Tags corresponding to the fields in the
ReadReqTLV structure. - Report
Data Req - A wrapper enum for
ReadReqandSubscribeReqthat allows downstream code to treat the two in a unified manner with regards toOpCode::ReportDataResptype responses. - Report
Data Resp Tag - Tags corresponding to the fields in the
ReportDataMessageTLV structure. - Respond
Outcome - Subscribe
ReqTag - Tags corresponding to the fields in the
SubscribeRequestMessageTLV structure (Matter Core spec). Used by the streaming subscribe-request builder and any low-level TLV serde callers. - Write
ReqTag - Tags corresponding to the fields in the
WriteReqTLV structure. - Write
Resp Tag - Create a new
WriteRespfrom aTLVElement.
Constants§
- FABRIC_
INDEX_ TAG - TLV context tag for the
fabricIndexfield of fabric-scoped structs. A Matter global element tag. - IM_
REVISION interactionModelRevisionvalue emitted on every outgoing IM message rs-matter sends — both responder-side (ReportData / WriteResponse / InvokeResponse / StatusResponse / SubscribeResponse, incrate::dmand [status] / [attr::subscribe]) and requestor-side (the client builders incrate::im::clientandTimedReq).- IM_
REVISION_ TAG - TLV context tag for the trailing
interactionModelRevisionfield present on every IM message (carriesIM_REVISION). A Matter global element tag. - PROTO_
ID_ INTERACTION_ MODEL - Interaction Model ID as per the Matter Core spec
Traits§
- ImStats
- Interaction-Model state threaded down to cluster handlers via
HandlerContext::im_stats.
Functions§
- expand_
invoke - Expand (potentially wildcard) invoke requests into concrete command details using the node metadata.
- expand_
read - Expand (potentially wildcard) read requests into concrete attribute details using the node metadata.
- expand_
write - Expand (potentially wildcard) write requests into concrete attribute details using the node metadata.
Type Aliases§
- Action
Id - Amperage
MilliA - AttrId
- Cluster
Id - Cluster
Status - CmdId
- Command
Ref - Compressed
Fabric Id - Data
Version - Device
Type Id - ElapsedS
- EndptId
- Energy
MilliVA Rh - Energy
MilliV Ah - Energy
Milli Wh - EthInteraction
Model - A
InteractionModelfor an Ethernet device (network store fixed toEthNetwork), so theNgeneric disappears from call sites. Pairs withEthInteractionModelState. - EthInteraction
Model State - A
InteractionModelStatefor an Ethernet device: its network store is a fixedEthNetwork, so call sites need only the (defaulted) subscription/event sizes. Pairs withEthInteractionModel. - EventId
- Event
Number - Fabric
Id - Fabric
Index - FieldId
- IMBuffer
- The buffer type used by the Interaction Model for RX/TX payloads. Aliases the
central
Buffer. - Interaction
Model Revision - Keyset
Id - List
Index - Localized
String Identifier - Money
- NodeId
- Percent
- Percent100ths
- Power
MilliVA - Power
MilliVAR - Power
MilliW - SceneId
- Subscription
Id - Transaction
Id - Voltage
MilliV - Wireless
Interaction Model - A
InteractionModelfor a wireless device (network storeN, network controllerNC). Pairs withWirelessInteractionModelState. - Wireless
Interaction Model State - A
InteractionModelStatefor a wireless device, parameterized by the concrete wireless network storeN(e.g.WifiNetworks<3>or a Thread store). Pairs withWirelessInteractionModel.