A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | Private Member Functions | List of all members
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 188 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

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

Get ranges bounds.

Parameters
selfthis object
namename
Returns
none

Definition at line 193 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 201 of file grid.py.

References grid.TimelineEvent.events.

Referenced by grid.TimelineEvent.get_events(), and grid.TimelineEvent.get_events_bounds().

◆ add_event()

def grid.TimelineEvent.add_event (   self,
  event 
)

Add Event.

Parameters
selfthis object
eventevent to add
Returns
none

Definition at line 219 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 252 of file grid.py.

References grid.TimelineEvent.events, and return.

◆ 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 226 of file grid.py.

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

◆ 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 236 of file grid.py.

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

◆ sort()

def grid.TimelineEvent.sort (   self)

Sort function.

Parameters
selfthis object
Returns
none

Definition at line 246 of file grid.py.

References grid.TimelineEvent.events.

Member Data Documentation

◆ events

grid.TimelineEvent.events

◆ name

grid.TimelineEvent.name

name

Definition at line 199 of file grid.py.


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