Rpc

class Rpc

An instance of the YANG schmea rpc node.

Instances of this class represent a YANG rpc and are modelled as Callables. The input data node tree is used to populate the input parameters to the rpc if any. The Callable takes as a parameter the ServiceProvider that can execute this rpc as its parameter returning a pointer to a DataNode tree if output is available.

virtual ~Rpc()
virtual std::shared_ptr<DataNode> operator()(const ServiceProvider &provider)

Execute/Invoke the rpc through the given service provider.

Parameters:sp – The Service provider.
Returns:Pointer to the DataNode or nullptr if none exists.
virtual DataNode &input() const

Get the input data tree.

Returns:Pointer to the input DataNode or nullptr if the rpc does not have an input element in the schema.
virtual SchemaNode &schema() const
Returns:Pointer to the SchemaNode associated with this rpc.