5.6.10. Request-Reply and Remote Procedure Calls

5.6.10.1. [Major] Python RPC API didn’t support str arguments

Declaring an argument or a return type directly as a string (str) was not supported by the Python RPC API. This has been resolved, and the following example is now supported:

import rti.rpc as rpc
import rti.types as idl

@rpc.service
class MyService:
    @rpc.operation(
          parameter_annotations={"a": [idl.bound(10)], "return_": [idl.bound(20)]}
     )
    def my_operation(self, a: str, b: str) -> str:
        pass

The service above is equivalent to the following service defined in IDL:

@service("DDS")
interface MyService {
     string<20> my_operation(string<10> a, string b);
};

[RTI Issue ID PY-177]