Skip to content

Provide templated RPC calls as a XHALInterface member function

Summary

[Migrated from this GitHub issue.]

Currently, the templated RPC calls are issued through the free function xhal::common::rpc::call whose first parameter is the raw RPCSvc connection. As a consequence, the templated RPC calls are not as natural as they could be.

Very briefly discussed in the cmsgemos templated RPC migration PR.

What is the expected correct behavior?

Instead of writing

auto res = xhal::common::rpc::call<::oh::broadcastRead>(rpc, static_cast<uint32_t>(m_link), name, mask); 

where rpc is a wisc::RPCSvc object, one could write:

auto res = conn.call<::oh::broadcastRead>(static_cast<uint32_t>(m_link), name, mask); 

where conn is a XHALInterface object.

Edited by Laurent Petre