[ns] How to access mac layer of each node

2006-11-27 Thread Daniel Dekst
Hi, all How to access mac layer of each node? If I create a command “attach-traceDebug” in mac-802_11.cc to transmit debug file name to it. How could I call this command in tcl script. Like “set ftp [new Application/FTP], $ftp attach-agent $tcp”, what should be the first

Re: [ns] Regarding linking c++ code in ns2

2006-11-29 Thread Daniel Dekst
You might need to find a tutorial to learn something basic. You can refer to Implementing a New Manet Unicast Routing Protocol in NS2 Francisco J. Ros Pedro M. Ruiz Or http://blog.chinaunix.net/u/10654/showart.php?id=52030 http://140.116.72.80/~smallko/ns2/ns2.htm (need to

Re: [ns] recall a procedure every time that a packet arrives

2006-11-29 Thread Daniel Dekst
You may can achieve your purpose by insert your own function in the recv() function Pei Message: 5 Date: Wed, 29 Nov 2006 17:41:49 +0100 From: [EMAIL PROTECTED] Subject: [ns] recall a procedure every time that a packet arrives To: ns-users Message-ID: Content-Type: text/plain;

Re: [ns] sleep a node

2006-11-29 Thread Daniel Dekst
I'm not Matthias, but it's seems that you haven't declared node_wakeup node_sleep in your mac/mac-tdma.h you can try it. Or make clean, make depend, make, maybe they are declared somewhere Pei Message: 3 Date: Wed, 29 Nov 2006 13:02:25 +0100 From: juan manuel gomez garcia Subject:

[ns] Who have once changed the rts_frame?

2006-11-30 Thread Daniel Dekst
Hi, all Who have once changed the rts_frame? I added a variable (double ldDistSum) into the struct rts_frame, then we cannot forward packet. The dh_ra, dh_ta seems erratic. where set the mh-dh_ra, mh-dh_ta of RTS. (mh = HDR_MAC802_11(pktRTS_)) I've debugged it for two days with

[ns] What's the relationship of Pt_ and Pt_consume_

2006-12-14 Thread Daniel Dekst
Hi, all What's the relationship of Pt_ and Pt_consume_? I know when a node receive a packet, it will calculate Pr according to Pt_, then decide whether successfully capture this packet. If I calculate txPower according to the distance between two nodes, and replace the Pt_ then the

Re: [ns] Energy analysis in NS-2

2006-12-21 Thread Daniel Dekst
Hi, I'm also confused at how to compare my method with another concerning energy consumption. Some use success ratio vs. time to illustrate the better performance on energy save. If you have any idea, pls tell me. Pei -- Message: 3 Date: Thu, 21 Dec 2006 09:38:47

Re: [ns] How to modify the packet content at intermediate nodes

2007-05-22 Thread Daniel Dekst
maybe you can extract the info from packet and encapsulate again try: struct msg_struct msg_name memcpy(msg_name, Pkt-accessdate(), sizeof(struct msg_struct)); [EMAIL PROTECTED] 写道: -- Message: 10 Date: 21 May 2007 14:23:49 - From: SB Subject: [ns] How to

Re: [ns] shutting down link or node with wireless topology

2007-06-27 Thread Daniel Dekst
I also want to know whether there is any simple way to shut down nodes. I use $ns_ node-config -IncomingErrProc UniformErr to assign nodes different link loss. But I have to add a kill-node command to shut down nodes. -- Message: 17 Date: Wed, 27

Re: [ns] shutting down link or node with wireless topology

2007-06-27 Thread Daniel Dekst
seems $node off works - 抢注雅虎免费邮箱3.5G容量,20M附件!

Re: [ns] Rx Threshold calculation when using Ricean fading model

2008-04-05 Thread Daniel Dekst
- 雅虎邮箱,您的终生邮箱!

[ns] how to include vector into ns

2008-04-15 Thread Daniel Dekst
Hi, I'm trying to use vectorstring stl in ns. I add #include string #include vector in the file. but it claims: Error: vector is undeclared However, if I use a single file to try the program. $g++ test.cpp -g -o test It works well. So why ns cannot

[ns] how to find where a variable is initialized

2008-10-03 Thread Daniel Dekst
Hi, everyone, How to find where a variable is initialized ? I add a new mac same as mac-802_11, but it puts warning MAC_RMAC: accessing MAC cache_ array out of range (src 0, dst 1, size 0)! I found out that it is due to cache_node_count_ = 0. It must be set somewhere in MAC/802_11, but I do not

Re: [ns] how to find where a variable is initialized

2008-10-04 Thread Daniel Dekst
all tcl files which will call a certain command? Best, Pei Mubashir Rehmani [EMAIL PROTECTED] wrote: Hi Daniel Dekst, You can find the variables here http://www-rp.lip6.fr/ns-doc/ns226-doc/html/functions.htm Regards Mubashir Husain Rehmani 2008/10/4 Daniel Dekst [EMAIL PROTECTED

Re: [ns] how to find where a variable is initialized

2008-10-06 Thread Daniel Dekst
Thanks a lot! reza mohammadi [EMAIL PROTECTED] wrote: hello you must set some variable in ns-default.tcl file for example set mac/802_11 bandwidth_ 1e6 ns-default.tcl is in ns-allinone-2.32/ns-2.32/tcl/lib good luck Mubashir Rehmani [EMAIL PROTECTED] wrote: Hi I think that you

Re: [ns] Trace file

2008-10-09 Thread Daniel Dekst
It is printed by sprintf(log_target_-pt_-buffer(),N -t %f -n %d -e %f, s.clock(), address_, energy_model_-energy()); in function MobileNode::log_energy() So maybe only the author knows the meaning of N, eNergy? Node? I think you can just regard it as a tag to identify energy

Re: [ns] How to access mac layer in c++ of ns2

2008-10-18 Thread Daniel Dekst
Hi, I have never done anything with TCP layer, so I'm not sure. But a general rule I summarized is that 1) If the two layers you want to cross-access are adjacent, you can use uptarget_/downtarget_ 2) If they are not, it is a bit of difficult to make the pointer clear. My

Re: [ns] Please help me to solve my issue in ns2

2008-10-18 Thread Daniel Dekst
Hi, I don't think you want to classify packets in mac layer. Instead, you want your packets to be submitted to aodv. Thus, in aodv.cc, you need to identify your packets in AODV::recv(Packet *p). In fact, as you know, all packets first arrive at such a recv function in any layer. So if

Re: [ns] Adding new MAC protocol in NS2

2009-04-19 Thread Daniel Dekst
Hi, Adding a new mac needs you to add it in the following files, referring to the Mac/802_11. tcl/lan/ns-mac-802_11.tcl tcl/lan/ns-mac.tcl tcl/lib/ns-mobilenode.tcl tcl/lib/ns-packet.tcl tcl/lib/ns-default.tcl Best, Pei