wrench::Alarm

class Alarm : public wrench::Service

A one-shot service that sends a message to a mailbox 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, simgrid::s4u::Mailbox *reply_mailbox_name, 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_mailbox – the mailbox 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)

Throws
  • std::shared_ptr<HostError>

  • std::runtime_error

Returns

a shared_ptr reference to the alarm service