コード例 #1
0
ファイル: instructions.py プロジェクト: jmorgadov/nesim
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating switch: {self.switch_name}')
     switch = dv.Switch(self.switch_name, self.ports_count,
                        net_sim.signal_time)
     net_sim.add_device(switch)
コード例 #2
0
ファイル: instructions.py プロジェクト: jmorgadov/nesim
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating hub: {self.hub_name}')
     hub = dv.Hub(self.hub_name, self.ports_count)
     net_sim.add_device(hub)
コード例 #3
0
ファイル: instructions.py プロジェクト: jmorgadov/nesim
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating host: {self.host_name}')
     host = dv.Host(self.host_name, net_sim.signal_time)
     net_sim.add_device(host)
コード例 #4
0
ファイル: instructions.py プロジェクト: jmorgadov/nesim
 def execute(self, net_sim: sim.NetSimulation):
     print(f'Creating router: {self.router_name}')
     router = dv.Router(self.router_name, self.ports_count,
                        net_sim.signal_time)
     net_sim.add_device(router)