Skip to content

Update gRPC/Protobuf and change implementation of Data Types

Florian Meinicke requested to merge update-grpc into master

Description

  • Update gRPC to v1.31.0
    • Fixes most of the build errors we have with MinGW
  • This also updates Protobuf to v3.12.2
    • Unfortunately breaks the current implementation of the Data Type convenience classes since we can't inherit from the Protobuf generated classes anymore (see #32 (closed))
  • Update test_data_types.cpp to test the new interface of the classes
  • Remove CCommandConfirmation since it's not used by users but just internally

What is the current behavior?

  • Data Types inherit from the classes that are generated by protoc and add some convenience constructors and conversion operators

What is the new/improved behavior?

  • Data Types all inherit from the CDataType class template which has the internal value of the data type
  • The conversion to the Protobuf classes happens on the fly, i.e. we don't have an additional internal value for the Protobuf type
  • Every Data Type is now implicitly convertible to its underlying type (e.g. a SiLA2::CReal is convertible to a double)
  • Data Types should now support all possible operator overloads

Does this MR introduce a breaking changes?

Convenience Data Type classes are not implicitly convertible to the Protobuf generated classes anymore. Instead, users need to call toProtoMessage() or toProtoMessagePtr() depending on their use case.

Checklist:

  • The commit messages follow our guidelines
  • If necessary, tests have been added
  • Docs have been added / updated
  • CHANGELOG.md has been updated in the Added/Changed section
Edited by Florian Meinicke

Merge request reports