Skip to content

option-value and usage in options-changed notifications - #12616

Merged
maloel merged 6 commits into
realsenseai:developmentfrom
maloel:option-value
Feb 8, 2024
Merged

option-value and usage in options-changed notifications#12616
maloel merged 6 commits into
realsenseai:developmentfrom
maloel:option-value

Conversation

@maloel

@maloel maloel commented Jan 29, 2024

Copy link
Copy Markdown
Contributor

Prequel to DDS-related bulk-query changes:

  • the rs2::options_list object now returns rs2::option_value rather than just the rs2_option
  • rs2::option_value now holds a rs2_option_value const *
  • rs2_option_value is a struct containing a type, id, and union of as_float etc.
  • added rs2_option_type
  • new APIs: rs2_get_option_value, rs2_delete_option_value, rs2_option_type_to_string, rs2_get_option_value_from_list
  • on_options_changed notifications therefore now return the actual values seen so you don't need to query them again...

@maloel
maloel requested a review from OhadMeir January 29, 2024 05:59
Comment thread src/core/options-watcher.cpp Outdated
@Nir-Az

Nir-Az commented Jan 29, 2024

Copy link
Copy Markdown
Collaborator

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

image

image

Comment thread src/core/options-watcher.h Outdated
Comment thread src/rs.cpp
Comment thread src/rs.cpp
Comment thread src/rs.cpp
Comment thread src/rs.cpp
@maloel

maloel commented Jan 29, 2024

Copy link
Copy Markdown
Contributor Author

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

I can take a look, but I don't understand the highlight you have or the meaning... is this in the private branch?

@OhadMeir

Copy link
Copy Markdown
Contributor

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

I can take a look, but I don't understand the highlight you have or the meaning... is this in the private branch?

It also happened to me on the public branch before I completed my PR, I thought I handled all the cases.
The problem happened when closing the device, the callback iterated over a list that was cleared so the iterator was invalidated.

Nir showed me he had this error, I told him that you have a PR that changes the behavior, so don't know if it is still relevant.

@maloel

maloel commented Jan 30, 2024

Copy link
Copy Markdown
Contributor Author

when closing the device, the callback iterated over a list that was cleared

I'll try to reproduce. Technically I don't quite understand how... the device was destroyed while a callback was in progress? The join() wasn't blocking?
Or maybe the sensor was still alive, but its options were deleted?

Comment thread src/rs.cpp Outdated
Comment thread src/rs.cpp Outdated
@maloel
maloel merged commit 1acac71 into realsenseai:development Feb 8, 2024
@maloel
maloel deleted the option-value branch February 8, 2024 11:45
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.

3 participants