Skip to content

Add feature-interface to sensors - #12384

Merged
OhadMeir merged 13 commits into
realsenseai:developmentfrom
OhadMeir:development
Nov 26, 2023
Merged

OhadMeir merged 13 commits into
realsenseai:developmentfrom
OhadMeir:development

Conversation

@OhadMeir

@OhadMeir OhadMeir commented Nov 9, 2023 •

Copy link
Copy Markdown
Contributor

Added support_feature API to sensors.
Features derive from feature_interface and concrete sensor determines support for individual features.

Features can act as a flag to other logic about need to act in a certain way, or even have the logic implementation embodied.

@OhadMeir
OhadMeir requested review from Nir-Az and maloel November 9, 2023 10:11
Comment thread src/core/features/feature-interface.h Resolved
Comment thread src/sensor.h Resolved
Comment thread src/sensor.h Resolved
Comment thread src/ds/ds-color-common.cpp Resolved
Comment thread src/sensor.h Resolved
Comment thread src/feature-interface.h Resolved
Comment thread src/feature-interface.h Resolved
Comment thread src/feature-interface.h Resolved
Comment thread src/feature-interface.h Resolved
Comment thread src/core/device-interface.h Resolved
Comment thread src/core/device-interface.h Resolved
Comment thread src/ds/d400/d400-color.cpp Resolved

namespace librealsense {

class synthetic_sensor;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it requires roi_sensor_interface, why not put that right in the interface?

Comment thread src/core/features-container.h Resolved
Comment thread src/core/features-container.h Outdated

void register_feature( const std::string id, std::shared_ptr< feature_interface > feature )
{
_features[id] = feature;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It'll override any previous value... ok?

Comment thread src/core/has-features-interface.h Resolved
Comment thread src/core/features-container.h Resolved
Comment thread src/feature-interface.h Resolved
Comment thread src/ds/d400/d400-device.cpp Resolved
Comment thread src/ds/d400/d400-device.cpp Resolved
Comment thread src/ds/d500/d500-color.cpp Resolved
Comment thread src/ds/ds-active-common.cpp Resolved
Comment thread src/core/has-features-interface.h Resolved
@OhadMeir
OhadMeir merged commit 5fca898 into realsenseai:development Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants