Skip to content
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

Add feature-interface to sensors #12384

Merged
merged 13 commits into from Nov 26, 2023

Conversation

OhadMeir
Copy link
Contributor

@OhadMeir OhadMeir commented Nov 9, 2023

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.

src/sensor.h Outdated Show resolved Hide resolved
src/sensor.h Outdated Show resolved Hide resolved
src/ds/ds-color-common.cpp Outdated Show resolved Hide resolved
src/sensor.h Outdated Show resolved Hide resolved
src/feature-interface.h Outdated Show resolved Hide resolved
src/feature-interface.h Outdated Show resolved Hide resolved
src/feature-interface.h Outdated Show resolved Hide resolved
src/feature-interface.h Outdated Show resolved Hide resolved
src/core/device-interface.h Outdated Show resolved Hide resolved
src/core/device-interface.h Outdated Show resolved Hide resolved
src/ds/d400/d400-color.cpp Outdated Show resolved Hide resolved

namespace librealsense {

class synthetic_sensor;
Copy link
Collaborator

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?


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

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?

src/feature-interface.h Outdated Show resolved Hide resolved
src/ds/d400/d400-device.cpp Outdated Show resolved Hide resolved
src/ds/d500/d500-color.cpp Outdated Show resolved Hide resolved
src/ds/ds-active-common.cpp Outdated Show resolved Hide resolved
@OhadMeir OhadMeir merged commit 5fca898 into IntelRealSense:development Nov 26, 2023
16 checks passed
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.

None yet

2 participants