View Source amoc_config_scenario (amoc v3.3.0)

Summary

Types

-type error() :: {error, error_type(), reason()}.
-type error_type() :: atom().
-type maybe_update_fun() :: update_fun() | fun((_, _) -> any()).
Link to this type

maybe_verification_fun/0

View Source
-type maybe_verification_fun() :: verification_fun() | fun((_) -> any()).
Link to this type

module_configuration/0

View Source
-type module_configuration() :: [module_parameter()].
Link to this type

module_configuration_map/0

View Source
-type module_configuration_map() :: #{name() => #{value := any(), any() => any()}}.
-type module_parameter() ::
    #module_parameter{name :: name(),
                      mod :: module(),
                      value :: value(),
                      description :: string(),
                      verification_fn :: maybe_verification_fun(),
                      update_fn :: maybe_update_fun() | read_only}.
-type name() :: atom().
-type reason() :: any().
-type settings() :: [{name(), value()}].
-type update_fun() :: fun((ParamName :: name(), NewValue :: value()) -> any()).
-type value() :: any().
-type verification_fun() ::
    fun((Value :: value()) -> boolean() | {true, NewValue :: value()} | {false, reason()}).

Functions

Link to this function

get_current_configuration()

View Source
-spec get_current_configuration() -> {ok, module_configuration_map()}.
Link to this function

get_default_configuration(Module)

View Source
-spec get_default_configuration(module()) -> {ok, module_configuration_map()} | error().
Link to this function

parse_scenario_settings(Module, Settings)

View Source
-spec parse_scenario_settings(module(), settings()) -> ok | error().
Link to this function

update_settings(Settings)

View Source
-spec update_settings(settings()) -> ok | error().