Skip to main content

Module node

Module node 

Source
Available on crate feature rustcrypto only.
Expand description

The node runtime: the sequence every Matter device keeps, owned by a type.

The rest of this crate is parts — a messaging layer, a secure channel, an interaction-model server, a subscription table, the commissioning clusters — and each part is correct on its own. What a device also needs is the order in which they are driven, and that order is where defects live: a report opened while the priming report is still going out, a chunked read continued on another controller’s exchange, a removed fabric whose subscriptions keep reporting, a fail-safe whose deadline nobody acts on. Runtime owns that order.

§Shape

Sans-I/O, like everything below it. A datagram goes in through Runtime::receive, time goes in through Runtime::poll, and whatever the node owes the network comes out of Runtime::transmit. Runtime::next_deadline says when poll next has work, and Runtime::notice reports what happened, as values rather than log lines. A device with sockets and a timer runs Runtime::run and writes no loop of its own.

  datagram ──► receive ─┐                   ┌─► transmit ──► socket
                        ├─► Runtime ────────┤
  timer ─────► poll ────┘                   └─► notice ────► log

§What it owns

  • The messaging stack, the §5.5 secure channel, the interaction-model dispatcher and the §8.5 subscription table.
  • Per-exchange series state (§10.2.3): a chunked read continues only on the exchange that started it, and a reused exchange id starts afresh.
  • The subscribe flow (§8.5.2): subscription, priming report (chunked if need be), and the SubscribeResponse only once the subscriber has acknowledged the last chunk.
  • Reports (§8.5.3): due reports go out with at most one unacknowledged per subscription, filtered as the subscriber that created them.
  • Exchange closing (§4.10.5.3): what “the application layer” decides is closed.
  • Retransmission (§4.12.2.1): the same bytes again when MRP asks.
  • Cascades: a closed or evicted session takes its subscriptions, reports and series; a removed fabric takes its subscriptions and window, and its sessions after the reply.
  • Commissioning follow-ups: §11.18.6.8’s administrator entry, PASE fabric binding and IPK key set; §11.10.7.2.2’s rollback (also on the timer) and §11.10.7.6’s commit, including closing PASE sessions; §9.10.9.1’s AccessControlEntryChanged events.

What it does not own is the device: which clusters it has, what their hooks do, and its sockets. Those arrive as a Device — a bundle of references the application builds once.

Structs§

Device
What the application hands the runtime: its node and the parts the specification makes the node’s to drive.
Mdns
The mDNS side of Runtime::run: the socket bound to 5353, the group answers go to, and the interface both live on.
Runtime
The node runtime.

Enums§

Notice
Something worth knowing that happened, in the order it happened.

Constants§

PASE_ABANDON_GRACE
How long an established PASE channel may sit unused, with the fail-safe never armed, before an open window may release it.
SCRATCH
The scratch a read builds one whole attribute value in, sized for DefaultConfig.
SUBSCRIPTIONS
How many subscriptions the runtime holds — §8.5’s minimum for five fabrics, three each.
SUBSCRIPTION_PATHS
How many paths one subscription holds — §8.5’s minimum of three.

Traits§

AccessList
The Access Control cluster, as the runtime reaches it.
ChangeLog
§7.10.3’s data versions, as the runtime reaches them: DataVersions.
EventLog
The event store, as the runtime reaches it: RefCell<EventStore<…>>.
GroupKeyStore
The group key store, as the runtime reaches it: RefCell<GroupKeys<…>>.

Type Aliases§

GroupPeers
§4.16.1’s group peer table as the runtime sizes it.
Subscriptions
The subscription table the runtime keeps.