Events

class dsns.events.Event(time: float, properties: list[str] = [])

Base class for events.

abstractmethod __init__(time: float, properties: list[str] = [])
class dsns.events.InstantEvent(time: float, properties: list[str] = [])

Base class for instant events. These events have been generated at the current simulation time and can therefore be processed immediately.

__init__(time: float, properties: list[str] = [])
class dsns.events.EventQueue

Priority queue for events.

__init__()
empty() bool

Check if the queue is empty.

Returns:

True if the queue is empty, False otherwise.

add_event(event: Event)

Add an event to the queue.

Parameters:

event – The event to add.

add_events(events: list[Event])

Add multiple events to the queue.

Parameters:

events – The events to add.

get_next_event() Event | None

Remove and return the next event from the queue.

Returns:

The next event, or None if the queue is empty.

get_next_time() float | None

Return the time of the next event in the queue, without removing it.

Returns:

The time of the next event, or None if the queue is empty.

class dsns.events.LinkUpEvent(time: float, sat1: int, sat2: int)

Event for a link between satellites going up.

__init__(time: float, sat1: int, sat2: int)
class dsns.events.LinkDownEvent(time: float, sat1: int, sat2: int, sender_down: bool = True, receiver_down: bool = False)

Event for a link between satellites going down.

__init__(time: float, sat1: int, sat2: int, sender_down: bool = True, receiver_down: bool = False)
class dsns.events.RenderEvent(time: float)

Event for rendering the current state of the simulation.

__init__(time: float)