Skip to content

Adds multi domain support - #227

Open
gabrielssanches wants to merge 2 commits into
ICube-Robotics:jazzyfrom
fbe555:multi-domain
Open

Adds multi domain support#227
gabrielssanches wants to merge 2 commits into
ICube-Robotics:jazzyfrom
fbe555:multi-domain

Conversation

@gabrielssanches

@gabrielssanches gabrielssanches commented Jun 15, 2026

Copy link
Copy Markdown

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

… 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.
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