| 212 | } |
| 213 | |
| 214 | inline void ExportRpcHandleRef(pybind11::object m) { |
| 215 | using aimrt::rpc::RpcHandleRef; |
| 216 | |
| 217 | pybind11::class_<RpcHandleRef>(std::move(m), "RpcHandleRef") |
| 218 | .def(pybind11::init<>()) |
| 219 | .def("__bool__", &RpcHandleRef::operator bool) |
| 220 | .def("RegisterService", |
| 221 | pybind11::overload_cast<std::string_view, aimrt::rpc::ServiceBase*>(&RpcHandleRef::RegisterService)) |
| 222 | .def("RegisterService", |
| 223 | pybind11::overload_cast<aimrt::rpc::ServiceBase*>(&RpcHandleRef::RegisterService)) |
| 224 | .def("PbRegisterClientFunc", &PbRpcHandleRefRegisterClientFunc) |
| 225 | .def("PbInvoke", &PbRpcHandleRefInvoke); |
| 226 | } |
| 227 | |
| 228 | inline void ExportRpcProxyBase(pybind11::object m) { |
| 229 | using aimrt::rpc::ContextRef; |