Expand description
Function-call-style service API (Spec §7.2.2.1, §7.9.2.1, §7.10.1).
The DDS-RPC spec defines two language-binding styles:
- Request/reply style (low-level) —
crates/rpc/src/{requester, replier}.rs. - Function-call style (high-level) — this module.
Function-call style uses stubs (client-side proxy) and
skeletons (service-side dispatch), generated at codegen time from a
service definition (IDL interface Foo { void op(); }).
The stubs look like native function calls, but internally
encapsulate the request/reply path.
§Architecture
Here we provide the runtime foundation for generated stubs and skeletons:
- The
FunctionStubtrait for client-side proxies (each generated stub class implements it). - The
FunctionSkeletontrait for service-side dispatch — calls the right operation from therequest_dataunion discriminator and returns the reply. - The
dispatch_requesthelper for skeleton implementations.
Codegen templates live in crates/idl-cpp/src/rpc_template.rs
(C++) and crates/idl-java/src/rpc_template.rs (Java).
Structs§
- Operation
Descriptor - Operation descriptor for codegen.
- Service
Descriptor - Service descriptor for codegen — collection of
OperationDescriptors.
Traits§
- Function
Skeleton - Skeleton trait: every generated service-side dispatch implements it. The skeleton unpacks the request discriminator, calls the matching operation in the user implementation and packs the reply back as a union.
- Function
Stub - Stub trait: every generated client-side proxy implements it.
Functions§
- dispatch_
request - Dispatcher helper for skeleton implementations.