Skip to content

[APPS-000] SAM/DAM_MPDO#3

Draft
tadasaleksonis-bc wants to merge 2 commits into
masterfrom
taleksonis/feature/canopen_mpdo_support
Draft

[APPS-000] SAM/DAM_MPDO#3
tadasaleksonis-bc wants to merge 2 commits into
masterfrom
taleksonis/feature/canopen_mpdo_support

Conversation

@tadasaleksonis-bc
Copy link
Copy Markdown

First pass at letting an agent generate DAM/SAM MPDOs before testing integration into brain-rt.

tadasaleksonis-bc and others added 2 commits May 14, 2026 18:30
Add SAM (Source Address Mode) consumer and producer alongside the DAM
first-pass:

- CO_MPDO_applySAM: peer to applyDAM; dispatcher table looks up
  (producerNodeId, srcIdx, srcSub) -> (dstIdx, dstSub) and writes the
  payload into the local OD.
- CO_MPDO_scanWrite: OD-extension write callback that flags the scanned
  entry dirty; CO_MPDO_processTX SAM walker emits one frame per dirty
  row on the carrier TX slot, with clear-before-read race ordering.
- Public API: CO_MPDO_configRX_SAM, CO_MPDO_dispatchAdd_SAM,
  CO_MPDO_configTX_SAM, CO_MPDO_scanAdd_SAM. Programmatic registration
  (no 0x1FA0 / 0x1FD0 OD parsing yet); the OD-driven path is a future
  enhancement layered on these primitives.
- CO_MPDO_processTX: inhibit decrement lifted out of the DAM-only block
  so SAM-only builds tick the timers.

Compile-tested for CO_CONFIG_MPDO ∈ {0, RX_DAM|TX_DAM, RX_SAM|TX_SAM,
all four, RX_SAM only, TX_SAM only} with -Wall -Wextra -Wpedantic
-Wshadow -Wstrict-prototypes -Wmissing-prototypes -std=c11.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant