tiny.reticulum.node.transition
Defined in node.
API (1)
Actions
Public operations.
run: Runs one transition for a caller to drive the node by handing it one event and reading back what to do: the call clears the effect list, sends the event to the handler for its kind, and returns the effects that handler appended.
Source
Source: lib/reticulum/src/node/root.zig:77
zig
pub const transition = @import("step.zig");Source: lib/reticulum/src/node/step.zig
zig
const reticulum = @import("../root.zig");const node = reticulum.node;/// Runs one transition for a caller to drive the node by handing it one event and reading back what/// to do: the call clears the effect list, sends the event to the handler for its kind, and returns/// the effects that handler appended. Every value the transition uses comes from the event,/// including the current second and the step entropy, so the same events replayed give the same/// effects. The returned effects point into the node's own storage and stay valid until the next/// call. A `storage_complete` event changes nothing, because the caller's write has already/// finished.pub fn run(node_owner: *node.Node, value: node.Event) node.StepError![]const node.Effect { node_owner.effects.reset(); switch (value) { .carrier_frame => |frame| try node.inbound.run(node_owner, frame), .timer_expired => |timer| try node.inbound.timerExpired(node_owner, timer), .application_send => |send| try node.outbound.run(node_owner, send), .application_announce => |announce| try node.announce.run(node_owner, announce), .application_prove => |proof| try node.inbound.prove(node_owner, proof), .application_path_request => |request| { try node.transport.requests.send(node_owner, request); }, .application_link_open => |open| try node.link.open(node_owner, open), .application_link_send => |send| try node.link.send(node_owner, send), .application_link_close => |close| try node.link.close(node_owner, close), .application_link_prove => |proof| try node.link.prove(node_owner, proof), .storage_complete => {}, } return node_owner.effects.items();}Complete call list for node.transition.run
10 direct calls.
tiny.reticulum.node.announce.run[function] atlib/reticulum/src/node/announce.zig:96tiny.reticulum.node.inbound.prove[function] atlib/reticulum/src/node/inbound.zig:426tiny.reticulum.node.inbound.run[function] atlib/reticulum/src/node/inbound.zig:362tiny.reticulum.node.inbound.timerExpired[function] atlib/reticulum/src/node/inbound.zig:442tiny.reticulum.node.link.close[function] atlib/reticulum/src/node/link.zig:549tiny.reticulum.node.link.open[function] atlib/reticulum/src/node/link.zig:470tiny.reticulum.node.link.prove[function] atlib/reticulum/src/node/link.zig:569tiny.reticulum.node.link.send[function] atlib/reticulum/src/node/link.zig:522tiny.reticulum.node.outbound.run[function] atlib/reticulum/src/node/outbound.zig:291tiny.reticulum.node.transport.requests.send[function] atlib/reticulum/src/node/transport/requests.zig:281
Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |