This happens because the 'target_' attribute is a NsObject (superclass 
of many
ns-2 classes), to guarantee maximum code flexibility. You 
should:
1. cast the 'target_' to the desired class, e.g.
    
targetActualClass *targetPointer =  (targetActualClass *) this-
>target_;
2. access 'target_' downtarget_ attribute. I am not sure you 
can
    do this directly, since 'downtarget_' is probably a protected 
mamber.
    Thus, you should code an accessor function (if not present) 
or
     define the aodv class as a friend of the 'target_' class.

Regards,

Marco Fiore

----Messaggio originale----
Da: 
[EMAIL PROTECTED]
Data: 30-gen-2006 5.52 PM
A: <[email protected]>
Ogg: [ns] HELP - I am stuck on MAC queue length


Dear ns2 users,

I 
really need your help. I'm completely stuck on the following:

I need 
to access the IFq length from my Routing Agent. Since the routing I 
adopted is the AODV one, I have no more layers (e.g. IMEP) to consider. 
So, 
FROM THE AODV.CC code, according to the structure of the mobile 
node as 
depicted in the ns2 manual, I should achieve my target by 
inserting the 
following line... Given this the pointer to the aodv 
agent,

int queued_packets = this->target_->downtarget_->length().

Well, it doesn't work. The compilation doesn't give positive results 
and the 
error it gives is the following:
aodv/aodv.cc:1033: error: 
'class NsObject' has no member named 'downtarget_'

??????

Any replay 
with suggestion is really welcome.

Thank you in advance. I hope you 
can help me.

_________________________________________________________________
Charla con tus amigos en lĂ­nea mediante MSN Messenger: 
http:
//messenger.latam.msn.com/




Reply via email to