J1939 connector (PGN routing + transport protocol)

A fifth concrete connector instantiating the framework’s contracts, layering SAE J1939 on top of CAN. It reuses taktora-connector-can’s CanInterfaceLike driver layer (Reuse the CAN driver layer;... (REQ_0899)) and adds a userspace transport-protocol state machine, PGN-based routing, and J1939-81 address claiming. This parent feature :satisfies: Connector framework (FEAT_0030); the connector-wide requirements below :satisfies: it directly. The boundary decision — reuse the CAN driver and own the dispatcher, rather than the kernel CAN_J1939 socket family — is recorded in Reuse the CAN driver layer;... (ADR_0108); the two-tier delivery model in Two-tier delivery; ETP over... (ADR_0109); full address-claim scope in Full J1939-81 address claim... (ADR_0110).

Feature: J1939 connector (PGN routing + transport protocol over CAN) FEAT_0098

A J1939 plugin and gateway that bridge SAE J1939 traffic — single-frame PGNs, BAM and RTS/CTS transport-protocol messages, and ETP — between a taktora-executor application and a CAN bus. The gateway reuses taktora-connector-can’s driver layer (MockCanInterface for layer-1, the feature-gated RealCanInterface for layer-2) and runs a userspace TP state machine plus a J1939-81 address-claim state machine on a tokio sidecar contained inside taktora-connector-j1939. Bounded, fixed-size traffic (single-frame PGNs, BAM/RTS-CTS ≤ 1785 B) rides the ConnectorEnvelope<N> typed channels; ETP rides the variable-length slice channel (Large / variable-payload sl... (FEAT_0097)). The connector is a raw-(re)assembled- bytes transport; typed per-PGN signal mapping is deferred to the IDL message plane.

Requirement: 29-bit ID decode and PGN routing REQ_0890
status: implemented
github: 122
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0098, BB_0099, BB_0100
is verified by: TEST_0886
links outgoing: BB_0100, TEST_0886

The connector shall decode the 29-bit extended CAN identifier into priority, PDU format (PDU1 destination-specific vs PDU2 broadcast), PGN, source address, and destination address, and shall route iceoryx2 channels by PGN with optional source-address and destination-address filters (None = wildcard). PDU1 vs PDU2 is derived from the PGN’s PF field, not declared by the caller.

Requirement: J1939Routing declares transport class; N validated REQ_0891
status: implemented
github: 122
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0099
is verified by: TEST_0887
links outgoing: BB_0099, TEST_0887

J1939Routing shall declare each PGN’s transport class as SingleFrame (≤ 8 bytes) or Tp { max_len } (≤ 1785 bytes), and J1939Connector shall validate the channel’s N const generic against that class at create_writer / create_reader time, rejecting a mismatch with ConnectorError::Configuration (mirrors Channel payload sizing keye... (REQ_0612)).

Requirement: BAM reassembly and segmentation REQ_0892
status: implemented
github: 123
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0101
is verified by: TEST_0888
links outgoing: BB_0101, TEST_0888

The connector shall reassemble inbound and segment outbound BAM (Broadcast Announce Message) multi-packet messages — TP.CM (BAM) plus TP.DT — for payloads of 9–1785 bytes.

Requirement: RTS/CTS connection-mode reassembly and segmentation REQ_0893
status: implemented
github: 124
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0101
is verified by: TEST_0889
links outgoing: BB_0101, TEST_0889

The connector shall reassemble inbound and segment outbound RTS/CTS connection-mode multi-packet messages — TP.CM (RTS / CTS / EndOfMsgAck / Abort) plus TP.DT — for payloads of 9–1785 bytes, honouring the receiver’s CTS flow control.

Requirement: ETP over the slice channel, bounded REQ_0894
status: implemented
github: 125
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0101
is verified by: TEST_0890
links outgoing: BB_0101, TEST_0890

The connector shall transport ETP (Extended Transport Protocol) messages over the large-payload slice channel (Large / variable-payload sl... (FEAT_0097)), bounded by a configurable max_etp_bytes. A session whose announced total size exceeds the cap shall be aborted with the J1939 connection-abort reason and surfaced as a HealthEvent (see NO unbounded ETP reassembly (REQ_0903), Two-tier delivery; ETP over... (ADR_0109)).

Requirement: TP timers enforced and surfaced as health REQ_0895
status: implemented
github: 123
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0100, BB_0101
is verified by: TEST_0891
links outgoing: BB_0101, TEST_0891

The connector shall enforce the J1939-21 transport-protocol timers (Tr, Th, T1–T4) with their standard default values, configurable, and shall surface every TP timeout or connection abort as a HealthEvent rather than a silent drop.

Requirement: Concurrent TP sessions bounded per interface REQ_0896
status: implemented
github: 123
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0100, BB_0101
is verified by: TEST_0892
links outgoing: BB_0101, TEST_0892

The connector shall bound the number of concurrent inbound TP sessions per interface to a configurable maximum; an inbound session opened beyond that maximum shall be refused with a connection abort rather than unbounded session allocation (upholds Bounded global allocator (FEAT_0040)).

Requirement: Full J1939-81 address claiming REQ_0897
status: implemented
github: 126
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0102
is verified by: TEST_0893
links outgoing: BB_0102, TEST_0893

The connector shall participate in J1939-81 address management for each owned interface: claim a configured source address using a 64-bit NAME, arbitrate by NAME priority on contention, fall back to the null address (254) as cannot-claim, respond to Request-for-Address-Claimed (PGN 59904), and honour Address-Commanded (PGN 65240).

Requirement: Claim state maps onto health; TX gated until claimed REQ_0898
status: implemented
github: 126
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0100, BB_0102
is verified by: TEST_0894
links outgoing: BB_0102, TEST_0894

The connector shall map address-claim state onto ConnectorHealth — Claiming → Connecting, Claimed → Up, CannotClaim → Down — and shall gate outbound transmission until the address is Claimed, returning ConnectorError::Down from ChannelWriter::send beforehand (consistent with the no-durable-buffering anti-goal NO persistent outbox or dur... (REQ_0292)).

Requirement: Reuse the CAN driver layer; provide MockJ1939Interface REQ_0899
status: implemented
github: 122
satisfies: FEAT_0098
is refined by: IMPL_0090
is implemented by: BB_0098, BB_0103
is verified by: TEST_0895
links outgoing: BB_0103, TEST_0895

The connector shall consume taktora-connector-can’s CanInterfaceLike driver layer (MockCanInterface for layer-1, the feature-gated RealCanInterface for layer-2) and shall provide a MockJ1939Interface so the layer-1 test pyramid exercises PGN routing and the full TP and address-claim state machines deterministically, on any host OS, without a Linux kernel CAN module.