[NS2] 修改程式碼之注意事項
- mac802_16SS.cc 中的timer有先後順序,如果相關timer設定錯誤的話,等到timer倒數結束後(expire),通常會呼叫 lost_synch()此函式,執行重新同步,通常是在換手時才會執行到。
- 當在修改 mac802_16BS.cc 、mac802_16RS.cc 或 mac802_16SS.cc 時,必須注意其他程式可能會利用 STA_BS 、STA_MN等去辨別MAC層為何種類型,因此在修改mac802_16RS.cc時,必須去修改其他程式的相關程式碼。
[NS2] base-station
In the wimax1.tcl script, the code is shown as following:
- $wl_node_($i) base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation
- [$bstation node-addr]: return the $bstation's IP address;
- [AddrParams addr2id [$bstation node-addr]]: return the ID;
- $wl_node_($i) base-station [...[...]] : set the base-station ID of the $wl_node_($i).
[NS2] pktRx_ and p
- pktRx_ : 當 sendUP() 收到 p 之後, 檢查 power 與 collision ,之後會將 p 丟給 pktRx_;接著會利用 rxtimer_ 去執行 mac_->receice() 處理此 pktRx_ 封包。
- p : 下層的封包往上層送,會呼叫 sendUP(p) 此函式,將此封包位址丟進此函式處理。
訂閱:
文章 (Atom)
