Building block view¶
arc42 §5.
The framework decomposes into five workspace crates plus reuse of two existing taktora-executor crates. The decomposition is hierarchical: a level-1 view shows crate-level building blocks; level-2 zooms into the two crates that carry the most logic.
Pure trait definitions and shared types. No IPC, no protocol code.
Public surface: |
Concrete envelope ( |
Concrete |
MQTT plugin ( |
Composition layer. Provides |
Crate-level building blocks and their dependency graph. All edges
point from depender to dependee. The graph is acyclic; the host is
the only consumer of every other new crate. The
flowchart TB
subgraph existing_crates[existing crates]
EX[taktora-executor]
TR[taktora-executor-tracing]
end
subgraph new_crates["new crates (this spec)"]
CO[taktora-connector-core<br/>BB_0001]
TX[taktora-connector-transport-iox<br/>BB_0002]
CD[taktora-connector-codec<br/>BB_0003]
MQ[taktora-connector-mqtt<br/>BB_0004]
EC[taktora-connector-ethercat<br/>BB_0030]
ZE[taktora-connector-zenoh<br/>BB_0040]
HO[taktora-connector-host<br/>BB_0005]
end
CO --> TX
CO --> CD
CO --> MQ
CO --> EC
TX --> MQ
TX --> EC
CD --> MQ
CD --> EC
EX --> TX
EX --> MQ
EX --> EC
CO --> HO
TX --> HO
CD --> HO
MQ --> HO
EC --> HO
CO --> ZE
TX --> ZE
CD --> ZE
EX --> ZE
ZE --> HO
TR -.optional adapter.-> HO
|
The on-wire form. #[repr(C)]
#[derive(Debug, Copy, Clone, ZeroCopySend)]
pub struct ConnectorEnvelope<const N: usize> {
pub sequence_number: u64,
pub timestamp_ns: u64,
pub payload_length: u32,
pub _reserved: u32,
pub correlation_id: [u8; 32],
pub payload: [u8; N],
}
At plan stage, the implementation may substitute a small set of size-tier types (4 KB / 64 KB / 1 MB) for the const-generic variant. The external contract — fixed at service-creation time — is identical either way. |
Derives iceoryx2 service names deterministically from a
out service: taktora.connector.<connector>.<channel>.out
in service: taktora.connector.<connector>.<channel>.in
out event: taktora.connector.<connector>.<channel>.out.evt
in event: taktora.connector.<connector>.<channel>.in.evt
|
|
Hosts |
Two bounded channel pairs that translate between taktora-executor’s
thread (WaitSet driver) and the tokio runtime owning rumqttc.
Outbound = |
EtherCAT plugin ( |
Plugin-side |
Gateway-side executable item that owns the ethercrab |
Module that accepts a static PDO-mapping description per SubDevice
from |
Two bounded channel pairs that translate between taktora-executor’s
WaitSet thread and the tokio runtime owning ethercrab’s
|
Zenoh plugin ( |
Plugin-side |
Gateway-side executable item that owns one |
|
Two bounded channel pairs that translate between taktora-executor’s
WaitSet thread and the tokio runtime owning |
CAN plugin ( |
Plugin-side |
Gateway-side executable item that owns one |
Two bounded channel pairs per owned interface that translate
between taktora-executor’s WaitSet thread and the tokio runtime
owning the SocketCAN sockets. Outbound saturation surfaces as
|
Pure-logic helper that maps the per-interface registry of
inbound |
In-process loopback implementation of |
The language-neutral schema shared by server and client so they
cannot disagree — its JSON is the cross-language spec. Defines the
|
The server side: |
The |
The Rust reference consumer (no executor dependency). Discovers live
applications by scanning the iceoryx2 service registry for the
manifest naming pattern (Multi-application discovery... (REQ_0877)), reads and hash-validates
the manifest, binding read-write on a match and entering the
read-only inspect fallback (commands disabled) on a mismatch
(Contract-hash mismatch fail... (REQ_0876)). Reconstructs per-field |
An additive transport in |
J1939 plugin ( |
Plugin-side |
Gateway-side executable item that owns one |
Userspace TP engine covering BAM (TP.CM + TP.DT), RTS/CTS
connection-mode (RTS / CTS / EndOfMsgAck / Abort + TP.DT), and ETP.
Reassembles inbound and segments outbound multi-packet messages;
enforces the J1939-21 timers (Tr, Th, T1–T4) and surfaces every
timeout / abort as a |
J1939-81 address manager, one instance per owned interface. Claims a
configured source address using a 64-bit NAME, arbitrates by NAME
priority on contention, falls back to the null address (254) as
cannot-claim, responds to Request-for-Address-Claimed (PGN 59904), and
honours Address-Commanded (PGN 65240). Drives the interface’s
|
In-process implementation harness for the layer-1 test pyramid, built
on MockCanInterface (sub-block... (BB_0075)’s |