ns-2 간단한 무선 네트워크 예제1
원본파일은 $NS_PATH/tcl/ex/simple-wireless.tcl 이다.
시나리오

애드혹 무선 네트워크에 두개의 노드가 멀리 떨어져 있다가 서로 가깝게 이동하다가 다시 멀어지면서 tcp sink에서 받아진 데이타 양을 체크한다.
n0의 초기x좌표: 5.0, 초기y좌표: 2.0
n1의 초기x좌표: 390.0, 초기y좌표: 385.0
10초에 n0이 20.0, 18.0으로 1.0의 속도로 이동
50초에 n1이 25.0, 20.0으로 15.0의 속도로 이동
10초에 FTP 전송 시작
전체 소스코드
추가된 프로시저
결과 그래프

분석
두개의 노드가 멀리 떨어져 있다가 서로 가깝게 이동하다가 75s 정도에 통신하기 시작해서 다시 멀어지면서 120s 정도에 통신이 끊기게 된다.
시나리오

애드혹 무선 네트워크에 두개의 노드가 멀리 떨어져 있다가 서로 가깝게 이동하다가 다시 멀어지면서 tcp sink에서 받아진 데이타 양을 체크한다.
n0의 초기x좌표: 5.0, 초기y좌표: 2.0
n1의 초기x좌표: 390.0, 초기y좌표: 385.0
10초에 n0이 20.0, 18.0으로 1.0의 속도로 이동
50초에 n1이 25.0, 20.0으로 15.0의 속도로 이동
10초에 FTP 전송 시작
전체 소스코드
추가된 프로시저
#매일초마다 tcp sink에서 받아진 데이타 양이 얼마인지 파일에 기록
proc record {} {
global tcp sink fd
#Get an instance of the simulator
set ns [Simulator instance]
#Set the time after which the procedure should be called again
set time 1
#How many bytes have been received by the traffic sinks?
set bw [$sink set bytes_]
#Get the current time
set now [$ns now]
#Calculate the bandwidth (in MBit/s) and write it to the files
puts $fd "$now $bw"
$sink set bytes_ 0
#Re-schedule the procedure
$ns at [expr $now+$time] "record"
}
proc record {} {
global tcp sink fd
#Get an instance of the simulator
set ns [Simulator instance]
#Set the time after which the procedure should be called again
set time 1
#How many bytes have been received by the traffic sinks?
set bw [$sink set bytes_]
#Get the current time
set now [$ns now]
#Calculate the bandwidth (in MBit/s) and write it to the files
puts $fd "$now $bw"
$sink set bytes_ 0
#Re-schedule the procedure
$ns at [expr $now+$time] "record"
}
결과 그래프

분석
두개의 노드가 멀리 떨어져 있다가 서로 가깝게 이동하다가 75s 정도에 통신하기 시작해서 다시 멀어지면서 120s 정도에 통신이 끊기게 된다.
http://www.joon.pe.kr/blog/trackback/34
http://xn--ij2bx6j77bo2kdi289c.zxc700.com - 블랙잭사이트
http://xn--on3b21eb4bmwh91q.zxc700.com - 바카라주소
http://xn--qn1bx5w2ifvrmbje.zxc700.com - 홀덤사이트
http://xn--299aj0wmjfoqh97o.zxc700.com - 맞고사이트
http://xn--ok0b65d1w4aujecqm.zxc700.com - 정선카지노후기
http://xn--o80bq1nhvkvsd7rhba.zxc700.com - 마카오카지노순위
http://xn--c79a67g3zy6dt4w.zxc700.com - 카지노검증사이트
http://xn--o80b67oh5az7z4wcn0j.zxc700.com - 모바일카지노
http://xn--oi2b43dh5aa317l40j.zxc700.com - 모바일바카라
http://xn--o80bz00bbzcu6f.zxc700.com - 카지노
http://xn--oi2b30ghxt.zxc700.com - 바카라
http://xn--o80b910a26eepc81il5g.zxc700.com - 카지노사이트
http://xn--oi2b30g3ueowi6mjktg.zxc700.com - 바카라사이트
http://xn--o80b27i69npibp5en0j.zxc700.com - 온라인카지노
http://xn--oi2ba146a24mbtbtvt.zxc700.com - 온라인바카라