Collaboration diagram for pfp::core::PFPObject:Public Member Functions | |
| PFPObject (const std::string &module_name, PFPObject *parent=0, bool enable_dicp=false) | |
| PFPObject (const std::string &module_name, std::string BaseConfigFile, std::string InstanceConfigFile="", PFPObject *parent=0, bool enable_dicp=false) | |
| PFPObject (const PFPObject &other, bool enable_dicp=false) | |
| void | LoadBaseConfiguration (std::string) |
| void | LoadInstanceConfiguration (std::string) |
| pfp::core::ConfigurationParameterNode | GetParameter (std::string param) |
| pfp::core::ConfigurationParameterNode | GetParameterfromParent (std::string param, PFPObject *parent) |
| std::vector< std::string > | ModuleHierarchy () |
| const std::string & | module_name () const |
| PFPObject * | GetParent () |
| virtual bool | add_counter (const std::string &counter_name, std::size_t counter_value=0) |
| Add a counter to the PFPObject. More... | |
| virtual bool | set_counter (const std::string &counter_name, std::size_t counter_value) |
| Set the value of a counter. More... | |
| virtual bool | remove_counter (const std::string &counter_name) |
| Remove a counter from the PFPObject. More... | |
| virtual std::size_t | counter_value (const std::string &counter_name) const |
| Get the value of a counter Note: This will throw a std::out_of_range exception if the counter does not exist in the PFPObject. More... | |
| virtual bool | increment_counter (const std::string &counter_name) |
| Increment the specified counter. More... | |
| virtual bool | increment_counter (const std::string &counter_name, const int incr_amount) |
| virtual bool | decrement_counter (const std::string &counter_name) |
| Decrement the specified counter. More... | |
| virtual bool | decrement_counter (const std::string &counter_name, const int decr_amount) |
| virtual void | attach_observer (std::shared_ptr< PFPObserver > observer) |
| Attach an observer that will be notified when events occur. More... | |
| virtual void | notify_counter_changed (const std::string &counter_name, std::size_t counter_value, double sim_time) |
| Notify all attached observers when a counter is changed. More... | |
| virtual void | notify_counter_added (const std::string &counter_name, double sim_time) |
| Notify all attached observers when a counter is added to the PFPObject. More... | |
| virtual void | notify_counter_removed (const std::string &counter_name, double sim_time) |
| Notify all attached observers when a counter is removed from the PFPObject. More... | |
| virtual std::size_t | num_counters () const |
| Get the number of counters in the PFPObject. More... | |
| void | AddChildModule (std::string module_name, PFPObject *module) |
| Add a child module to the PFPObject. More... | |
| template<typename DATA_TYPE > | |
| void | notify_data_written (const std::shared_ptr< DATA_TYPE > data, double sim_time) |
| Notify all observers of data written. More... | |
| template<typename DATA_TYPE > | |
| void | notify_data_read (const std::shared_ptr< DATA_TYPE > data, double sim_time) |
| Notify all observers of data read. More... | |
| template<typename DATA_TYPE > | |
| void | notify_data_dropped (const std::shared_ptr< DATA_TYPE > data, std::string &drop_reason, double sim_time) |
| Notify all observers of data drop. More... | |
| template<typename DATA_TYPE > | |
| void | drop_data (const std::shared_ptr< DATA_TYPE > data, std::string drop_reason) |
Public Attributes | |
| const bool | dicp_enabled |
| pfp::core::ConfigurationParameterNode | SimulationParameters |
Static Public Attributes | |
| static MTQueue< std::function < void(void)> > | events_ |
Protected Attributes | |
| const std::string | GlobalConfigPath |
| const std::string | module_name_ |
| PFPObject * | parent_ |
| std::map< std::string, std::string > | configMap |
|
std::map< std::string, std::size_t > | counters_ |
| Store counters and values. | |
|
std::vector< std::shared_ptr < PFPObserver > > | observers_ |
| List of observers attached to this PFPObject. | |
|
std::map< std::string, PFPObject * > | childModules_ |
| Internal list of submodules. | |
Member Function Documentation
|
virtual |
Add a counter to the PFPObject.
- Parameters
-
counter_name Name of the counter counter_value Value of the counter (default: 0)
- Returns
- True if the counter was added; false if the counter already exists
Here is the call graph for this function:| void pfp::core::PFPObject::AddChildModule | ( | std::string | module_name, |
| PFPObject * | module | ||
| ) |
Add a child module to the PFPObject.
- Parameters
-
module_name name of module module pointer to the module
|
virtual |
Attach an observer that will be notified when events occur.
- Parameters
-
observer Observer to attach
|
virtual |
Get the value of a counter Note: This will throw a std::out_of_range exception if the counter does not exist in the PFPObject.
- Parameters
-
counter_name Name of the counter
- Returns
- Value of the counter
Here is the caller graph for this function:
|
virtual |
Decrement the specified counter.
- Parameters
-
counter_name Name of the counter
- Returns
- True if the counter was decremented
Here is the call graph for this function:
|
virtual |
Increment the specified counter.
- Parameters
-
counter_name Name of the counter
- Returns
- True if the counter was incremented
Here is the call graph for this function:
|
virtual |
Notify all attached observers when a counter is added to the PFPObject.
- Parameters
-
counter_name Name of the counter sim_time Simulation time at which the counter was added (this will usually be 0)
Here is the caller graph for this function:
|
virtual |
Notify all attached observers when a counter is changed.
- Parameters
-
counter_name Name of the counter counter_value New value of the counter sim_time Simulation time at which the event occurred
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Notify all attached observers when a counter is removed from the PFPObject.
- Parameters
-
counter_name Name of the counter sim_time Simulation time at which the counter was removed (this will usually be 0)
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Notify all observers of data drop.
- Parameters
-
data Data that was dropped sim_time Simulation time of the event
Here is the call graph for this function:
|
inline |
Notify all observers of data read.
- Parameters
-
data Data that was read sim_time Simulation time of the event
Here is the call graph for this function:
|
inline |
Notify all observers of data written.
- Parameters
-
data Data that was written sim_time Simulation time of the event
Here is the call graph for this function:
|
virtual |
Get the number of counters in the PFPObject.
- Returns
- Number of counters
Here is the caller graph for this function:
|
virtual |
|
virtual |
Set the value of a counter.
- Parameters
-
counter_name Name of the counter counter_value Value of the counter
- Returns
- True if the value was changed; false if the PFPObject does not contain the counter
Here is the call graph for this function:Member Data Documentation
|
protected |
Configuration Map used >
|
static |
Global event queue
The documentation for this class was generated from the following files:
- /home/lemniscate/workspace/PFPSim/pfpsim/core/PFPObject.h
- /home/lemniscate/workspace/PFPSim/pfpsim/core/PFPObject.cpp
