hi i am badly stuck here, so please help me out.
well,i am trying a basic cross-layering.OLSR is used as an example.
the steps are
1.include #include <mobilenode.h> in OLSR.h header file.
2.declare a Phy object within the OLSR class
Phy* netif_;
3.
Add the following code in the command () function in aodv.cc
int
OLSR:: command (int argc, const char * const * argv) {
. . .
. . .
else if (argc == 3) {
...
...
else if (strcmp (argv [1], "access-phy") == 0) {
netif_ = (Phy *) TclObject:: lookup (argv[2]);
if (netif_ == 0) {
fprintf (stderr, "Agent: %s lookup %s failed. \n", argv[1], argv[2]);
return TCL_ERROR;
} else {
double x, y, z;
((MobileNode*) netif_->node())->getLoc(&x, &y, &z);
printf ("This node's location: %f %f \n", x, y);
return TCL_OK;
}
}
}
. . .
. . .
}
refer:
http://wmnatupdiliman.blogspot.in/20...1_archive.html
but i get the following error after making the changes:
Quote:
aodv/aodv.cc:82: error: ‘OLSR’ has not been declared
aodv/aodv.cc:82: error: a function-definition is not allowed here before ‘{’ token
aodv/aodv.cc:1412: error: expected ‘}’ at end of input
aodv/aodv.cc:1412: warning: no return statement in function returning non-void
make: *** [aodv/aodv.o] Error 1
Ns make failed!
|
i dont get why is says OLSR is not declared.please help me with this
thanks in advance.