scc  2022.4.0
SystemC components library
scc::cci_broker Class Reference
Inheritance diagram for scc::cci_broker:
Collaboration diagram for scc::cci_broker:

Public Member Functions

cci::cci_originator get_value_origin (const std::string &parname) const override
 
 cci_broker (const std::string &name)
 
bool has_preset_value (const std::string &parname) const override
 
cci::cci_originator get_preset_value_origin (const std::string &parname) const override
 
cci::cci_value get_preset_cci_value (const std::string &parname) const override
 
void set_preset_cci_value (const std::string &parname, const cci::cci_value &cci_value, const cci::cci_originator &originator) override
 Set a parameter's preset value. More...
 
void lock_preset_value (const std::string &parname) override
 Lock a parameter's preset value. More...
 
cci::cci_value get_cci_value (const std::string &parname, const cci::cci_originator &originator=cci::cci_originator()) const override
 
cci::cci_param_untyped_handle get_param_handle (const std::string &parname, const cci::cci_originator &originator) const override
 
std::vector< cci::cci_param_untyped_handle > get_param_handles (const cci::cci_originator &originator) const override
 
void add_param (cci::cci_param_if *par) override
 
void remove_param (cci::cci_param_if *par) override
 
bool is_global_broker () const override
 

Detailed Description

Definition at line 28 of file cci_broker.h.

Member Function Documentation

◆ lock_preset_value()

void scc::cci_broker::lock_preset_value ( const std::string &  parname)
override

Lock a parameter's preset value.

Lock so that this parameter's preset value cannot be overwritten by any subsequent set_preset_value call. This allows to emulate a hierarchical precendence since a top-level module can prevent the childs from setting preset values by locking the preset value before creating the subsystem.

The globbing supports ?,*,**, and character classes ([a-z] as well as [!a-z]). '.' acts as hierarchy delimiter and is only matched with ** Regular expression must start with a carret ('^') so that it can be identified as regex.

Throws (and does not lock) if no preset value exists that can be locked or if a preset value is already locked or if the parameter is already existing as object.

Exceptions
cci::cci_report::set_param_failedLocking parameter object failed
Parameters
parnameHierarchical parameter name.

Definition at line 167 of file cci_broker.cpp.

◆ set_preset_cci_value()

void scc::cci_broker::set_preset_cci_value ( const std::string &  parname,
const cci::cci_value &  cci_value,
const cci::cci_originator &  originator 
)
override

Set a parameter's preset value.

Set a parameter's preset value using globbing expression or regular expression.

The globbing supports ?,*,**, and character classes ([a-z] as well as [!a-z]). '.' acts as hierarchy delimiter and is only matched with ** Regular expression must start with a carret ('^') so that it can be identified as regex.

The preset value has priority to the default value being set by the owner!

Exceptions
cci::cci_report::set_param_failedSetting parameter object failed
Parameters
parnameFull hierarchical parameter name.
cci_valuecci::cci_value representation of the preset value the parameter has to be set to.
originatororiginator reference to the originator (not applicable in case of broker handle)

Definition at line 148 of file cci_broker.cpp.


The documentation for this class was generated from the following files: