PER Firmware
Loading...
Searching...
No Matches
linker Namespace Reference

Classes

class  BusLinker
 

Functions

TxProducerRegistry _build_tx_producer_registry (List[Node] nodes)
 
None _resolve_rx_against_registry (List[Node] nodes, TxProducerRegistry tx_on_bus)
 
None _validate_standard_id_range (List[Node] nodes)
 
List[Nodelink_all (List[Node] nodes)
 

Variables

 TxProducerRegistry = Dict[str, Dict[str, Tuple[str, Message]]]
 

Detailed Description

linker.py

Author: Irving Wang (irvingw@purdue.edu)

Function Documentation

◆ _build_tx_producer_registry()

TxProducerRegistry linker._build_tx_producer_registry ( List[Node] nodes)
protected
Build the map of who transmits each message on each bus.

Rules (fail fast with ValueError):
- Exactly one logical producer per (bus, msg_name): two different nodes may not
  both TX the same msg_name on the same bus.
- A single node may not list the same msg_name twice in tx on the same bus.

◆ _resolve_rx_against_registry()

None linker._resolve_rx_against_registry ( List[Node] nodes,
TxProducerRegistry tx_on_bus )
protected
For each RX subscription, attach the transmitting node's Message on that bus.

Rules:
- RX msg_name must have a TX on the same bus (not another bus with the same name).
- The transmitter must be a different node than the subscriber (no self-RX).

◆ _validate_standard_id_range()

None linker._validate_standard_id_range ( List[Node] nodes)
protected
Standard-frame IDs must fit in 11 bits when is_extended is false.

◆ link_all()

List[Node] linker.link_all ( List[Node] nodes)
Main entry point for the Linker stage.
Resolves CAN IDs for all messages across all buses.