-
Couldn't load subscription status.
- Fork 4.9k
debug_interface impl for DDS; rs-terminal with DDS #12270
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
Conversation
| _dds_dev->send_control( control, &reply ); | ||
| std::string default_status( "OK", 2 ); | ||
| if( rsutils::json::get( reply, "status", default_status ) != default_status ) | ||
| throw std::runtime_error( "Failed HWM: " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there an `explanation`` field in case of failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what it's supposed to be getting in the next line... I copy-pasted, maybe there's a bug somewhere else, too -- I'll check.
| virtual std::vector<uint8_t> send( std::vector<uint8_t> const & data ) const; | ||
| virtual std::vector<uint8_t> send( command cmd, hwmon_response * = nullptr, bool locked_transfer = false ) const; | ||
| std::vector<uint8_t> build_command(uint32_t opcode, | ||
| static std::vector<uint8_t> build_command(uint32_t opcode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this as static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the beginning, I had the build-command code directly call the hw-monitor, but there is no hw-monitor object in the DDS device. So how can you build a command?
Later I decided I didn't want the DDS code to even know what a hardware monitor is, and that we shouldn't assume to know how a device builds its commands, so I removed the hw-monitor references but this stayed.
Currently, I think it's fine making it static as internally that's how it implemented (it calls a static function). Otherwise we would have to turn it into a virtual function and do some other work. I think that it's valid to go that way, but in a different PR and only if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Implement
hwmcontrol:dds_device_proxy[LRS-898]rs-terminalsupport for DDS [LRS-896]On the way, minor stuff:
create_matcher()hw_monitor::build_command()