debug_interface impl for DDS; rs-terminal with DDS - #12270
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.
Isn't there an `explanation`` field in case of failure?
There was a problem hiding this comment.
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.
Why do we need this as static?
There was a problem hiding this comment.
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.
Implement
hwmcontrol:dds_device_proxy[LRS-898]rs-terminalsupport for DDS [LRS-896]On the way, minor stuff:
create_matcher()hw_monitor::build_command()