Skip to content

KickUI: a GUI tool to inspect, configure and operate an EtherCAT bus#411

Open
leducp wants to merge 1 commit into
masterfrom
kickcat_kickui
Open

KickUI: a GUI tool to inspect, configure and operate an EtherCAT bus#411
leducp wants to merge 1 commit into
masterfrom
kickcat_kickui

Conversation

@leducp

@leducp leducp commented Jun 15, 2026

Copy link
Copy Markdown
Owner

KickUI is an imgui/glfw bench tool built on the KickCAT master. It connects to
a real NIC or to the embedded software simulator (tap), scans the bus and
shows the discovered topology as a drawn graph (DL_STATUS port states, cable
break/heal on the simulator), per-slave diagnostics (AL states, error-counter
totals, event log with alert banner) and a per-device detail view: SDO
transfers and object-dictionary discovery, PDO mapping read-back and manual
editing, live process-data bytes, and full DS402 drive control (bring-up,
state machine, manual/jog/generator setpoints).

@leducp leducp force-pushed the kickcat_kickui branch 2 times, most recently from 26f6c2c to 6cb2fb2 Compare June 15, 2026 16:32
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

File Coverage Lines Branches
All files 82% 86% 79%
lib/include/kickcat/Error.h 91% 100% 83%
lib/include/kickcat/LockedRing.h 87% 94% 81%
lib/include/kickcat/LoopbackSocket.h 81% 82% 80%
lib/include/kickcat/SimulatorControl.h 82% 97% 68%
lib/master/include/kickcat/AbstractLink.h 90% 80% 100%
lib/master/src/Bus.cc 89% 90% 87%
lib/master/src/CoE.cc 63% 72% 55%
lib/master/src/Link.cc 98% 100% 97%
lib/master/src/MailboxSequencer.cc 97% 100% 94%
lib/master/src/MasterOD.cc 99% 99% 100%
lib/master/src/Prints.cc 95% 95% 95%
lib/master/src/Slave.cc 71% 86% 56%
lib/master/src/dc.cc 77% 83% 70%
lib/master/src/CoE/CiA/DS402/Drive.cc 51% 69% 34%
lib/simulation/include/kickcat/simulation/DeviceApp.h 0% 0% 100%
lib/simulation/include/kickcat/simulation/devices/Ds402Motor.h 0% 0% 0%
lib/simulation/src/DeviceApp.cc 0% 0% 0%
lib/simulation/src/SimulatedSlave.cc 0% 0% 0%
lib/simulation/src/SimulatorControlServer.cc 89% 96% 82%
lib/simulation/src/Topology.cc 73% 70% 76%
lib/slave/src/AbstractESC.cc 92% 100% 84%
lib/slave/src/AbstractEmulatedEEPROM.cc 0% 0% 0%
lib/slave/src/ESMStates.cc 95% 98% 93%
lib/slave/src/ESM.cc 95% 100% 90%
lib/slave/src/EmulatedNetwork.cc 98% 99% 97%
lib/slave/src/PDO.cc 94% 99% 90%
lib/slave/src/ESC/EmulatedESC.cc 79% 84% 74%
lib/slave/src/ESC/Lan9252.cc 0% 0% 0%
lib/src/Frame.cc 96% 96% 97%
lib/src/Mailbox.cc 90% 95% 85%
lib/src/SIIParser.cc 85% 89% 81%
lib/src/protocol.cc 89% 88% 90%
lib/src/CoE/OD.cc 96% 97% 95%
lib/src/CoE/protocol.cc 94% 94% 94%
lib/src/CoE/CiA/DS402/StateMachine.cc 93% 94% 92%
lib/src/CoE/mailbox/request.cc 83% 85% 80%
lib/src/CoE/mailbox/response.cc 85% 91% 80%
lib/src/ESI/Parser.cc 84% 88% 80%
lib/src/ESI/SIIBuilder.cc 80% 92% 68%
lib/src/EoE/protocol.cc 0% 0% 0%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against e2aa3b0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think bunch of definitions is this file are already defined in other regions of the existing codebase, I would suggest reusing those defs or maybe adapt them to fit the need?

Comment thread tools/kickui/BusSession.cc Outdated
{
namespace
{
constexpr uint16_t DS402_PROFILE = 402; // low word of 0x1000 device type

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to find a way to fill the profile catalogs, that way the bus session is agnostic of the potentially ever growing slave profile list

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we will still need to own the supported profiles somehow.

// (getTopology). Runs on whichever thread currently owns the bus. With
// refetch the DL status is re-read from the wire first (live refresh);
// at connect time bus.init() has already populated it.
TopologyInfo computeTopology(Bus& bus, bool refetch)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not already have a method that does this somewhere else? If yes I think we should refactor and mutualise.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is and it is used here (cf line 62). This computeToplogy is a wrapper around the tree walk algorithm to add all infos needed by the UI in the answer

bool Device::isOperating() const { return session->isOperating(index); }
std::shared_ptr<MotorControl> Device::motor() const { return session->motor(index); }

void BusSession::connect(std::string const& interface)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bus latency timeouts should be param, as kickui does not need to be hard realtime, we can have slow masters (non rt kernel) for diagnosis

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is not true: Marvin robot for instance need DC and a proper real time. The UI do need to at least 'try' to reach a proper good enough real time.
About the timeout param though I'll do a check because there is a param.

Comment thread tools/kickui/BusSession.cc Outdated
try
{
bus->readSDO(slave, 0x1000, 0, Bus::Access::PARTIAL, &device_type, &size, 100ms);
dev.is_ds402 = ((device_type & 0xFFFF) == DS402_PROFILE);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to rework this, right now we only have ds402 but maybe in the future we might have other profiles

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree: this flag is too specific.

Comment thread tools/kickui/BusSession.cc Outdated
return;
}
LockGuard lock(controls_mtx_);
std::shared_ptr<MotorControl> dc;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change DC to motor or something else, I confused it for distributed clock

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahaha right now that I re-read it without the context it is quite disturbing

KickUI is an imgui/glfw bench tool built on the KickCAT master. It connects to
a real NIC or to the embedded software simulator (tap), scans the bus and
shows the discovered topology as a drawn graph (DL_STATUS port states, cable
break/heal on the simulator), per-slave diagnostics (AL states, error-counter
totals, event log with alert banner) and a per-device detail view: SDO
transfers and object-dictionary discovery, PDO mapping read-back and manual
editing, live process-data bytes, and full DS402 drive control (bring-up,
state machine, manual/jog/generator setpoints).

Rework README to lead with stack capabilities and move build, hardware, simulation, tooling, and performance instructions into dedicated docs/ files.
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