42 #include "debug/ProbeVerbose.hh"
43 #include "params/ProbeListenerObject.hh"
55 manager(params->manager->getProbeManager())
68 : manager(_manager),
name(_name)
79 ProbeListenerObjectParams::create()
87 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on %s.\n", pointName,
object->
name());
90 if ((*p)->getName() == pointName) {
91 (*p)->addListener(&listener);
96 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on %s failed, no such point.\n", pointName,
object->
name());
104 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" on %s.\n", pointName,
object->
name());
105 bool removed =
false;
107 if ((*p)->getName() == pointName) {
108 (*p)->removeListener(&listener);
113 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" on %s failed, no such point.\n", pointName,
object->
name());
121 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s.\n", point.
getName(),
object->name());
124 if ((*p)->getName() == point.
getName()) {
125 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s failed, already added.\n", point.
getName(),
object->name());
bool removeListener(std::string pointName, ProbeListener &listener)
Remove a ProbeListener from the ProbePoint named by pointName.
virtual ~ProbeListenerObject()
const std::string & name()
ProbeListener base class; again used to simplify use of ProbePoints in containers and used as to defi...
std::string getName() const
ProbePoint(ProbeManager *manager, const std::string &name)
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
bool addListener(std::string pointName, ProbeListener &listener)
Add a ProbeListener to the ProbePoint named by pointName.
ProbeListenerObject(const ProbeListenerObjectParams *params)
void addPoint(ProbePoint &point)
Add a ProbePoint to this SimObject ProbeManager.
std::vector< ProbePoint * > points
Vector for name look-up.
This class is a minimal wrapper around SimObject.
const M5_CLASS_VAR_USED SimObject * object
Required for sensible debug messages.
std::vector< ProbeListener * > listeners
virtual const std::string name() const
ProbeListener base class; here to simplify things like containers containing multiple types of ProbeL...
ProbeManager *const manager
ProbeListener(ProbeManager *manager, const std::string &name)
Abstract superclass for simulation objects.