EventWrapper#

class eclypse.workflow.event.wrapper.EventWrapper[source]#

Bases: EclypseEvent

EventWrapper class.

Class to wrap an event function into a class that can be managed by the Simulator.

Methods

__init__(event_fn, name, triggers[, ...])

Initializes the EventWrapper.

Attributes

__init__(event_fn, name, triggers, activates_on=None, event_type=None, trigger_every_ms=None, max_triggers=1000000000, trigger_condition='any', role=EventRole.EVENT, report=None, remote=False, verbose=False)[source]#

Initializes the EventWrapper.

Parameters:
  • event_fn (Callable) – The function to wrap as an event.

  • name (str) – The name of the event.

  • triggers (list[Trigger]) – The list of triggers that will trigger the event.

  • activates_on (ActivatesOnType | None, optional) – The conditions that will trigger the metric. Defaults to None.

  • event_type (EventType | None, optional) – The type of the event. Defaults to None.

  • trigger_every_ms (float | None, optional) – The time in milliseconds between each trigger of the event. Defaults to None.

  • max_triggers (int | None, optional) – The maximum number of times the event can be triggered. Defaults to None.

  • trigger_condition (str | None, optional) – The condition for the triggers to fire the event. Defaults to “any”.

  • role (EventRole, optional) – The workflow role assigned to the event. Defaults to EventRole.EVENT.

  • report (str | list[str] | None, optional) – The type of report to generate for the event. Defaults to None.

  • remote (bool, optional) – Whether the event is remote. Defaults to False.

  • verbose (bool, optional) – Whether to enable verbose logging. Defaults to False.