33#include "debug/HelloExample.hh"
43 goodbye(params.goodbye_object),
46 latency(params.time_to_wait),
47 timesLeft(params.number_of_fires)
49 DPRINTF(HelloExample,
"Created the hello object\n");
50 panic_if(!goodbye,
"HelloObject must have a non-null GoodbyeObject");
64 DPRINTF(HelloExample,
"Hello world! Processing the event! %d left\n",
68 DPRINTF(HelloExample,
"Done firing!\n");
void sayGoodbye(std::string name)
Called by an outside object.
const Tick latency
Latency between calling the event (in ticks)
const std::string myName
The name of this object in the Python config file.
void startup() override
Part of a SimObject's initilaization.
int timesLeft
Number of times left to fire the event before goodbye.
GoodbyeObject * goodbye
Pointer to the corresponding GoodbyeObject. Set via Python.
HelloObject(const HelloObjectParams &p)
void processEvent()
Example function to execute on an event trigger.
EventFunctionWrapper event
An event that wraps the above function.
Abstract superclass for simulation objects.
void schedule(Event &event, Tick when)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
const std::string & name()