C++: add missing implementations for client advertised schema/encoding #876
+14
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
C++ server/client: add missing implementations for client advertised schema / schema encoding
Docs
Description
Although foxglove ws protocol allow client to advertise complete schema definition string as well as schema name, current C++ implementation lacks such fields. Particularly:
ClientAdvertisement
struct lacksschemaEncoding
field,ClientAdvertisement
struct hasschema
field, but it is never populated (websocket server does not read schema or schema encoding to json)This PR resolves above problems, and additionally since this is breaking change from unimplemented to implemented, types are decided as following:
schema
field type is changed fromstd::vector<uint8_t>
tostd::optional<std::string>
, as schema fields are passed in as json quoted string, and it's optionalschemaEncoding
field type is determined asstd::optional<std::string>
, the same reason forschema
.NOT TESTED YET. I plan to integrate this to my module to verify if this really works, but it would take some time.
Fixes: #875
Fixes: FG-9447