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)
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)
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)
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)