Refactor: network related abstraction#142
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors network-related abstraction by consolidating network interface implementations across different Ethernet and WiFi libraries. The refactoring replaces preprocessor-based conditional compilation with template-based trait specializations to provide a more unified and type-safe network abstraction layer.
- Introduces new
ReceiverTraits.hwith template traits for network operations - Consolidates network-specific implementations from individual files into centralized trait specializations
- Removes preprocessor defines (
ARTNET_ENABLE_WIFI,ARTNET_ENABLE_ETHER, etc.) in favor of template-based approach
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
examples/EthernetENC/send_receive/send_receive.ino |
Removes blank line for formatting |
ArtnetWiFi.h |
Adds WiFi-specific trait implementations and removes conditional compilation |
ArtnetNativeEther.h |
Adds NativeEthernet trait implementations and removes preprocessor defines |
ArtnetEtherENC.h |
Adds EthernetENC trait implementations and removes preprocessor defines |
ArtnetEther.h |
Adds standard Ethernet trait implementations and removes preprocessor defines |
ArtnetETH.h |
Adds ESP32 ETH trait implementations and removes preprocessor defines |
Artnet/Sender.h |
Updates to use templated network ready check |
Artnet/ReceiverTraits.h |
New file defining network abstraction traits |
Artnet/Receiver.h |
Refactors to use trait-based network functions and removes inline implementations |
Artnet/Common.h |
Removes WiFi-specific network ready function |
.github/workflows/build.yml |
Adds commented entries for Raspberry Pi Pico 2W support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8dd1ea8 to
eee3ce6
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Related: