Go to the documentation of this file.
33 #include "debug/HelloExample.hh"
40 goodbye(params->goodbye_object),
43 latency(params->time_to_wait),
44 timesLeft(params->number_of_fires)
46 DPRINTF(HelloExample,
"Created the hello object\n");
47 panic_if(!goodbye,
"HelloObject must have a non-null GoodbyeObject");
61 DPRINTF(HelloExample,
"Hello world! Processing the event! %d left\n",
65 DPRINTF(HelloExample,
"Done firing!\n");
73 HelloObjectParams::create()
const std::string myName
The name of this object in the Python config file.
const Tick latency
Latency between calling the event (in ticks)
void sayGoodbye(std::string name)
Called by an outside object.
void startup()
Part of a SimObject's initilaization.
void processEvent()
Example function to execute on an event trigger.
HelloObject(HelloObjectParams *p)
int timesLeft
Number of times left to fire the event before goodbye.
void schedule(Event &event, Tick when)
EventFunctionWrapper event
An event that wraps the above function.
const std::string & name()
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
GoodbyeObject * goodbye
Pointer to the corresponding GoodbyeObject. Set via Python.
Tick curTick()
The current simulated tick.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17