[ns] How to add Some information in Mobile Node
Hello , I got some mails by asking how to add some information in mobile nodes? so this is just an informational Post not a questionnaire . Let's take an example you want to add an information like Node_Status in every mobile node so first understand that for this there are some critical files where you have to make some changes let's take an example i wanna add an information Node_status in wireless node and i want to access this in the DSR routing protocol . let's you want to set and get that value critical files are mobilenode.cc .h /common folder god.cc .h /Mobile Folder dsragent.cc .h / dsr folder(Most Probabily ) so add int Node_Status ; // mobilenode.h inline void get_node_status() {return Node_Status ;} //mobile.h void set_Node_status(int status_id); //mobile.h //Mobile.cc void MobileNode::set_Node_status(int status_id) { Node_Status = status_id; } so up to here you have added information in every mobile node . here comes how to access . from DSRor AODV you can not just access the MobileNode.cc first you have to access through the God.cc .h int get_status(int node_id); //god.h void set_status(int node_id , int node_status); //god.h //god.cc int God::get_status(int node_id) { return mb_node[node_id]-get_node_status(); } void God::set_status(int node_id , int node_status) { mb_node[node_id]-set_Node_status(node_status); } at last you have setuped the God.cc .h now you are ready to call from protocol file (dsr , aodv) when you want to acess that access like that God::instance()-get_status(node_id); //any where in protocol file God::instance()-set_status(node_id , node_status); Note ::--- it may happen that i have written some words wrongs while writing please refer and understand the all above mentioned files . Regards Arun m...@arungupta.co.in -- View this message in context: http://network-simulator-ns-2.7690.n7.nabble.com/ns-How-to-add-Some-information-in-Mobile-Node-tp26348.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] awk script to calculate total frames sent ?
hi all, anybody have an awk script to calculate total frames sent.. --thanx With Regards, John Shiny.J
Re: [ns] awk script to calculate total frames sent ?
Hi, If you are interested in learning how tracing works in NS2, please read http://www.ns2ultimate.com/post/3995318343/post-processing-ns2-result-using-ns2-trace-main-post Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://WhatILearnFromReading.com http://www.ece.ubc.ca/~teerawat On Mar 5, 2013, at 6:30 PM, shiny wrote: hi all, anybody have an awk script to calculate total frames sent.. --thanx With Regards, John Shiny.J
Re: [ns] awk script to calculate total frames sent ?
hi, i want to calculate FER in mac-802_11.cc file.Is it possible ? On Wed, Mar 6, 2013 at 8:38 AM, Teerawat@UBC teera...@ece.ubc.ca wrote: Hi, If you are interested in learning how tracing works in NS2, please read http://www.ns2ultimate.com/post/3995318343/post-processing-ns2-result-using-ns2-trace-main-post Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://WhatILearnFromReading.com http://www.ece.ubc.ca/~teerawat On Mar 5, 2013, at 6:30 PM, shiny wrote: hi all, anybody have an awk script to calculate total frames sent.. --thanx With Regards, John Shiny.J -- With Regards, John Shiny.J