ServiceProvider

class ServiceProvider

Interface for all ServiceProvider implementations.

Concrete instances of ServiceProviders are expected to extend this interface.

virtual RootSchemaNode &get_root_schema()

Returns the SchemaNode tree supported by this instance of the ServiceProvider.

Returns:Pointer to the RootSchemaNode or nullptr if one could not be created.
virtual std::shared_ptr<DataNode> invoke(Rpc &rpc) const

Invokes or executes the given rpc and returns a DataNode pointer if the Rpc has an output modelled in YANG.

Parameters:rpc – Reference to the Rpc node.
Returns:Shared pointer to the DataNode representing the output.
EncodingFormat get_encoding()

Returns the type of encoding supported by the service provider.

virtual ~ServiceProvider()