Adds multi domain support - #227
Open
gabrielssanches wants to merge 2 commits into
Open
Conversation
… configuration
This commit introduces full multi-domain support for generic EtherCAT slaves.
Previously, only structural hints for multi-domain usage existed,
but no functional support was implemented.
The EcMaster::updateData, readData, and writeData methods have been extended
to properly iterate over and operate on multiple domains.
The generic slave configuration parser has been modified so it indexes
channel entries to the specified domain.
In the generic slave configuration yaml file, each PDO entry can now specify a domain,
and multiple PDOs may share the same domain if required.
e.g.:
rpdo:
- index: 0x1600
domain: 0
channels:
- { index: 0x2000, sub_index: 0x01, type: uint8, command_interface: command }
tpdo:
- index: 0x1a00
domain: 1
channels:
- { index: 0x2001, sub_index: 0x01, type: uint8, state_interface: status }
This enables separating process data into dedicated read-only and write-only domains. This is required for compatibility with slaves that do not support mixed read/write EtherCAT commands within a single domain.
This change remains backwards compatible, where no domain is specified,
so all channel entries share the same domain (index = 0)
This commit does not change any current test, also neither adds or removes test. The only change here is the implict use of domain index = 0 for all tests, so they work as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds multi domain support, needed to split RPDOs from TPDOs from each other so LRD and LWR protocol commands are issued instead of LRW
note: this PR is locally build on top of #182