-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(net): Add ETH handle to events and data to lost_ip #11986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Hello me-no-dev, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds event data fields to the arduino_event_info_t union to support populating event information for lost IP and Ethernet lifecycle events (start, stop, connect, disconnect). The changes ensure event consumers can access relevant context data when these events occur.
- Adds
lost_ipfield to store IP event data when an interface loses its IP address - Adds
eth_started,eth_stopped, andeth_disconnectedfields to store Ethernet handle information for lifecycle events - Populates these new fields in the event handlers where the corresponding events are generated
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libraries/Network/src/NetworkEvents.h | Adds new union members for lost_ip and Ethernet event handles |
| libraries/Network/src/NetworkInterface.cpp | Populates lost_ip field when IP_EVENT_LOST_IP occurs |
| libraries/Ethernet/src/ETH.cpp | Populates Ethernet handle fields for START, STOP, and DISCONNECTED events |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 76 files 76 suites 16m 52s ⏱️ Results for commit 5133773. ♻️ This comment has been updated with latest results. |
|
Seems to work just fine. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This pull request enhances the Ethernet and network event handling by ensuring that event data is consistently populated for various Ethernet and IP-related events. The main improvements include passing the Ethernet handle in more event types and adding support for lost IP event data.
Ethernet event handling improvements:
esp_eth_handle_t) is now included in the event info forETHERNET_EVENT_DISCONNECTED,ETHERNET_EVENT_START, andETHERNET_EVENT_STOPevents, ensuring consumers of these events have access to the relevant interface handle. [1] [2]Network event data structure updates:
arduino_event_info_tunion now includes fields foreth_started,eth_stopped, andeth_disconnected, in addition to the existingeth_connected, to support the new event info assignments.lost_ipfield toarduino_event_info_tto store information about lost IP events.Lost IP event handling:
ip_event_got_ip_t) into the newlost_ipfield, ensuring that details about the lost IP are available to event consumers. [1] [2]cc: @TD-er