Skip to content

Add Ethernet configuration API#14228

Merged
Nir-Az merged 7 commits intorealsenseai:developmentfrom
OhadMeir:traffic_shaping
Aug 27, 2025
Merged

Add Ethernet configuration API#14228
Nir-Az merged 7 commits intorealsenseai:developmentfrom
OhadMeir:traffic_shaping

Conversation

@OhadMeir
Copy link
Contributor

Tracked on [RSDEV-3754]

  • Added C, CPP API
  • Added CPP example of usage rs-eth-config
  • Added Python wrapper API
  • Added test cases to unit test that use new Python API
  • Updated viewer to use new CPP API

@OhadMeir OhadMeir requested review from Nir-Az and Copilot August 20, 2025 10:32
@OhadMeir OhadMeir added the ai-assist AI was used to develop this feature label Aug 20, 2025
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

@remibettan remibettan left a comment

Choose a reason for hiding this comment

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

few comments

@OhadMeir OhadMeir force-pushed the traffic_shaping branch 2 times, most recently from 42266d5 to be1a749 Compare August 25, 2025 18:33
@remibettan remibettan self-requested a review August 26, 2025 11:55
Copy link
Contributor

@remibettan remibettan left a comment

Choose a reason for hiding this comment

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

very few comments

@remibettan remibettan self-requested a review August 26, 2025 12:56
Copy link
Contributor

@remibettan remibettan left a comment

Choose a reason for hiding this comment

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

LGTM

# License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2025 RealSense, Inc. All Rights Reserved.

cmake_minimum_required(VERSION 3.8)
Copy link
Collaborator

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

Copy link
Collaborator

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..

Copy link
Collaborator

@Nir-Az Nir-Az left a 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

Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

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

LGTM

@Nir-Az Nir-Az merged commit 18cd532 into realsenseai:development Aug 27, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assist AI was used to develop this feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants