AimRT/document
zhangyi1357 ac7715e424
feat: add json and ros2 serialization support for grpc plugin (#81)
* feat: enhance gRPC content-type handling and serialization support

Improve content-type validation in gRPC request headers to support additional types, allowing for JSON serialization. Update the serialization logic to dynamically set the type based on incoming headers, ensuring better compatibility and error handling.

* feat: support ros2 service function names

Enhance service function registration to accept names starting with 'ros2:' in addition to 'pb:'. Update URL path handling and content type mappings accordingly to ensure compatibility with ROS 2 services, improving integration capabilities.

* feat: add gRPC plugin configuration and startup scripts

Introduce configuration files for the gRPC client and server plugins, allowing for easier setup and management of RPC communication. Add shell scripts to launch the client and server with the specified configurations, streamlining the development process.

* refactor: improve service function name validation and error handling

Enhance the clarity of service function name registration by separating the function name variable for improved readability. Update error messages for better guidance on valid prefixes and standardize maps for content types and serialization types. This increases maintainability and reduces the risk of errors during registration.

* refactor: streamline client option lookup and improve code clarity

Simplify the client option lookup by replacing `std::find_if` with `std::ranges::find_if`. Also, enhance readability by cleaning up comment formatting and unnecessary whitespace.

* chore: update copyright information in configuration files

Revise copyright year and licensing details to reflect the current ownership and license for the AimRT project.

* refactor: improve validation logic in options

Enhance option verification by using standard algorithms for consistency and readability. This ensures minimum thresholds for connection numbers and timer durations are respected, improving robustness in client and server configurations.

* docs: update release notes and plugin documentation

Add support for grpc plugin serialization with ros2 messages and json format, enhancing flexibility in data handling. Remove outdated protobuf-only restriction to improve compatibility and user experience.

* docs: add ros2 rpc example details and usage instructions

Expand the README to include a new section on using the grpc plugin with a ros2-based RPC interface. Provide explicit instructions on configuration, core code references, and running the server and client. Enhance the documentation to clarify the differences from the protobuf RPC example.

---------

Co-authored-by: zhangyi <zhangyi@agibot.com>
2024-11-05 11:44:25 +08:00
..
2024-10-31 17:57:47 +08:00