Skip to content

Add parsing masterboard data#492

Merged
urfeex merged 3 commits into
UniversalRobots:masterfrom
urfeex:masterboard_data
May 7, 2026
Merged

Add parsing masterboard data#492
urfeex merged 3 commits into
UniversalRobots:masterfrom
urfeex:masterboard_data

Conversation

@urfeex

@urfeex urfeex commented Apr 27, 2026

Copy link
Copy Markdown
Member

Extends the primary parser with MasterBoard data as documented in https://docs.universal-robots.com/tutorials/communication-protocol-tutorials/primary-secondary-guide.html#masterboard-data-sub-package-of-robot-state-message


Note

Medium Risk
Adds a new MasterboardData robot-state type and extends the primary consumer interface with a new pure-virtual consume(MasterboardData&), which can break downstream consumers until updated. Parsing is binary-protocol sensitive, so field/endianness mismatches could surface at runtime despite added tests.

Overview
Adds parsing and representation of the primary MASTERBOARD_DATA robot-state sub-package. This introduces a new MasterboardData RobotState with full binary parsing (including optional IMMI fields) and a toString() implementation, and wires it into PrimaryParser’s stateFromType().

Extends the visitor/consumer API by adding consume(MasterboardData&) to AbstractPrimaryConsumer and a no-op implementation in PrimaryConsumer, and updates build/test plumbing (CMakeLists.txt, test_primary_parser.cpp) with new unit tests covering masterboard parsing with/without IMMI plus minor test refactors.

Reviewed by Cursor Bugbot for commit ce695b8. Bugbot is set up for automated code reviews on this repo. Configure here.

@urfeex urfeex added the enhancement New feature or request label Apr 27, 2026
@codecov

codecov Bot commented Apr 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.70%. Comparing base (40bc3c8) to head (ce695b8).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/primary/robot_state/masterboard_data.cpp 69.41% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
+ Coverage   76.40%   76.70%   +0.29%     
==========================================
  Files         113      115       +2     
  Lines        6603     6147     -456     
  Branches     2696     2673      -23     
==========================================
- Hits         5045     4715     -330     
+ Misses       1209     1088     -121     
+ Partials      349      344       -5     
Flag Coverage Δ
python_scripts 75.90% <ø> (ø)
start_ursim 84.92% <ø> (+0.73%) ⬆️
ur20-latest 72.23% <71.42%> (+0.63%) ⬆️
ur5-3.14.3 71.97% <71.42%> (+0.25%) ⬆️
ur5e-10.11.0 65.83% <71.42%> (+0.38%) ⬆️
ur5e-10.12.0 67.33% <71.42%> (+0.30%) ⬆️
ur5e-10.7.0 65.40% <71.42%> (+0.37%) ⬆️
ur5e-5.9.4 72.85% <71.42%> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@urfeex urfeex marked this pull request as ready for review April 28, 2026 12:51
@urfeex urfeex requested a review from a team April 28, 2026 12:51

@urrsk urrsk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add unit test covering immi data as well

@urfeex urfeex force-pushed the masterboard_data branch from 50e2a20 to 4fbe84e Compare May 4, 2026 20:04
@urfeex urfeex requested a review from urrsk May 4, 2026 20:04
Comment thread include/ur_client_library/primary/primary_consumer.h Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 6f0a3a7. Configure here.

Comment thread src/primary/robot_state/masterboard_data.cpp
Currently, there's no use-case. Adding a getter for a RobotStateMessage
seems not the right way to go.
@urfeex urfeex force-pushed the masterboard_data branch from 6f0a3a7 to ce695b8 Compare May 5, 2026 07:32
@urfeex urfeex merged commit c7a549e into UniversalRobots:master May 7, 2026
40 of 60 checks passed
@urfeex urfeex deleted the masterboard_data branch May 7, 2026 08:52
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.

2 participants