Skip to content

refactor: Role system#30

Draft
voltangle wants to merge 8 commits intomasterfrom
role-refactor
Draft

refactor: Role system#30
voltangle wants to merge 8 commits intomasterfrom
role-refactor

Conversation

@voltangle
Copy link
Copy Markdown
Owner

@voltangle voltangle commented Mar 16, 2026

TL;DR: current system was very much rigid to either combined or split control and supervisor architectures. More than 2 chips were not supported at all. This refactor makes it more flexible in that regard

In short:

  • each role is a separate core-* crate
  • roles communicate with each other using CORElink
  • multiple roles can exist on one MCU
  • CORElink is implemented with an autogenerated router, that depending on the destination routes the messages either as function calls (if the roles exist in one MCU), or to a physical comms bus, like CAN or even USART (if the destination role is on another MCU)
  • Router is generated using the feature information, it sees which roles can communicate with in-memory channels and which need a physical bus

Tasks

  • Router design
  • CORElink router codegen
  • Initialization and usage of the router
  • General design of some roles for the future (like the BMS role)

@voltangle voltangle added the enhancement New feature or request label Mar 16, 2026
@voltangle voltangle added this to the 0.1.0 milestone Mar 16, 2026
@voltangle voltangle self-assigned this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant