Skip to content

NUClearNet 2 (protocol 0x03)#29

Open
TrentHouliston wants to merge 10 commits into
mainfrom
houliston/nuclearnet-v2
Open

NUClearNet 2 (protocol 0x03)#29
TrentHouliston wants to merge 10 commits into
mainfrom
houliston/nuclearnet-v2

Conversation

@TrentHouliston
Copy link
Copy Markdown
Member

Summary

  • Refresh the vendored NUClear tree via git subtree from houliston/nuclearnet-v2 (NUClear PR #190, commit ce389fbf)
  • Replace the old NUClearNetwork addon build with the standalone src/nuclearnet library
  • Update NetworkBinding for the new NUClear::network::NUClearNet API (handshake, protocol 0x03)
  • Sync typed on('message.type') listeners with addSubscription / setSubscriptions (same pattern as NUClear NetworkController)
  • Bump package version to 2.0.0 (breaking change: not interoperable with 1.x / old NUClear robots on protocol 0x02)

Test plan

  • npm run build (macOS)
  • npm test — 10/10 passing locally
  • CI matrix (Linux / Windows / macOS, Node 18/20)
  • Interop smoke test with a NUClear build from PR #190 on the same multicast group

Made with Cursor

TrentHouliston and others added 5 commits June 3, 2026 15:46
Co-authored-by: Cursor <cursoragent@cursor.com>
git-subtree-dir: src/nuclear
git-subtree-split: ce389fbfea56ce97527474865dc343e0c087bd70
Migrate the addon to NUClear::network::NUClearNet (protocol 0x03), wire
typed event listeners through add/setSubscriptions, and release as 2.0.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Patch NUClearNet send_buf for MSVC WSABUF fields, link ws2_32 on Windows,
skip multicast-dependent tests on GitHub macOS runners, and add a Docker
Linux test path plus workflow job.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/NetworkBinding.cpp
uint32_t port = arg_port.IsNumber() ? arg_port.As<Napi::Number>().Uint32Value() : 7447;
uint32_t network_mtu = arg_mtu.IsNumber() ? arg_mtu.As<Napi::Number>().Uint32Value() : 1500;
network::NetworkConfig config;
config.announce_address = "239.226.152.162";
Comment thread src/nuclear/src/nuclearnet/NUClearNet.hpp Fixed
}

// Then verify multicast actually works with a real round-trip
return test_multicast_roundtrip(AF_INET, "239.255.255.250");
}

// Then verify multicast actually works with a real round-trip
return test_multicast_roundtrip(AF_INET6, "ff02::1");
NetworkConfig make_config(const std::string& name) {
NetworkConfig config;
config.name = name;
config.announce_address = "239.226.152.162";
TrentHouliston and others added 5 commits June 3, 2026 16:04
Use a make_iovec helper for WSABUF initialization, call NUClear::sendmsg on
Windows, and omit msg_flags where WSAMSG has no flags member.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce Log.hpp/Log.cpp with off-through-trace levels, instrument
Discovery and NUClearNet for handshake and wire events, and expose
setLogLevel through the Node binding plus JS connect/debug options.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pull in NUClear@c1bf7d4 (debug logging on current houliston/nuclearnet-v2)
including socket rebind and existing WSABUF/sendmsg Windows build support.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pull PR #190 review fixes: fragment validation, Discovery/Reliability
hardening, LogLevel/MSVC CI fixes, and related nuclearnet updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.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.

2 participants