CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add Ethernet configuration API #14228
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
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 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.cpp
and headers - Created C++ wrapper class
eth_config_device
with 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
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.
few comments
42266d5
to
be1a749
Compare
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.
very few comments
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.
LGTM
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to :
cmake_minimum_required(VERSION 3.10)
Like other cmake lists.
see: #14219
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.
We have a CI for that on GHA but since it's running your branch you don't see it..
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.
Please resolve the min cmake version before merge otherwise all future PR's will fail
be1a749
to
ed9bc41
Compare
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.
LGTM
Tracked on [RSDEV-3754]
rs-eth-config