A Discrete-Event Network Simulator
API
grid.TimelineEvent Class Reference

TimelineEvent class. More...

Public Member Functions

def __init__ (self, name='')
 Get ranges bounds. More...
 
def add_event (self, event)
 Add Event. More...
 
def get_bounds (self)
 Get Bounds. More...
 
def get_events (self, start, end)
 Get Events. More...
 
def get_events_bounds (self, start, end)
 Get Events Bounds. More...
 
def sort (self)
 Sort function. More...
 

Public Attributes

 events
 events More...
 
 name
 name More...
 

Private Member Functions

def __search (self, key)
 Search function. More...
 

Detailed Description

TimelineEvent class.

Definition at line 183 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

def grid.TimelineEvent.__init__ (   self,
  name = '' 
)

Get ranges bounds.

Parameters
selfthis object
namename

Definition at line 188 of file grid.py.

Member Function Documentation

◆ __search()

def grid.TimelineEvent.__search (   self,
  key 
)
private

Search function.

Parameters
selfthis object
keythe key
Returns
event index

Definition at line 195 of file grid.py.

References grid.TimelineEvent.events.

Referenced by grid.TimelineEvent.get_events(), grid.TimelineEvent.get_events_bounds(), grid.TimelineDataRange.get_ranges(), and grid.TimelineDataRange.get_ranges_bounds().

+ Here is the caller graph for this function:

◆ add_event()

def grid.TimelineEvent.add_event (   self,
  event 
)

Add Event.

Parameters
selfthis object
eventevent to add
Returns
none

Definition at line 213 of file grid.py.

References grid.TimelineEvent.events.

◆ get_bounds()

def grid.TimelineEvent.get_bounds (   self)

Get Bounds.

Parameters
selfthis object
Returns
the bounds

Definition at line 246 of file grid.py.

References grid.TimelineEvent.events.

◆ get_events()

def grid.TimelineEvent.get_events (   self,
  start,
  end 
)

Get Events.

Parameters
selfthis object
startstarting event
endending event
Returns
the events

Definition at line 220 of file grid.py.

References grid.TimelineDataRange.__search(), grid.TimelineEvent.__search(), and grid.TimelineEvent.events.

+ Here is the call graph for this function:

◆ get_events_bounds()

def grid.TimelineEvent.get_events_bounds (   self,
  start,
  end 
)

Get Events Bounds.

Parameters
selfthis object
startstarting event
endending event
Returns
event bounds

Definition at line 230 of file grid.py.

References grid.TimelineDataRange.__search(), and grid.TimelineEvent.__search().

+ Here is the call graph for this function:

◆ sort()

def grid.TimelineEvent.sort (   self)

Sort function.

Parameters
selfthis object
Returns
none

Definition at line 240 of file grid.py.

References grid.TimelineEvent.events.

Member Data Documentation

◆ events

◆ name

grid.TimelineEvent.name

name

Definition at line 193 of file grid.py.


The documentation for this class was generated from the following file: