Skip to content

Fix/ethernet things connections#670

Merged
jorgesg82 merged 7 commits into
developmentfrom
fix/ethernet-things-connections
Jul 9, 2026
Merged

Fix/ethernet things connections#670
jorgesg82 merged 7 commits into
developmentfrom
fix/ethernet-things-connections

Conversation

@FoniksFox

Copy link
Copy Markdown
Contributor

It is ugly, it is not great, but it works and we need it

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

ST-LIB Release Plan

  • Current version: 6.1.3
  • Pending changesets: 4
  • Highest requested bump: minor
  • Next version if merged now: 6.2.0

Pending changes

  • minor Add variable-length TCP orders, diagnostic forwarding, and flush throttling (.changesets/ethernet-diagnostics-forwarding.md)
  • patch Fix a warning about symbols in HardfaultTrace (doesn't change any behaviour) (.changesets/fix-hwarfault-warning.md)
  • patch Adds a check to ensure return values from Scheduler::get_global_tick() are monotonic (never get decreasing values) (.changesets/scheduler-monotonic.md)
  • minor Makes the watchdog reset check block the system and have a visual indication similar to hardfault (.changesets/visual-watchdog.md)

@FoniksFox
FoniksFox marked this pull request as draft June 27, 2026 16:42
@FoniksFox
FoniksFox marked this pull request as ready for review July 8, 2026 16:47

@victor-Lopez25 victor-Lopez25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will certainly need further changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Ethernet/TCP diagnostics path to support forwarding diagnostic records over a specific TCP socket, adds support for variable-length TCP “orders” in the stream parser, and introduces throttling to reduce sink flooding.

Changes:

  • Add an Ethernet diagnostics sink that targets a single OrderProtocol* and a DiagnosticTransportOrder that can parse inbound diagnostic orders and republish them via Diagnostics::Hub.
  • Update TcpOrderStreamParser and Order to support a “variable-length” receive mode via get_size() == 0 plus a reset_for_receive() hook.
  • Adjust TCP connection and lwIP timing/keepalive-related configuration to improve connection behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Src/HALAL/Services/Diagnostics/DiagnosticSinks.cpp Adds a transport order for diagnostics and an Ethernet sink install hook targeting a single socket.
Src/HALAL/Services/Diagnostics/DiagnosticsHub.cpp Adds per-priority flush throttling (when STLIB_ETH is enabled).
Src/HALAL/Services/Communication/Ethernet/LWIP/TCP/Socket.cpp Avoids panicking on initial tcp_connect() error; defers recovery via reset logic.
LWIP/Target/lwipopts.h Tweaks lwIP timeout pool sizing and TCP timer intervals.
Inc/HALAL/Services/Diagnostics/Diagnostics.hpp Adds flush throttle state and declares install_ethernet_sink(OrderProtocol*).
Inc/HALAL/Services/Communication/Ethernet/LWIP/TCP/TcpOrderStreamParser.hpp Adds variable-length order handling and calls reset_for_receive() after consumption.
Inc/HALAL/Services/Communication/Ethernet/LWIP/Ethernet.hpp Tightens default TCP keepalive macros.
Inc/HALAL/Models/Packets/Order.hpp Adds the reset_for_receive() virtual hook.
.changesets/ethernet-diagnostics-forwarding.md Adds a changeset describing the new behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Src/HALAL/Services/Diagnostics/DiagnosticSinks.cpp
@jorgesg82

Copy link
Copy Markdown
Contributor

Review copilot comments first

@jorgesg82
jorgesg82 merged commit e1b4570 into development Jul 9, 2026
34 checks passed
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.

4 participants