示例#1
0
文件: nodes.py 项目: matwitke/carsim
class IPv6RouterStack(object):
    def __init__(self, env):
        self.env = env
        self.phy = BasedPhyLayer("PHY")
        self.mac = BasedLayer("MAC")
        self.network = BasedLayer("NETWORK")
        self.app = BasedApplicationLayer()

    def initialize(self, pipeline):
        self.phy.set_upper_layer(self.mac)
        self.mac.set_upper_layer(self.network)
        self.network.set_upper_layer(self.app)
        self.phy.set_aether(pipeline)

    def handle_received_msg(self, msg):
        self.phy.handle_lower_msg(msg)
示例#2
0
文件: nodes.py 项目: matwitke/carsim
 def __init__(self, env):
     self.env = env
     self.phy = BasedPhyLayer("PHY")
     self.mac = BasedLayer("MAC")
     self.network = BasedLayer("NETWORK")
     self.app = BasedApplicationLayer()