RPCΒΆ

An Rpc represents an instance of the YANG RPC schema node. To invoke a rpc the user first creates an Rpc using the RootSchemaNode::create_rpc() call passing in a path with the name of the rpc. For example:

auto get_config = root_schema->create_rpc("ietf-netconf:get-config")

The input DataNode can be obtained using Rpc::input(). This can be used to populate/create the child nodes of input as per this rpc’s schema. The Rpc is a callable that takes a single argument which is the ServiceProvider. To invoke the rpc do this

auto config = get_config(sp); /// sp is a service provider

The config variable above is the DataNode representing the output of the rpc.