Skip to content

Add Physical Bus Wiring To GRCAN.CANdo As physical topology Section - #532

Draft
coderask wants to merge 3 commits into
mainfrom
grcan-json-bus-wiring
Draft

Add Physical Bus Wiring To GRCAN.CANdo As physical topology Section#532
coderask wants to merge 3 commits into
mainfrom
grcan-json-bus-wiring

Conversation

@coderask

@coderask coderask commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Physical Bus Wiring In GRCAN.CANdo

Problem and Scope

GRCAN.CANdo is the source of truth for CAN configuration, but the physical bus wiring — which nodes are actually wired to which CAN bus — lived only in GRCAN-Web's separate can_topology.json, moved out of this repo in #521.

Description

Adds a hand-editable physical topology top-level section to Autogen/CAN/Doc/GRCAN.CANdo recording which nodes are physically wired to each CAN bus (Primary, Data, Charger). Data imported from GRCAN-Web's can_topology.json (Gaucho-Racing/GRCAN-Web, HEAD f790c93).

Kept as a separate top-level section rather than folded into Bus ID so it stays easy to edit by hand. Reconciled with routing: added HV DC-DC and LV DC-DC to Primary — both transmit DC-DC Status there per the authoritative routing — which the imported viewer file omitted. The only routed-but-unlisted node remaining is Debugger, the intentional always-allowed exemption.

Gotchas and Limitations

Record-only — no Perl parser consumes this section, so no generated headers change. Topology enforcement still lives only in the viewer. Buses omitted here (e.g. Testing) are treated as unrestricted. Device and bus names must stay in sync with the GR ID and Bus ID sections by hand.

Testing

  • HOOTL testing
  • HITL testing
  • Human tested

Testing Details

All locally-runnable parsers (Bus/CAN/GR/MSG) emit byte-identical output before and after this change.

Larger Impact

Physical wiring now sits alongside the logical bus and routing definitions in the authoritative CANdo file, instead of only in the web viewer.

Additional Context and Ticket

Physical-wiring data originally moved to GRCAN-Web in #521. Follow-up: GRCAN-Web's can_topology.json is now a duplicate and should later derive from CANdo rather than being a separate source.

coderask and others added 3 commits July 30, 2026 21:08
Import the physical CAN bus topology (which nodes are physically wired to
each bus) from GRCAN-Web's `can_topology.json` into a new hand-editable
`physical topology:` top-level section in `GRCAN.CANdo`.

CANdo is the authoritative source of truth; topology is enforced only in the
web viewer, so no Perl parser consumes this section. Verified inert: all
generated headers are byte-identical before and after the change.

Reconciled against the authoritative `routing` section: added `HV DC-DC` and
`LV DC-DC` to `Primary` (both transmit `DC-DC Status` there per routing, but
were absent from the viewer's `can_topology.json`).
@dchansen06

Copy link
Copy Markdown
Contributor

Why have both physical topology and which item is on which bus? Is that redundant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants