[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] sundry quick questions.
1) I'm a little puzzled by
void SatRouteAgent::recv (Packet * p, Handler *)
void SatRouteAgent::recv (Packet * p, Handler *)
Is that equivalent to
Packet *p
or to
Packet* p ? Or to something else?
2) There's something fundamental I don't understand about
variable binding.
I've modified the ns satellite code to set up some per-terminal bound
variables for elevation angle etc, rather than the global values
declared in the handoff code.
I eventually found I can control these via
Position/Sat/Term set elevation_mask_ 30
set n288 [$ns satnode-terminal -1 -78]; # Quito
to set a specific value for that node, but the seemingly equivalent:
set n288 [$ns satnode-terminal -1 -78]; # Quito
$n288 set elevation_mask_ 30
doesn't work; the bound variables aren't acting in a
particularly bound fashion.
I see the latter form isn't used anywhere related to nodes, although
it's very common in agents with e.g.
$tcp0 set cwnd_ 30
etc. What am I missing in the binding (on the OTcl side, or in node
creation)? This stuff works naturally for every $agent I can think of,
but I can't seem to recreate the effect for bound variables in node
objects.
thanks,
L.
<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>