Skip to content

JSON-based DDS options - #12650

Merged
maloel merged 11 commits into
realsenseai:developmentfrom
maloel:dds-option
Feb 14, 2024
Merged

JSON-based DDS options#12650
maloel merged 11 commits into
realsenseai:developmentfrom
maloel:dds-option

Conversation

@maloel

@maloel maloel commented Feb 11, 2024

Copy link
Copy Markdown
Contributor

High-level changes:

  • disable Viewer auto update of read-only options, now relying on options-changed notifications
  • following last PR, Viewer now gets range/read-only even if option isn't supported
  • renamed dds_option_type value from "number" to "integer"; removed rs2_option_value::as_unsigned
  • options_watcher now sends a notification when a value cannot be queried (i.e., the value becoming null is a change, too)

DDS options:

  • Now have several types: float, int, string, IPv4 (boolean, choices still missing)
  • librealsense query() returns the cached value from DDS options
  • Options can now be read-only or have optional (null-able) values
  • Option range is in the base option class, but optional
    • At first I had "float" and then "ranged-float" classes, and same for "ranged-int", but this complicated the code needlessly
  • Options enforce value type but not range or read-only
    • So options serve to communicate as metadata rather for logic enforcement
  • dds-adapter can now send options even without a value, as optional

TODO:

  • DDS options still cannot change from non-read-only to read-only (during streaming, for example)

@maloel
maloel requested a review from OhadMeir February 11, 2024 10:54
Comment thread src/dds/rs-dds-option.cpp
Comment thread src/rs.cpp Outdated
Comment thread third-party/realdds/doc/initialization.md Outdated
Comment thread third-party/rsutils/src/ip-address.cpp Outdated
Comment thread third-party/rsutils/src/ip-address.cpp
Comment thread third-party/rsutils/src/ip-address.cpp Outdated
Comment thread third-party/rsutils/include/rsutils/string/ip-address.h
Comment thread third-party/realdds/src/dds-option.cpp Outdated
Comment thread third-party/realdds/src/dds-device.cpp
Comment thread unit-tests/dds/d405.py
Comment thread unit-tests/dds/test-option-value.py
Comment thread unit-tests/dds/test-option-value.py
Comment thread common/device-model.cpp
@maloel
maloel merged commit 17313a3 into realsenseai:development Feb 14, 2024
@maloel
maloel deleted the dds-option branch February 14, 2024 08:38
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