Question: help implementing a distributed asynchronous distance vector routing protocol(Python) need help finishing Node.py instructions provided below please read everything Focused on distance tables and routing
help implementing a distributed asynchronous distance vector routing protocol(Python)
need help finishing Node.py
instructions provided below
please read everything
Focused on distance tables and routing tables
please comment if additional information is needed
Node.py

from common import * class Node: def _init_(self, ID, networksimulator, costs): self.myID = ID self.ns = networksimulator num = self.ns. NUM_NODES self.distanceTable = [[@ for i in range(num)] for j in range(num) ] self. routes = [0 for i in range(num) ] # you implement the rest of constructor def recvupdate(self, pkt): self.distanceTable[pkt. sourceid] = pkt.mincosts # you implement the rest of it return def printdt(self): print(" D"+str(self.myID)+" | ", end_"my for i in range(self.ns. NUM NODES) : print("{:3d} ". format(i), end=") print() print(" ----|-", end="") for i in range(self.ns. NUM_NODES) : print(" ------", end-"my print() for i in range(self.ns. NUM_NODES) : print(" {}| ". format(i), end-"" ) for j in range(self.ns. NUM_NODES) : print("{:3d} ". format(self. distanceTable[i][j]), end="> > print() print()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
