<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1574151594231430426</id><updated>2011-11-28T08:08:40.626+08:00</updated><category term='NS2'/><category term='Linux'/><category term='Paper'/><category term='C/C++'/><title type='text'>Welcome_Shagin45_World</title><subtitle type='html'>歡迎有興趣的朋友一起討論!大家一起成長喔^^</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-3472958019887550192</id><published>2009-08-17T18:10:00.002+08:00</published><updated>2009-08-17T18:24:14.965+08:00</updated><title type='text'>在JBuilder 2008下設定args[]內之值的步驟</title><summary type='text'>第一次用JBuilder 2008設定args[]內的數值，呼~花了好一段時間 囧，感謝Mark的指導阿！廢話不多說~以下為其步驟：Step 1.點選"Run" --&gt; "Run Configurations..." (不同版本的JBuilder可能會不同的選項，像Mark的就是"Run" --&gt; "Run Dialog")Step 2.在Run Configurations視窗下，選擇左半邊"Java Application樹狀圖"中欲執行的主程式。Step 3.選定好主程式後，選擇右半邊的"Arguments頁籤"，就可以在"Program arguments"中輸入欲設定的值！(每個元素以空白做為間格~)End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/3472958019887550192/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=3472958019887550192' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3472958019887550192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3472958019887550192'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2009/08/jbuilder-2008args.html' title='在JBuilder 2008下設定args[]內之值的步驟'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8747761083751428978</id><published>2009-07-04T22:18:00.005+08:00</published><updated>2009-07-04T23:25:40.583+08:00</updated><title type='text'>Google Blogger Counter</title><summary type='text'>若想在Google Blogger中加入Counter,可以參考此位網友的網誌,裡面有詳細的講解喔! 網誌連結:http://www.wretch.cc/blog/joshua7532/8428219 ,另外申請Counter的網站在此: http://www.histats.com/p.s. Google Blogger是有支援Jave srcipt的喔^^,呼呼~好久沒有寫網誌嚕(在報效國家咩!剩一個月就退伍嚕~YA)</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8747761083751428978/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8747761083751428978' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8747761083751428978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8747761083751428978'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2009/07/google-blogger-counter.html' title='Google Blogger Counter'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8060438687455663183</id><published>2008-08-21T15:50:00.005+08:00</published><updated>2008-08-21T17:01:06.078+08:00</updated><title type='text'>JAVA --- Statement與PreparedStatement的差別</title><summary type='text'>首先先分別展示Statement與PrepareStatement兩者用法上的差異.Statement:...String strsql = "insert into mytable(Name, Birthday) values("SHAGIN45","1984/06/07")";Statement mysta = new Statement();mysta.executeUpdate(strsql);...PreparedStatement:...String strsql = "insert into mytable(Name, Birthday) values(?,?)";PreparedStatement mysta = new PrepareStatement();mysta.setString(1,"SHAGIN45");mysta.setString(2,"1984/06/</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8060438687455663183/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8060438687455663183' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8060438687455663183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8060438687455663183'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/08/java-statementpreparedstatement.html' title='JAVA --- Statement與PreparedStatement的差別'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-6961555138076641034</id><published>2008-08-12T09:51:00.008+08:00</published><updated>2008-08-14T13:39:51.527+08:00</updated><title type='text'>JAVA --- 連接DataBase</title><summary type='text'>我這次使用MySQL來建立我的DB,在設定好DB的table以及其內容後,接下來就是要讓自己的程式與其相連接嚕~.在JDBC連結DB的時候有幾個動作要做:註冊驅動程式---&gt;建立連線---&gt;產生Statement---&gt;利用Statement執行sql要求---&gt;得到結果.Step1. 首先就是註冊MySQL的Driver. 你必須先去MySQL的官網下載其驅動程式 http://dev.mysql.com/downloads/connector/j/5.0.html ,下載下來後解壓縮,並且把解壓縮後的資料夾內,一個名為 "mysql-connector-java-[version]-bin.jar" 的檔案複製到C:\Program Files\Java\jre[version]\lib\ext 內 (要注意一下自己的jre版本,java下可能會有不同版本的jre,要把</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/6961555138076641034/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=6961555138076641034' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6961555138076641034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6961555138076641034'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/08/java-db.html' title='JAVA --- 連接DataBase'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-285388579397675786</id><published>2008-08-10T14:55:00.002+08:00</published><updated>2008-08-10T15:12:54.758+08:00</updated><title type='text'>My SQL---Error message 1366</title><summary type='text'>今天試用MySQL來建立資料庫.安裝好後建立了一個測試資料庫,但是要新增資料的時候卻失敗了,顯示Error message-1366,我上網找了一下有沒有解決的辦法,發現原來是default-character-set設定的問題,在安裝好MySQL後,系統會預設使用default-character-set=latin1,所以當你的資料有中文,日文,韓文...等等語言時,它會無法encode~因此以下為解決此錯誤的方法:Step1. 先停止MySQL的service. (可以去官網下載其所提供的tools,這些tools可以提供GUI對DB進行管理或監測).Step2. 找出MySQL安裝目錄下的一個檔案,名為"my.ini".Step3. 開啟此檔,並且在[mysqld]下加入default-character-set=GBK,並把本來的efault-character-set=</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/285388579397675786/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=285388579397675786' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/285388579397675786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/285388579397675786'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/08/my-sql-error-message-1366.html' title='My SQL---Error message 1366'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-619842320125871358</id><published>2008-07-30T10:22:00.005+08:00</published><updated>2010-06-17T22:14:26.229+08:00</updated><title type='text'>JAVA Swing---讓Frame顯示於螢幕中央</title><summary type='text'>要讓Frame顯示於螢幕中央有兩種方式:Case1.import java.awt.*;JFrame f = new JFrame();Dimension dim = Toolkit().getDefaultToolkit().getScreenSize();f.setLocation(dim.width/2-f.getWidth()/2, dim.height/2-f.getHeight()/2);Case2.import java.awt.*;JFrame f = new JFrame();f.setLocationRelativeTo(null);reference: http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Window.html#setLocationRelativeTo%28java.awt.Component%29</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/619842320125871358/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=619842320125871358' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/619842320125871358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/619842320125871358'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/07/java-swing-frame.html' title='JAVA Swing---讓Frame顯示於螢幕中央'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8784056199669162954</id><published>2008-06-23T22:52:00.002+08:00</published><updated>2008-06-23T23:52:13.177+08:00</updated><title type='text'>NS2---Segment fault</title><summary type='text'>呼...好一陣子沒寫Blog了,這陣子都在忙著跑模擬.之前在跑模擬,會不時的發生Segment fault這種錯誤,後來利用gdb或是valgrind來debug,會發現程式都停在我們沒有動到的地方,例如: getcid, getBasic...等等地方.這時不要慌張!!(但是我們被這種問題困擾了好久 囧),若是利用gdb來debug的人,當程式遇到錯誤停下後,可以下"bt"的指令,來找出是誰呼叫到這個function,使其產生錯誤~~;在從發生錯誤的地方往回追朔後,會發現原來是tcl的timer沒設好!!多次的segment fault中發現,要是你拓普點多的時候,使用NIST預設的timer對於node來說是不夠用的,我們推測由於timer會倒數,當點變多的時候,某個node的timer倒數結束前BS沒能即時去抓相對應的資料,後來node的timer倒數結束後,BS才去抓資料,</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8784056199669162954/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8784056199669162954' title='5 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8784056199669162954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8784056199669162954'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/ns2-segment-fault.html' title='NS2---Segment fault'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-2260185204051280631</id><published>2008-06-15T23:10:00.002+08:00</published><updated>2008-06-15T23:32:40.010+08:00</updated><title type='text'>建立scripts</title><summary type='text'>在跑模擬的時候,有時都要重覆一些執行過的指令~每次都在輸入許多相同的指令,令人覺得既浪費時間又麻煩~這時最好的方法就是建立一個scripts. 以下就直接用範例說明唄!!假如每次都重複執行:mkdir testrm shagin45/BS.logns hnss &gt; l那就可以把上面這些指令建成一個scripts,步驟如下:Step 1.          建立任一文字檔. "vim shagin45"Step 2.          將上述的指令鍵入剛剛所建立的文字檔中,輸入後存檔離開.Step 3.          改變剛剛的文字檔mod. "chmod 755 shagin45"Step 4.          以後只要執行shagin45,就會執行其內所寫的指令 "./shagin45"End~~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/2260185204051280631/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=2260185204051280631' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/2260185204051280631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/2260185204051280631'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/scripts.html' title='建立scripts'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-3420365737776245860</id><published>2008-06-11T00:43:00.003+08:00</published><updated>2008-06-11T12:32:38.677+08:00</updated><title type='text'>NS2---Scheduler: Event UID not valid!</title><summary type='text'>由於在我的論文中會要設計SS滿足某種條件後,啟動send_scan_request(),但是若直接指定SS啟動scanning的動作,那就有非常大的可能產生: "Scheduler: Event UID not valid!",後來上網查了一下,發現是因為有一個timer物件,還沒有被expire,而我又再一次呼叫它的start function!!知道原因後,我查看看send_scan_request()中有沒有產生新的timer,發現到原來它會產生一個新的t44timer (也就是因為這原因所以發生錯誤), 因此我再自行啟動send_scan_request()前多加了if判斷:if (t44timer_ &amp;&amp; t44timer_-&gt;busy()!=0)t44timer_-&gt;stop();如此一來就可以解決問題了~^^bEnd~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/3420365737776245860/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=3420365737776245860' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3420365737776245860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3420365737776245860'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/ns2-scheduler-event-uid-not-valid.html' title='NS2---Scheduler: Event UID not valid!'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-6451750968985532066</id><published>2008-06-09T19:30:00.003+08:00</published><updated>2008-06-09T19:51:35.318+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>即時增加swap</title><summary type='text'>由於NS2在跑模擬時,總是會遇到一些難以理解的錯誤...所以黃老師幫我們跟江清泉老師約在今天碰個面,希望他能為我們解開疑惑或是給個方向,在一個小時多的討論中,雖然沒有得到真正很明確的解決辦法~但是總算知道問題大概出在哪邊,目前最有可能發生錯誤的原因,是Memory被我們衝爆了(囧),所以江老師提供我們一個方法讓風哥可以即時的增加swap,以下為即時增加swap的方法:Step1. dd if=/dev/zero of=/tmp/swap bs=1G count=20 (本來才2G的swap,打算多增加20G的swap)Step2. mkswap /tmp/swapStep3. swapon /tmp/swapStep4. 若要在下次開機時能自動執行,則須在/etc/fstab加入下面那一行:             /tmp/swap   swap   swap   defaults</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/6451750968985532066/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=6451750968985532066' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6451750968985532066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6451750968985532066'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/swap.html' title='即時增加swap'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5408092285836066160</id><published>2008-06-06T22:41:00.003+08:00</published><updated>2008-06-06T22:53:45.332+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>NS2---BS佈建數量限制</title><summary type='text'>當我在寫Tcl的時候,每次最多就只能佈建5個BS,但是我最多要佈建14個BS (囧a), 後來我用gdb來debug,發現每次在建到第六個BS時, 其MAC在 getPhy ()-&gt;setFrequency (tmp);的時候都會出錯, 後來我用display看了一下tmp~沒想到居然等於零~~~~,突然想到學長之前mac802_16.cc有一些修改的地方,我就開來比對一下,發現原本NIST預設static const int nbFreq = 5; 學長把它增加到static const int nbFreq = 45; 當然相對的學長也把frequencies的數量增加:static const double frequencies[] = {3.367e+9,3.374e+9,3.381e+9,3.388e+9,3.395e+9,3.402e+9,3.409e+9,3.416e+</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5408092285836066160/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5408092285836066160' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5408092285836066160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5408092285836066160'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/ns2-bs.html' title='NS2---BS佈建數量限制'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5063890396930249483</id><published>2008-06-04T16:50:00.004+08:00</published><updated>2008-06-07T11:09:20.389+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>NS2---Debug tool</title><summary type='text'>在撰寫NS2的過程中,compiler一定會遇到大大小小的錯誤,最令我厭惡的不外乎就是Segmentation fault (core dumped) 與 Floating point exceptionns, 特別是Segmentation fault 這種錯誤,要是不用tool根本很難找出它錯誤的地方. 為了解決這種錯誤, 就要請 "Valgrind" 出馬嚕(之前有試過gdb但是他回報的錯誤訊息太模糊了囧a,有時根本找不出錯誤真正的地方) !! 但是有個缺點~就是利用Valgrind來debug時會很花時間, 事事無完美嚕~只要找得出bug,就是好tool!!Debug 指令: valgrind --tool=memcheck --leak-check=full --db-attach=yes ns ***.tcl &gt; *** (valgrind 還有其他的option</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5063890396930249483/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5063890396930249483' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5063890396930249483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5063890396930249483'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/06/ns2-debug-tool.html' title='NS2---Debug tool'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-874774666311825029</id><published>2008-05-31T14:59:00.003+08:00</published><updated>2008-06-04T16:50:08.664+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>Random walk model</title><summary type='text'>我的論文中使用Random walk model, 在參照其官網的步驟編譯時,會產生幾個錯誤,其中有一個錯誤是必須把statistics.cc中,第66行的grid = new (int*) [x_]; 改為grid = new int* [x_]; 其餘的錯誤比較容易理解我就不在此贅述.Random walk model 官網:http://www.cs.rice.edu/~santa/research/mobility/End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/874774666311825029/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=874774666311825029' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/874774666311825029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/874774666311825029'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/random-walk-model.html' title='Random walk model'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8631350153273764042</id><published>2008-05-31T14:46:00.001+08:00</published><updated>2008-06-07T11:09:07.866+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>啟動vsftp指令</title><summary type='text'>在Terminal下: "/etc/init.d/vsftpd start" 即可.referencr: "http://linux.vbird.org/linux_server/0410vsftpd.php"End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8631350153273764042/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8631350153273764042' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8631350153273764042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8631350153273764042'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/vsftp.html' title='啟動vsftp指令'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1583475650660854037</id><published>2008-05-31T10:41:00.004+08:00</published><updated>2008-06-07T11:09:40.253+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>模擬時產生的錯誤---Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl)</title><summary type='text'>今天在試跑模擬時,產生了一個error message :--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---_o49: no target for slot 4294967295_o49 type: Classifier/Portcontent dump:---------- Finished standard no-slot{} default handler ----------後來我上網查了一下,看到有人也有類似的問題,所幸友網友知道錯誤發生的原因 "http://www.nabble.com/problem:-Classfier::no-slot{}-default-handler-(tcl-lib-ns-lib.tcl)-to5616757.html" ,我看過後再重新檢查我自己的Tcl,</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1583475650660854037/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1583475650660854037' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1583475650660854037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1583475650660854037'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/classfierno-slot-default-handler.html' title='模擬時產生的錯誤---Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-6155120757861364645</id><published>2008-05-29T20:16:00.003+08:00</published><updated>2008-05-29T20:39:13.661+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>透過封包CID取得SS</title><summary type='text'>void xxx(Packet *p){hdr_mac802_16 *wimaxHdr_req = HDR_MAC802_16(req);gen_mac_header_t header_req = wimaxHdr_req-&gt;header;....PeerNode *peer;peer = mac_-&gt;getCManager()-&gt;get_connection (header_req.cid, false)-&gt;getPeerNode(); //透過CID取出此CID的peer objectint index_ = peer-&gt;getPeerNode(); //取出peer object的index (mac)}</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/6155120757861364645/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=6155120757861364645' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6155120757861364645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6155120757861364645'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/cidss.html' title='透過封包CID取得SS'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4466018615948933063</id><published>2008-05-19T15:31:00.004+08:00</published><updated>2008-06-07T11:09:55.666+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>vim自動顯示行號與對齊</title><summary type='text'>在Linux中最普遍的文字編輯器就是vim,依下列的步驟就可讓vim會自動顯示行號,或是撰寫文件時每行會自動對齊. 步驟如下:Step 1.在家目錄產生.vimrc檔.Step 2.撰寫.vimrc內容為:set nu (自動顯示行號)set autoindent (自動對齊)set smartindent (智能對齊)set incsearch (逐步查詢)Step 3.存檔離開.之後每次使用vim,家目錄下的.vimrc就會被讀取.End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4466018615948933063/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4466018615948933063' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4466018615948933063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4466018615948933063'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/vim.html' title='vim自動顯示行號與對齊'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4562711350967795959</id><published>2008-05-15T18:17:00.004+08:00</published><updated>2008-06-07T11:10:18.148+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>ㄧ個Terminal開啟多個分頁</title><summary type='text'>在ㄧ般來說,要是針對不同資料夾或是檔案夾,同時進行修改或比對等動作,有可能會要同時開啟多個Terminal來work,但是現在只需開啟一個Terminal,並且下"screen",就可以在同一個Terminal下開啟多個分頁,就不用東開一個新的Terminal,西開一個Terminal了. 在啟動screen前先記得在家目錄產生一個名為".screenrc"的檔案,內容為:caption always "%{= wk} %{= KY} [%n]%t @ %H %{-} %= %{= KR} %l %{-} %{= KG} %Y-%m-%d %{-} "hardstatus alwayslastline " %-Lw%{= Bw}%n%f %t%{-}%+Lw %= %0c:%s "bindkey ^[z prevbindkey ^[x next.以下為啟動screen後的一些基本指令 (</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4562711350967795959/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4562711350967795959' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4562711350967795959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4562711350967795959'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/terminal.html' title='ㄧ個Terminal開啟多個分頁'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1626304987042498894</id><published>2008-05-14T16:21:00.004+08:00</published><updated>2008-05-14T16:33:40.110+08:00</updated><title type='text'>C#---數字轉國字</title><summary type='text'>由於在仁耀的系統中,需要將阿拉伯數字轉成國字的大寫,因此研究了一下這種功能,後來在網路上發現有高手寫好類似的程式碼 (嘿嘿~當然不客氣的拿來使用嚕,在此謝謝Q_282898034大大的開發嚕^^),以下為Q_282898034大所開發的程式:using System;using System.Collections.Generic;static class RMB{    private static readonly string DigitText = "零壹貳參肆伍陸柒捌玖";    private static readonly string PositionText = "圓拾佰仟萬億兆京垓秭穰";    private static readonly string OtherText = "分角整負";    private static void </summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1626304987042498894/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1626304987042498894' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1626304987042498894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1626304987042498894'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/c.html' title='C#---數字轉國字'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8251795003450289360</id><published>2008-05-06T22:52:00.002+08:00</published><updated>2008-05-06T23:02:55.428+08:00</updated><title type='text'>nam 編譯出錯</title><summary type='text'>柏鋒發現修正nam編譯錯誤的方法!!由於風哥是用的是64 bit的OS, 所以在nam一開始編譯時會發生錯誤,如下所示:netmodel.cc: In member function ‘int NetModel::addr2id(int) const’:netmodel.cc:311: error: cast from ‘void*’ to ‘int’ loses precisionnetmodel.cc: In member function ‘int NetModel::lookupObjname(const char*)’:netmodel.cc:2764: error: cast from ‘void*’ to ‘int’ loses precision解決辦法:把return (int)Tcl_GetHashValue(he);改為return (long)</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8251795003450289360/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8251795003450289360' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8251795003450289360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8251795003450289360'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/nam.html' title='nam 編譯出錯'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1801116077889134151</id><published>2008-05-01T14:11:00.003+08:00</published><updated>2008-05-01T14:19:20.058+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>tar壓縮解壓縮指令</title><summary type='text'>壓縮檔案:tar -czvf 壓縮封裝檔名稱.tar.gz 資料夾名稱--- 將 「資料夾名稱」 壓縮成為 「壓縮封裝檔名稱.tar.gz」壓縮檔.tar -cjvf 壓縮封裝檔名稱.tar.bz2 資料夾名稱--- 將 「資料夾名稱」 壓縮成為 「壓縮封裝檔名稱.tar.bz2」壓縮檔.解壓縮檔案:tar -xzvf 欲解壓縮的檔名.tar.gz--- 解開 「檔名.tar.gz」壓縮封裝檔.tar -xjvf 欲解壓縮的檔名.tar.bz2--- 解開 「檔名.tar.bz2」壓縮封裝檔.各參數所代表的意思:-c  ：建立一個壓縮檔案的參數指令(create 的意思)；-x  ：解開一個壓縮檔案的參數指令！-t  ：查看 tarfile 裡面的檔案！      特別注意，在參數的下達中， c/x/t 僅能存在一個！不可同時存在！      因為不可能同時壓縮與解壓縮。-z  ：</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1801116077889134151/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1801116077889134151' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1801116077889134151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1801116077889134151'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/tar.html' title='tar壓縮解壓縮指令'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-3984791010850879665</id><published>2008-05-01T13:55:00.002+08:00</published><updated>2008-05-26T12:42:38.212+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>sftp 連線指令</title><summary type='text'>若要利用sftp連至ip為XXX.XXX.XXX.XXX時,且對方的port設為YYYY. 則此時在terminal所下的指令為 "sftp -o PORT=YYYY 自己的帳號名稱@XXX.XXX.XXX.XXX" 即可.以下為比較常用的指令:1. 結束 SFTP: exit/quit2. 變換遠方端伺服器的目錄: cd.3. 更改檔案或目錄的權限: chmod.4. 刪除檔案: del.5. 刪除檔案: rm.6. 列出遠方端伺服器目錄下的檔案名稱: dir/ls.7. 下載檔案: get.8. 上傳檔案: put.9. 新增一個遠方端伺服器的目錄: mkdir.10. 刪除遠方端伺服器的目錄: rmdir.</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/3984791010850879665/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=3984791010850879665' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3984791010850879665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3984791010850879665'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/05/sftp.html' title='sftp 連線指令'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1860373631931944749</id><published>2008-04-17T15:17:00.003+08:00</published><updated>2008-04-17T15:26:57.926+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Error message: jump to case label</title><summary type='text'>因為有修改NS2其本來的code,在compile時,跳出"jump to case label"的錯誤訊息,後來在網路上看到解決的方法,原來是使用switch/case的時候,若是case內部有宣告區域變數,則必須用大括號將case內的code刮起來,如下範例:未使用區域變數:switch (S){case 'A':...break;case 'B':...break;default:...break;}若有使用區域變數:switch (S){case 'A':{int counter;...break;}case 'B':...break;default:...break;}編譯器: gccEnd~~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1860373631931944749/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1860373631931944749' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1860373631931944749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1860373631931944749'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/error-message-jump-to-case-label.html' title='Error message: jump to case label'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4793980080781711213</id><published>2008-04-12T21:32:00.002+08:00</published><updated>2008-04-12T21:38:15.375+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Error message: multiple types in one declaration</title><summary type='text'>今天在增加NS2-mac802_16pkt.h的struct時,在編譯的時候發生了問題"multiple types in one declaration",一開始我還以為是根本來的NS2裡面內部所宣告的變數衝到,花了一下時間才發現...原來是自己所加的struct最後的大括號沒加到一個分號～～囧, 應該要這樣：struct XXX {...}; 以後一定要記得加分號阿阿阿阿阿阿阿～～～</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4793980080781711213/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4793980080781711213' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4793980080781711213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4793980080781711213'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/error-message-multiple-types-in-one.html' title='Error message: multiple types in one declaration'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8360677031531590664</id><published>2008-04-10T21:09:00.003+08:00</published><updated>2008-04-10T21:37:33.581+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler12---process_bsho_rsp()</title><summary type='text'>當SS收到BS傳來的handoff respond後,會利用此memeber function執行相對應的程序,以下將會敘述member function的流程---Step1. 首先會取出n_rec[].neighbor_bsid的值,並且與SS目前連線的BS做比對,要是相同則不執行後續動作;若是不同,就會把target BS的資訊取出來存至scan_info_的nbr內,Step2. 再來就產生mac802_16_mob_ho_ind_frame frame,把frame的type設為MAC_MOB_HO_IND,以及設定一些參數,再將target_bsid設定為targetBS,在來就把packet enqueue.Step3. 最後就設定scan_info_的handoff_timeout與substate(設為HANDOVER_PENDING).End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8360677031531590664/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8360677031531590664' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8360677031531590664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8360677031531590664'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler12-processbshorsp.html' title='SS的Scheduler12---process_bsho_rsp()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-6202840428320069954</id><published>2008-04-10T15:42:00.002+08:00</published><updated>2008-04-10T21:37:33.581+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的Scheduler7---process_msho_req(Packet *req)</title><summary type='text'>當BS收到SS所送來的packet時,將會執行此member function,以下將敘述此function流程---Step1. 依序將req frame中的bs_full內的bs_rssi_mean相互比較,後可得到最大rssi的BS index.取得最大rssi的BS後,BS會執行send_nbr_adv().Step2. 產生mac802_16_mob_bsho_rsp_frame frame,並且設定其相對應的參數,把frame type設為MAC_MOB_BSHO_RSP,並且把target BS的id存進n_rec[].neighbor_bsid.後續在設定一些數值後,就把packet enqueue.End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/6202840428320069954/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=6202840428320069954' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6202840428320069954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6202840428320069954'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler7-processmshoreqpacket-req.html' title='BS的Scheduler7---process_msho_req(Packet *req)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8857567860142077970</id><published>2008-04-10T10:26:00.005+08:00</published><updated>2008-04-10T21:37:33.582+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler11---send_msho_req ()</title><summary type='text'>根據文件上的敘述,當SS收到MOB_SCN_RSP後會跟其他neighbor BS進行Scanning並且接收其DL MAP, UL MAP, DCD, UCD(進行同步的動作),並且會送MOB_SCN_REP給BS(但是我找不到這段程式碼在哪),接著SS會送出MOB_MSHO_REQ給BS,以下將敘述SS的send_msho_req ()流程---Step1. 先取得peer node的head,在依序產生WimaxNeighborEntry,其內儲存neighbor的資訊.在判斷此node是否為發現過的neighbor,若是新的neighbor則nbrPref就加1. Step2.若是nbrPref不為0的話,那SS就必須產生出request用的packet.產生packet,並且透過packet建立起一個frame,初始frame,並且把frame的type設為</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8857567860142077970/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8857567860142077970' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8857567860142077970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8857567860142077970'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler11-sendmshoreq.html' title='SS的Scheduler11---send_msho_req ()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4060092424597220106</id><published>2008-04-09T21:32:00.006+08:00</published><updated>2008-04-12T00:34:16.832+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的Scheduler6---process_scan_request (Packet *req)</title><summary type='text'>當BS收到SS所發出的MAC_MOB_SCN_REQ packet時,會執行process_scan_request (p),但是此member function主要是在wimaxctrlagent.cc內(不知道為何要把它寫在別的file~),以下將會敘述此function的流程---Step1. 首先產生Scan_req物件entry,並且設定一些哩哩摳摳的參數,例如:delay, cid...等等.接著把scan_req的表頭加到list中.Step2. 利用switch/case來判斷目前的default_association_level_為何.level主要有分成三種: (1) Scan without association, (2) Association without coordination, (3) Association with coordination.若是</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4060092424597220106/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4060092424597220106' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4060092424597220106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4060092424597220106'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler7-processscanrequest-packet.html' title='BS的Scheduler6---process_scan_request (Packet *req)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-3732258477498052277</id><published>2008-04-07T15:38:00.006+08:00</published><updated>2008-04-12T10:17:55.815+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler10---process_ranging_rsp (mac802_16_rng_rsp_frame *frame)</title><summary type='text'>當SS從MAC收到packet後,檢查其type若是為MAC_RNG_RSP,就會執行這個member function,以下將會敘述此member function流程---Step1. 先判斷所收到的frame其所包含的SS address是否跟自己的address一樣,是的話就進行後續動作,不是的話就把frame drop掉.Step2. 判斷frame內的ranging status為何種型態,在code裡面有分四種型態: (1) RNG_SUCCESS, (2) RNG_ABORT, (3) RNG_CONTINUE以及(4) RNG_RERANGE這四種,但是在code中主要只有針對第一種進行相對應的procedure.Step3. 若是frame內的ranging status為RNG_SUCCESS,則把先前產生的request移除,並且判斷sub state是否為</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/3732258477498052277/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=3732258477498052277' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3732258477498052277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3732258477498052277'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler10-processrangingrsp.html' title='SS的Scheduler10---process_ranging_rsp (mac802_16_rng_rsp_frame *frame)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4196551895940902998</id><published>2008-04-07T07:21:00.003+08:00</published><updated>2008-04-10T21:37:33.583+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler9---send_scan_request ()</title><summary type='text'>當SS移動時發生需要handoff的時候,SS就必須執行此member function, 以下將敘述此function的流程---Step1. 首先會先判斷Mac的state是否為MAC802_16_CONNECTED,若是的話就往下進行後續動作.反之,則不進行後續動作.判斷是否有連線後,產生一packet,並且配給其n byte data buffer,再產生一mac802_16_mob_scn_req_frame的frame,並將frame的type設為MAC_MOB_SCN_REQ,後續設定其相關參數scan_duration, interleaving_interval......等等.Step2. 設定好frame後,產生一peer node,利用此peer node取得connection id,並且將packet enqueue,準備送出去.End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4196551895940902998/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4196551895940902998' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4196551895940902998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4196551895940902998'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler8-sendscanrequest.html' title='SS的Scheduler9---send_scan_request ()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-3421855974133527632</id><published>2008-04-06T13:22:00.003+08:00</published><updated>2008-04-10T21:43:06.129+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Paper'/><title type='text'>發現需修改處!!??</title><summary type='text'>恩...這陣子花了不少的時間在看BS &amp; SS之間是如何運作,會這麼做的原因是因為~我需要在new call剛起來的時候,"BS會執行HNSS幫其選擇出一個最佳的BS給SS",但是目前SS在啟動init_rang()後,BS收到其RANG_REQ會無條件的同意其connect,建立起BS與SS間最初的連線.由此看來,要是我想實現HNSS for new call,那我應該在BS收到RAND_REQ的時候,進行某種判斷來啟動HNSS的運作.不要像目前NIST所預設的一樣,讓任何SS都可以直接connect!!另外,HNSS要利用不同的criteria,因此有兩種想法來決定SS的target BS是誰:Case 1. HNSS在SS上執行.Case 2. HNSS在BS上執行.目前我是偏向Case 2., 但是Case 2的話~那某個BS必須先取得,其他幾個BS對於SS的傳輸相關參數,Ex.</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/3421855974133527632/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=3421855974133527632' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3421855974133527632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/3421855974133527632'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/blog-post.html' title='發現需修改處!!??'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-6490285852254197892</id><published>2008-04-06T10:25:00.004+08:00</published><updated>2008-04-11T12:37:17.514+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的Scheduler5---process_ranging_req (Packet *p)</title><summary type='text'>當BS收到packet其型態為MAC_RNG_REQ,則BS就會呼叫此member function.以下將敘述此member function流程---Step1. 判斷packet的header.cid是否為INITIAL_RANGING_CID,若是的話BS則會取出peer node (以SS的address作為參數),接著判斷peer node是否為null, 若是的話則利用CONN_BASIC與CONN_PRIMARY 建立出basic, upbasic, primary以及upprimary connection.Step2. 增加connection CID後,開始增加Peer node的information. 先利用SS的address新增一個peer node,再來分別使用connection basic, primary設定peer node的Basic </summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/6490285852254197892/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=6490285852254197892' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6490285852254197892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/6490285852254197892'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler5-processrangingreq-packet-p.html' title='BS的Scheduler5---process_ranging_req (Packet *p)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4105088408630698559</id><published>2008-04-06T00:32:00.007+08:00</published><updated>2008-04-11T10:55:17.006+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler8---init_ragning()</title><summary type='text'>當SS成功的收到UL MAP,並且正確的處裡它後,SS會執行init_ranging().以下將會敘述init_ranging()的流程---Step1. 產生ulsubframe &amp; dlsubframe,接著判斷substate是否為HANDOVER且判斷是否有收到DCD message, 若是符合條件則執行process_ranging_rsp().Step2. 若是沒有符合step1.的條件,則會依序取得UL的各pdu,並且經由pdu取得burst.再判斷burst的IUC, ExtendedIUC以及FastRangingMacAddr是否分別為UIUC_EXT_UIUC, UIUC_FAST_RANGING與mac_-&gt;addr(),若是的話,則會取出一packet,並且設其id為INITIAL_RANGING_CID (預設為BROADCAST_CID),並產生一</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4105088408630698559/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4105088408630698559' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4105088408630698559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4105088408630698559'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler8-initragning.html' title='SS的Scheduler8---init_ragning()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5697207465925294760</id><published>2008-04-05T20:56:00.002+08:00</published><updated>2008-04-10T21:39:02.052+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler7---process_ucd (mac802_16_dcd_frame *frame)</title><summary type='text'>process_ucd()的procedure與process_ucu類似,所以我在這邊就不詳述每個流程,就點出不一樣的地方就好.在SS剛收到UCD時,會判斷Mac的state是否為MAC802_16_WAIT_DL_SYNCH或MAC802_16_WAIT_DL_SYNCH_DCD,若是得話則會丟棄此封包.繼續等待DL MAP或DCD.若Mac的state是MAC802_16_UL_PARAM則會進行封包複製的動作(類似於process_dcd (mac802_16_dcd_frame *frame),可參考"Scheduler6"),並且將Mac的state設為MAC802_16_RANGING以及重新設定t12timer.End~~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5697207465925294760/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5697207465925294760' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5697207465925294760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5697207465925294760'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler7-processucd.html' title='SS的Scheduler7---process_ucd (mac802_16_dcd_frame *frame)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-127918594459548140</id><published>2008-04-05T20:41:00.003+08:00</published><updated>2008-04-10T21:39:02.053+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler6---process_dcd (mac802_16_dcd_frame *frame)</title><summary type='text'>此member function主要是處裡當SS收到DCD的時候,該進行何種相對應的程序,以下將敘述此member funciton的流程---Step1. 收到DCD後,首先會判斷Mac的state是否為MAC802_16_WAIT_DL_SYNCH,若是的話則不進行後續的動作,把封包丟棄.SS會繼續等DL MAP,等SS收到DL MAP後會將Mac state改為MAC802_16_WAIT_DL_SYNCH_DCD (可參照"SS的Scheduler5"),這樣後來收到DCD才會進行後續的動作.Step2. 若受到DCD的時候,Mac的state為MAC802_16_WAIT_DL_SYNCH_DCD,則會設定Start time,並且判斷sub state是否為SCANNING.若是的話,則會將所收到的frame複製一份存到mac802_16_dcd_frame中,以備給</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/127918594459548140/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=127918594459548140' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/127918594459548140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/127918594459548140'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler6-processdcd.html' title='SS的Scheduler6---process_dcd (mac802_16_dcd_frame *frame)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5683290612794004203</id><published>2008-04-05T17:45:00.004+08:00</published><updated>2008-04-10T21:39:02.053+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler5---process_dl_map (mac802_16_dl_map_frame *frame)</title><summary type='text'>當SS收到packet時,若是其型態為DL MAP則就會呼叫到此function,以下將敘述此funciton的流程---Step1. 當收到DL MAP後,SS則會先透過getPeerNode(frame-&gt;bsid)判斷是否為null,若是null則表示此BS是第一次接觸到,因此利用addPeerNode為此BS增加紀錄.Step2. SS會先判斷Mac目前的state,若是為MAC802_16_WAIT_DL_SYNCH,則會進行一連串timer的設定,接著將Mac目前的state設為MAC802_16_WAIT_DL_SYNCH_DCD,並且判斷substate是否為HANDOVER或SCANNING,接著再判斷一次substate是否為SCANNING,若是會再判斷nbr是否為null,或是nbr list內有沒有目前送packet來的BS id,若是的話則會將此BS id存至</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5683290612794004203/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5683290612794004203' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5683290612794004203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5683290612794004203'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler5-processdlmap.html' title='SS的Scheduler5---process_dl_map (mac802_16_dl_map_frame *frame)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8267016499948132998</id><published>2008-04-05T11:09:00.004+08:00</published><updated>2008-04-10T21:39:02.054+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler4---process (Packet *p)</title><summary type='text'>process (Packet *P)主要是針對從MAC所收到的封包,判斷此封包的種類後進行相對應的procedure,以下將敘述process(Packet *p)的流程---Step1. 將所收到的packet利用accessdata()存至mac802_16_dl_map_frame *frame,接著判斷此frame的type為何.Step2. 若是frame的type為MAC_DL_MAP,則會先設定Start time,然後執行process_dl_map (frame); 若type為MAC_DCD, 則執行process_dcd ((mac802_16_dcd_frame*)frame); 若type為MAC_UL_MAP, 則執行process_ul_map ((mac802_16_ul_map_frame*)frame); 若type為MAC_UCD, 則執行</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8267016499948132998/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8267016499948132998' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8267016499948132998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8267016499948132998'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler4-process-packet-p.html' title='SS的Scheduler4---process (Packet *p)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5296749384034733452</id><published>2008-04-05T09:27:00.004+08:00</published><updated>2008-04-10T21:39:02.054+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler3---start_ulsubframe()</title><summary type='text'>此篇文章將敘述start_ulsubframe() 的流程---Step1. 先將PHY的state變成OFDM_SEND.Step2. 取出目前的peer node head (意即取得BS), 再逐一取出Burst,然後判斷Burst的IUC是否為UIUC_INITIAL_RANGING或是UIUC_REQ_REGION_FULL,若是的話則利用Burst的cid取得此connection, 接著就會利用不同方式(by delay-intolerant messages, delay-tolerant messages, standard-based messages, data messages)取得connection,並且判斷conneciton是否為null, 若不是null則利用transfer_packets()算出duration.Step3. 處裡完每個Burst後,</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5296749384034733452/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5296749384034733452' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5296749384034733452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5296749384034733452'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler3-startulsubframe.html' title='SS的Scheduler3---start_ulsubframe()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-8590670339156166163</id><published>2008-04-04T23:16:00.005+08:00</published><updated>2008-05-03T20:07:47.629+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler2---start_dlsubframe()</title><summary type='text'>在此member function中主要是判斷scan_info_的substate為何,並且進行相對應的程序,以下將敘述start_dlsubframe()之流程---Step1. 先將frame number加一,接著判斷scan_info_為何.在此主要考慮兩種state: (1) SCAN_PENDING, (2) HANDOVER_PENDING, 若state為SCAN_PENDING(與process_scan_rsp()相互呼應,在process_scan_rep()中會將scan_info_-&gt;state設為SCAN_PENDING),則會再判斷state轉為scanning前,frame的數量,若為0 則會執行resume_scanning() ;若是state為HANDOVER_PENDING, 則會判斷在執行handoff之前frame的數量,若是為0則會將</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/8590670339156166163/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=8590670339156166163' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8590670339156166163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/8590670339156166163'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler2-startdlsubframe.html' title='SS的Scheduler2---start_dlsubframe()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-7755670072281831342</id><published>2008-04-04T22:52:00.002+08:00</published><updated>2008-04-10T21:39:02.055+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>SS的Scheduler1--init()</title><summary type='text'>現在開始將敘述ssscheduler.cc內一些比較重要的member funciton,首先是init()---Step1. 設定MacState為MAC802_16_WAIT_DL_SYNCH,並且設定PHY的mode為OFDM_RECV.Step2. 設定各種Timer. 設定的種類有T21 (time the station searches for DL-MAP on a channel), T1 (wait for DCD timeout), T12(wait for UCD descriptor), T2(wait for broadcast ranging timeout), lostDLMAPtimer (Timer for Lost DL-MAP interval), lostULMAPtimer (Timer for Lost UL-MAP interval).</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/7755670072281831342/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=7755670072281831342' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/7755670072281831342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/7755670072281831342'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/ssscheduler1-init.html' title='SS的Scheduler1--init()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4889628913057377498</id><published>2008-04-03T22:43:00.015+08:00</published><updated>2008-04-10T21:39:02.055+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的scheduler4-start_dlsubframe ()</title><summary type='text'>正所謂逃的了一時~~逃不了一世XDDD,終於到關鍵的地方了"DL Subframe".呼...這一段真是不好k,一些外部的member funciton呼叫來呼叫去的,雖然有搭配文件在看,但是有時真被搞的昏頭轉向 囧,好了...廢話不多說~進入主題吧!!以下為start_dlsubframe () 的流程---Step1. 先判斷哪些peer node很久沒有傳送packet,並與這些很久沒傳packet的peer node中斷連線.Step2. 計算出nbPS (一個Frame內總Phy slot的數量), nbPS_left (Remain slot = nbPS - 從receving轉成transmission state所花費的slot -從transmission轉成receving state所花費的slot) , nbSymbols (在nbPS_left中, </summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4889628913057377498/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4889628913057377498' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4889628913057377498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4889628913057377498'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler4-startdlsubframe.html' title='BS的scheduler4-start_dlsubframe ()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1229663012164800566</id><published>2008-04-03T22:24:00.002+08:00</published><updated>2008-04-10T21:39:02.056+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的scheduler3-start_ulsubframe ()</title><summary type='text'>在一個Frame中主要是由兩個Subframe所組合而成,分別為DL Subframe以及UL Subframe.此篇文章先敘述UL Subframe的流程吧~以下為NS2為利用start_ulsubframe ()產生UL Subframe的流程---Step1. 首先設定PHY layer的Mode (至於是哪些Mode我就不清楚了 :P).Step2. 啟動UL Subframe的handlerStep3. 為下一個Frame重新排程(主要是利用一個Frame的duration time來做排程).End~~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1229663012164800566/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1229663012164800566' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1229663012164800566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1229663012164800566'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler3-startulsubframe.html' title='BS的scheduler3-start_ulsubframe ()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1943854109334777765</id><published>2008-04-03T21:55:00.005+08:00</published><updated>2008-04-04T10:17:39.533+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的scheduler2-process (Packet *p)</title><summary type='text'>這篇文主要是敘述,當BS從MAC layer收到packet後會有何種反應.當BS從MAC收到packet後,會執行process (Packet *p),流程如下---Step1. 首先利用傳入的packet產生wimaxHdr. 取出object wimaHdr的header,放到gen_mac_header_t header內,再判斷此header是否為bw request,若是則執行prcess_bw_req(p) (以後有空在談吧 ^^).Step2. 取出傳入packet的accessdata. 將accessdata放入 mac802_16_dl_map_frame *frame.接著利用switch判斷此frame的type為何,若是為MAC_RNG_REQ, 則執行process_ranging_req (p); 若是為MAC_REG_REQ, 則執行</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1943854109334777765/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1943854109334777765' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1943854109334777765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1943854109334777765'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsscheduler-2.html' title='BS的scheduler2-process (Packet *p)'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-221309683333588622</id><published>2008-04-03T17:12:00.012+08:00</published><updated>2008-04-04T22:22:23.978+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>BS的scheduler1-init()</title><summary type='text'>這幾天想了解BS是如何形成frame,因此就去k了bssscheduler.cc 囧(呼...真難吃),在bsscheduler.cc中,我覺得它比較重要的有幾個部份: 1. init(), 2. process(Packet *p), 3. start_ulsubframe(), 4. star_dlsubframe(). 以下將敘述init()這個member function (若是有錯就麻煩糾正一下嚕^^)---Step1. 首先會利用Frameduration time / PS (number fo Phy Slot)的duration time來得到PS的數量.Step2. 產生用來broadcast的Profile,設定Interval Usage Code (IUC),以及設定Preamble的大小(單位為symbols).Step3. 產生Burst(0)來carry</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/221309683333588622/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=221309683333588622' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/221309683333588622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/221309683333588622'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/04/bsstart-new-frame-for-bownlink-subframe.html' title='BS的scheduler1-init()'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1544289177607734016</id><published>2008-03-30T00:12:00.004+08:00</published><updated>2008-03-30T00:49:24.021+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>NS2---Scanning procedure</title><summary type='text'>由於我的研究領域主要先從network selection著手,因此就必須先了解NS2中,SS與BS是如何進行scanning procedure來達到handoff的目的. 在NS2中scanning procedure分成幾個步驟:Step 1. SS會監測incoming packet其singal level,若是singal level超過某一threshold,MS則會傳送MOB_SCN_REQ給serving BS.Step 2. BS收到後會回傳MOB_SCN_RSP給SS,告知SS是否可進行scanning,若是可以則SS會開始進行scanningContinue......</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1544289177607734016/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1544289177607734016' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1544289177607734016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1544289177607734016'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/ns2-scanning-procedure.html' title='NS2---Scanning procedure'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-7672524103367288244</id><published>2008-03-29T10:25:00.012+08:00</published><updated>2008-06-09T23:23:16.904+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>C的內建function與macro</title><summary type='text'>由於NS2是由OTcl與C所架構出來的,在NS2底層的code大部分都是用C所完成.在我研究其.16底層的code時,有時都會看到一些C內建的function或macro,例如strcmp(),assert()...等等,以下我將簡述這些function與macro的基本功能:1. int strcmp(string s, string t)---功用: 字串之間的比較.此function主要是判斷s與t之間的大小,若是s = t則傳回整數0;若s大於t則傳回任一正數;若s小於t則傳回任意負數.2. assert(condition)---功用: 防止程式因某些condition而出現嚴重錯誤. assert()主要是判斷condition是否滿足開發者所設定的要求,若是滿足則可繼續執行後續的程式,反之,終止整個程序.另外ASSERT()與assert()兩者主要差別是前者只在Debug</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/7672524103367288244/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=7672524103367288244' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/7672524103367288244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/7672524103367288244'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/cfunctionmacro.html' title='C的內建function與macro'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-348122256570965233</id><published>2008-03-27T10:07:00.002+08:00</published><updated>2008-03-29T21:11:51.804+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>.Net農民曆改版V2.0</title><summary type='text'>前篇文章所提到的國曆轉農曆小程式,後來經測試發現有Bug，沒有做到檢查閏月的程序，因此有時候會造成１３月，或是某些月份與正常的月份多一個月，因此就進行些許的修改，以下為完整程式碼 (此程式在線上跑時還是有做些許修改,但是此程式的轉換功能算是已經完整)：using System;using System.Collections.Generic;using System.Text;using System.Globalization;namespace TimeTran{   class Program    {        static int Main(string[] args)        {           string s = "91 / 2 / 9";            int L_ly,ly,lm,y,ny,nm=0,iToken1,iToken2;</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/348122256570965233/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=348122256570965233' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/348122256570965233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/348122256570965233'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/netv20.html' title='.Net農民曆改版V2.0'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-992572107103369152</id><published>2008-03-22T11:29:00.004+08:00</published><updated>2008-03-29T21:11:51.805+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>.Net之農民曆轉換</title><summary type='text'>由於在仁耀的系統中需要做到陽曆轉陰曆的功能,所以嘗試用.Net所開發的System.Globalizatoin (namespace) -- http://msdn2.microsoft.com/zh-tw/library/system.globalization(VS.80).aspx 來達到此目的.因為需要用到台灣陽曆轉陰曆的功能,因此我使用了TaiwanLunisolarCalendar 類別 -- http://msdn2.microsoft.com/zh-tw/library/system.globalization.taiwanlunisolarcalendar(VS.80).aspx ,此類別是專門針對台灣的曆法所發展出來的類別,透過其已開發好的method便可將所輸入的陰曆轉換成農曆!!以下為我所寫的C#範例:using System;using </summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/992572107103369152/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=992572107103369152' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/992572107103369152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/992572107103369152'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/net.html' title='.Net之農民曆轉換'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-2092561361556059645</id><published>2008-03-13T11:37:00.002+08:00</published><updated>2008-03-29T21:11:51.805+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>[C++]的argc &amp; argv</title><summary type='text'>在coding的時候,有時main會需要傳入參數,而寫成 int main(int argc, char *argv[]),那argc與argv又分別代表什麼意思呢??以下將用例子說明讓大家快速的了解這兩個變數的用處!!Ex.若是你寫好一隻程式叫Hell.cc並且已經將其編譯成Hello.exe,當你在Terminal要執行Hello.exe的時候,你則又可能執行以下的command:$Hello.exe hello all那這時你的argc則為3,argv[0]=Hello.exe,argv[1]=hello,argv[2]=all.由此看來,argc則為你在command line所下的參數個數,argv[]則分別存放你所下的每個參數.End~~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/2092561361556059645/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=2092561361556059645' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/2092561361556059645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/2092561361556059645'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/cargc-argv.html' title='[C++]的argc &amp; argv'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1578500091306917829</id><published>2008-03-10T19:57:00.008+08:00</published><updated>2008-03-29T21:11:51.806+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>設定BS的覆蓋範圍</title><summary type='text'>由於我的論文主要是考慮two-tier架構,所以需要調整節點的接收threshold(RXThresh_),可偵測其他網路活動的範圍(CSThresh_)...等等參數.在/ns-2.29/tcl/lib/ns-default.tcl內有預設相對應數值:# Initialize the SharedMedia interface with parameters to make# it work like the 914MHz Lucent WaveLAN DSSS radio interfacePhy/WirelessPhy set CPThresh_ 10.0Phy/WirelessPhy set CSThresh_ 1.559e-11Phy/WirelessPhy set RXThresh_ 3.652e-10Phy/WirelessPhy set bandwidth_ 2e6Phy</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1578500091306917829/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1578500091306917829' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1578500091306917829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1578500091306917829'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/bs.html' title='設定BS的覆蓋範圍'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-5046035155786541537</id><published>2008-03-09T14:23:00.005+08:00</published><updated>2008-04-10T21:43:30.541+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Paper'/><title type='text'>Grey Prediction!!</title><summary type='text'>前幾天利用C#終於把Grey Prediction的第一階段寫完了~~在撰寫的這段期間內,遇到唯一較大的問題居然是反矩陣XDDDD,太久沒用數學忘記反矩陣怎麼求了(囧rz),問問同學拜拜google大神後,終於有點印象了...呼~為了避免日後又忘或是要再次用到,我今天就把例子寫在網誌上!!假設有Array A[2,2]Step1.計算det(A) = (A[0,0]*A[1,1]) - (A[0,1]*A[1,0])Step2.A反矩陣之[0,0]= 1/(-det(A)) * A[1,1]A反矩陣之[0,1]= 1/(-det(A)) * -A[0,1]A反矩陣之[1,0]= 1/(-det(A)) * -A[1,0]A反矩陣之[1,1]= 1/(-det(A)) * A[0,0]End~</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/5046035155786541537/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=5046035155786541537' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5046035155786541537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/5046035155786541537'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/03/grey-prediction.html' title='Grey Prediction!!'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1292058983662505503</id><published>2008-02-24T18:01:00.003+08:00</published><updated>2008-03-29T21:11:51.807+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>為NIST新增traffic type</title><summary type='text'>昨天晚上嘗試將長庚根據Std. IEEE 802.16e所開發的五種traffic type,加入NIST所release支援mobility的ns-2.29中,其加入步驟如下:Step 1.將長庚所開發的traffic type檔案複製到ns-2.29/tools內.Step 2.修改ns-allinone-2.29/ns-2.29/common/packet.h在enum packet_t {} 裡加PT_UGS,PT_rtPS,PT_ertPS,PT_nrtPS,PT_BE,在p_info() {} 裡加name_[PT_UGS]="UGS";name_[PT_rtPS]="rtPS";name_[PT_ertPS]="ertPS";name_[PT_nrtPS]="nrtPS";name_[PT_BE]="BE";Step 3.修改ns-allinone-2.29/ns-2.29</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1292058983662505503/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1292058983662505503' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1292058983662505503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1292058983662505503'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/02/nisttraffic-type.html' title='為NIST新增traffic type'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-4768823498773843869</id><published>2008-02-23T14:07:00.001+08:00</published><updated>2008-03-29T21:09:55.438+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>重新安裝gcc</title><summary type='text'>在上篇文章中提到對於NIST 其所release能支援mobility的ns-2.29,在編譯時所會遭遇的問題以及解決方法,但是整體來說大部分的問題是因為gcc版本的關係,所以這篇文章將描述如何安裝自己想要的gcc版本.#gcc -v (可得到目前所用的gcc版本)然後可以去ftp://ftp.ntu.edu.tw/pub/gnu/gnu/ (GCC在台灣的mirror)下載所想要的gcc版本.下載完後,分別載console執行下列指令:# tar -zxvf gcc-x.x.x.tar.gz# mkdir gcc-build# cd gcc-build# ../gcc-x.x.x/configure --prefix=/usr/local/gcc-x.x.x --enable-threads=posix --host=i386-redhat-linux --</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/4768823498773843869/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=4768823498773843869' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4768823498773843869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/4768823498773843869'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/02/gcc.html' title='重新安裝gcc'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-1856878273898309032</id><published>2008-02-22T21:41:00.001+08:00</published><updated>2008-03-29T21:11:51.807+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NS2'/><title type='text'>編譯NS2-NIST_mobility時遇到的問題與解決方法</title><summary type='text'>今天在安裝NIST所release支援mobility的ns-2.29版本http://www.antd.nist.gov/seamlessandsecure/download.html，在編譯時遇到以下幾個問題：問題1:./sctp/sctp.h:705: error: extra qualification 'SctpAgent::' on member 'DumpSendBuffer'make: *** [trace/trace.o] Error 1解決方法:將sctp.h裡面第705行DumpSendBuffer function前面的'SctpAgent::'去掉.問題2:./mobile/god.h:88: error：extra qualification ‘vector::’ on member ‘operator=’./mobile/god.h:93: error：</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/1856878273898309032/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=1856878273898309032' title='12 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1856878273898309032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/1856878273898309032'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/02/ns2-nistmobility.html' title='編譯NS2-NIST_mobility時遇到的問題與解決方法'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1574151594231430426.post-655199518774324149</id><published>2008-02-22T13:30:00.001+08:00</published><updated>2009-05-08T14:53:22.778+08:00</updated><title type='text'>開張大吉~^^</title><summary type='text'>大家好~這個網誌是我放有關於軟體方面的東東~包括linux, C++, C#, JAVA等等,一些平常會用到的指令或是程式編輯概念,我都會放到我自己的網誌上~~一方面讓我自己有時忘記某個指令或是程式設計的概念時~可以較快速的找到我想要的東西,另一方面可以跟大家分享分享心得^^,請大家多多指教嚕!!</summary><link rel='replies' type='application/atom+xml' href='http://shagin45.blogspot.com/feeds/655199518774324149/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1574151594231430426&amp;postID=655199518774324149' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/655199518774324149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1574151594231430426/posts/default/655199518774324149'/><link rel='alternate' type='text/html' href='http://shagin45.blogspot.com/2008/02/my-first-writing.html' title='開張大吉~^^'/><author><name>Vito</name><uri>http://www.blogger.com/profile/07545810405100906198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_veoTLBtj1l4/R-XkTmf54WI/AAAAAAAAAFg/TrVN0ipAiZg/S220/DSCF2583.JPG'/></author><thr:total>0</thr:total></entry></feed>
