Hello P.
actually I need only the values of the bind variables in the AODV agent. The
binding itsself works - I've tested it.
What I want is to use the value of, let's say, rq_context in the function
AODV::sendRequest(). This variable has the value of 0, it gets it in the
simulation script:
Hi Jana,
I can't see the solution straight away and without looking at it longer
I can't tell you.
Your solution looks ok but I am concerned about your use of friend. Does
it actually create an AODV agent?
I'd suggest using gdb with breakpoints to work out what is going on.
Jana Henniger
Hi Jana,
Interesting Problem !! But, unfortunately I am also new to NS-2, so I
can't answer your question in the way you expected, but I can propose an
alternate solution, purely on the C++ platform.
If you need just one instance of the ContextAgent object, you can create
a Global variable
Hello Prashant Batra,
actually I thought about a solution with global variables,
but I want to use my new class the same way the AODV protocol is used
just with some extensions and without affecting AODV.
That's why I think it's best to go on looking for a solution accessing
objects created
I’m new to ns-2 and C++ and need help concerning OTCL-Linkage.
I’ve created a new class ContextAgent which has AODV as friendclass.
ContextAgent has two public variables that are bound to OTCL using the
bind()-function (as it is used in the Example ex-linkage.cc from the tutorial
“ns by
Hi Jana,
I suggest you first check whether the bound variables work with AODV in
the first place.
If they do not work then you will need to get a reference to the AODV
agent in .tcl simulation script. You can start looking in tcl/lib
P.
Jana Henniger wrote:
I’m new to ns-2 and C++ and need