ace-gateway
DoIP gateway, ISO-TP bridge node, and DoIP tester.
DoipGateway<A, MAX_TESTERS, BUF> — gateway state machine. Translates DoIP frames from TCP into UDS bytes on CAN, and CAN responses back into DoIP frames. Has two faces — handle_tcp and handle_can — because it spans two buses. Routing table maps DoIP logical addresses to CAN IDs.
IsoTpNode<N> — bridges raw UDS bytes to ISO-TP CAN frames. Two independent segmenters (request and response directions) to handle concurrent multi-frame exchanges. Key methods: handle_from_gateway(uds_data), handle_uds_response(uds_data), handle_from_ecu(can_frame).
DoipTester<MAX_CONNECTIONS, MAX_TARGETS> — models a physical DoIP tester device. Owns multiple DoipConnections (one per TCP connection). Each connection addresses multiple ECUs simultaneously via target_address. P2/P2* timeouts are learned dynamically from DiagnosticSessionControlResponse. Events are tagged (ConnectionId, TargetId, DoipTesterEvent).
let mut tester = new;
// Open a connection to a gateway
let conn = tester.open_connection?;
// After TCP connects (TcpSimBus::connect or real TcpStream):
// tester.on_tcp_event(&TcpEvent::ConnectionEstablished { .. }, now);
// → automatically sends RoutingActivationRequest
// Send UDS to ECU 0x0001 on that connection
tester.request?;
// Drain events
for in tester.drain_events
Node profiles accumulate from UDP announcements:
if let Some = tester.profile
GatewayConfig builder:
let config = new
.with_tester
.with_node;