Class SmcPluginBase

Class Documentation

class SmcPluginBase

Base class providing the minimum interface required by a plugin to work with SMC.

Public Functions

virtual ~SmcPluginBase() = default
virtual std::string getPluginName() const = 0

Get a string containing the plugin name.

Returns:

The string ID of the loaded plugin instance (e.g. “SmcPluginBase”)

inline virtual void setRandomSeed(const uint32_t seed)

Set the random seed for the plugin.

Parameters:

seed – The seed value to set

inline void loadParameters(const DataExchange &config)

Configure the plugin before resetting and using it.

Parameters:

config – The configuration parameters

inline std::optional<DataExchange> reset()

Reset the plugin to the initial state.

Returns:

The initial state of the output variables, or nullopt in case of errors.

inline std::optional<DataExchange> nextStep(const DataExchange &input_data)

Advances the plugin to the next state.

Parameters:

input_data – The data used to control the evolution of the plugin

Returns:

The output values associated to the new reached state, or nullopt in case of errors.

Protected Functions

virtual void processInitParameters(const DataExchange &config) = 0

Process the provided plugin’s configuration.

Parameters:

config – The structure containing the configuration to load.

virtual std::optional<DataExchange> processReset() = 0

Reset the plugin to the initial state.

Returns:

The initial state of the output variables, or nullopt in case of errors..

virtual std::optional<DataExchange> processInputParameters(const DataExchange &config) = 0

Process the input parameters provided to advance the plugin to its next state.

Parameters:

config – The structure containing the configuration to load.

Returns:

The new plugin state, after getting to its next state, or nullopt in case of errors.

inline void setParamsLoaded()
inline void checkParamsLoaded()