wrench::Alarm
-
class Alarm : public wrench::Service
A one-shot service that sends a message to a commport_name after some specified amount of time and terminates.
Public Functions
-
void kill()
Immediately (i.e., brutally) terminate the alarm service.
Public Static Functions
-
static std::shared_ptr<Alarm> createAndStartAlarm(Simulation *simulation, double date, std::string hostname, S4U_CommPort *reply_commport, SimulationMessage *msg, std::string suffix)
Create and start an alarm service.
- Parameters:
simulation – a pointer to the simulation object
date – the date at which the message should be sent (if date is in the past then the message will be sent immediately)
hostname – the name of the host on which to start the alarm service
reply_commport – the commport to which the alarm service will send a message
msg – the message to send
suffix – a (possibly empty) suffix to append to the daemon name (useful in debug output)
- Returns:
a shared_ptr reference to the alarm service
-
void kill()