Add Ethernet configuration API#14228
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive Ethernet configuration API support across C, C++, and Python interfaces for RealSense devices. The implementation provides both low-level C functions and high-level C++ wrapper classes to configure Ethernet settings like IP addresses, link priorities, DHCP settings, and network parameters.
Key changes include:
- Added new C API functions for Ethernet configuration in
rs.cppand headers - Created C++ wrapper class
eth_config_devicewith comprehensive configuration methods - Implemented Python bindings with IP address handling and enum support
- Updated existing viewer to use the new C++ API instead of direct hardware monitor commands
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/rs.cpp | Implements core C API functions for Ethernet configuration using hardware monitor commands |
| include/librealsense2/hpp/rs_eth_config.hpp | Defines C++ wrapper class eth_config_device with type-safe configuration methods |
| include/librealsense2/h/rs_eth_config.h | Declares C API functions and enums for Ethernet configuration |
| wrappers/python/pyrs_eth_config.cpp | Python bindings for Ethernet configuration with IP address conversion utilities |
| unit-tests/live/config/test-eth-config.py | Updates test cases to use new Python API for validation |
| common/dds-model.cpp | Refactors viewer to use new C++ API instead of raw hardware monitor commands |
| examples/eth-config/rs-eth-config.cpp | Comprehensive example demonstrating all Ethernet configuration features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
40a8a5f to
43eecf0
Compare
43eecf0 to
f06ca05
Compare
42266d5 to
be1a749
Compare
examples/eth-config/CMakeLists.txt
Outdated
| # License: Apache 2.0. See LICENSE file in root directory. | ||
| # Copyright(c) 2025 RealSense, Inc. All Rights Reserved. | ||
|
|
||
| cmake_minimum_required(VERSION 3.8) |
There was a problem hiding this comment.
Please update to :
cmake_minimum_required(VERSION 3.10)
Like other cmake lists.
see: #14219
There was a problem hiding this comment.
We have a CI for that on GHA but since it's running your branch you don't see it..
Nir-Az
left a comment
There was a problem hiding this comment.
Please resolve the min cmake version before merge otherwise all future PR's will fail
be1a749 to
ed9bc41
Compare
Tracked on [RSDEV-3754]
rs-eth-config