find neighbors list in wireless senror network with ns2 simulator
hi everyone,i'm working on mac protocol for wsn, and i have to modify the smac protocol which exists already in ns2, i have two problems:
1)how to find the neighboring list of 2 hops. 2)how to work with the fonctions in ns2, are they defined in the ns2 library or we have to define every fonction? like in the exemple below: class MAC { void send (Packet* p); void recv(Packet*, Handler* h); NsObject* target_ what packet and handler are?? plzz help me its really urgent. thank you |
Quote:
You've posted a few lines of a script, but not told us where you got it, or what you've done/tried on your own to do your assignment. Can you show us your code, and tell us where you're stuck?? |
i got these lines from a pdf that learns ns2 but it was not halpful.
these are some lines of what i did by myself but it doesnt work #include <iostream> #include <string> #include<queue> using namespace std; const int maxqueue = 7; struct queuetype { string name[maxqueue]; int priority; int t_max; int t_used; }; struct datatype { int trafic_type; int addrsrc; int addrdst; int duation; }; int main() { queuetype<datatype> RT ; queuetype<datatype> NRT1 ; queuetype<datatype> NRT2 ; } |
Quote:
We can try to help, but again, we need DETAILS before we can do it. |
@asmab : Welcome to LQ.
ns2 wsn neighbor list : Some hints here ... https://www.google.com/webhp?hl=all&...+neighbor+list Example http://stackoverflow.com/questions/1...hat-can-not-be - |
All times are GMT -5. The time now is 08:27 PM. |