Advertisement
Iam_Sandeep

Parent class

May 14th, 2022
659
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from abc import ABC,abstractmethod
  2. import sys
  3. from nest.experiment import *
  4. from nest.topology import *
  5.  
  6.  
  7. class topo_helper(ABC):
  8.     def __init__(self,bw,delay):
  9.         self.bandwidth=bw
  10.         self.delay=delay
  11.         self.hosts_cnt=0
  12.         self.switch_cnt=0
  13.         self.router_cnt=0
  14.         self.hosts_list=[]
  15.         self.switch_list=[]
  16.         self.router_list=[]
  17.    
  18.    
  19.     def set_delay(self,delay):
  20.         self.delay=delay
  21.  
  22.     def get_delay(self):
  23.         return self.delay
  24.  
  25.     def set_bandwidth(self,bw):
  26.         self.bandwidth=bw
  27.  
  28.     def get_bandwidth(self):
  29.         return self.bandwidth
  30.    
  31.        
  32.    
  33.        
  34.    
  35.    
  36.     def __str__(self):
  37.         return "This is topology helper class"
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement