移动

2019-03-05  本文已影响0人  ShawnCaffeine

The ONE所支持的移动模型movement,其实是以某种规则产生一系列连接建立或撤消的事件,其形式如下:

0.0 CONN 0 4 up
0.0 CONN 1 2 up
0.0 CONN 1 5 up
0.0 CONN 3 4 up
0.0 CONN 4 5 up
0.0 CONN 4 6 up
0.0 CONN 5 7 up
0.0 CONN 6 7 up
0.0 CONN 7 8 up

其中 第一列代表时间,第三列 和第四列代表节点,最后一列代表连接或是断开。
连接在不同时间的通断代表了节点的移动,静态拓扑就比较难以实现节点的更新,其中的prophet路由是通过connection状态的变化来进行节点的更新。代码为证:

public void changedConnection(Connection con) {//* Informs the router about change in connections state.
        
        super.changedConnection(con);
        
        if (con.isUp()) {
            DTNHost otherHost = con.getOtherNode(getHost());
            updateDeliveryPredFor(otherHost);
            updateTransitivePreds(otherHost);
        }
    }

正在考虑如何更改节点更新条件。

上一篇 下一篇

猜你喜欢

热点阅读