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.