Cross-layer entity development

View: New views
2 Messages — Rating Filter:   Alert me  

Cross-layer entity development

by Christian Facchini-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear list,

I am trying to develop a 'cross-layer entity' for ns-3.
Such entity does not really belong to any layer of a node's
communication stack. Instead, it is a separate entity, "parallel" to
the communication stack, receiving inputs from and providing feedback
to the various layers (much like the architecture of fig. 2b in V.
Srivastava and M. Motani, “Cross-Layer Design: A Survey and the Road
Ahead,” IEEE Comm. Mag., vol. 43, 2005, pp. 112-119).

Some key features I would like to implement are:
   - the capability of being triggered by some events (a variation in
some traced variable, a variation in some attribute set via
Config::Set during the simulation, etc.)
   - the capability of setting some simulation parameters (the best
way I think is to use Config::Set) as the simulation goes

What would be the best way to do it?
I have read chapter 15 of the manual, explaining how to create new
ns-3 modules, still I am unsure about how to proceed.
In particular, I do not think it makes sense to build such an entity
by inheriting from the class Object. Or am I wrong?
As far as I can tell, it would only need to be inside the ns3 namespace.

Any hint on the subject is highly appreciated.

Best regards,
Christian


Re: Cross-layer entity development

by Gustavo Carneiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/5 Christian Facchini <c.facchini@...>

> Dear list,
>
> I am trying to develop a 'cross-layer entity' for ns-3.
> Such entity does not really belong to any layer of a node's
> communication stack. Instead, it is a separate entity, "parallel" to
> the communication stack, receiving inputs from and providing feedback
> to the various layers (much like the architecture of fig. 2b in V.
> Srivastava and M. Motani, “Cross-Layer Design: A Survey and the Road
> Ahead,” IEEE Comm. Mag., vol. 43, 2005, pp. 112-119).
>
> Some key features I would like to implement are:
>   - the capability of being triggered by some events (a variation in
> some traced variable, a variation in some attribute set via
> Config::Set during the simulation, etc.)
>

See Config::Connect and ObjectBase::TraceConnect.


>   - the capability of setting some simulation parameters (the best
> way I think is to use Config::Set) as the simulation goes
>

Yes, see Config::Set and ObjectBase::SetAttribute.


>
> What would be the best way to do it?
> I have read chapter 15 of the manual, explaining how to create new
> ns-3 modules, still I am unsure about how to proceed.
> In particular, I do not think it makes sense to build such an entity
> by inheriting from the class Object. Or am I wrong?
>

IMHO you are wrong.  I would do a crosslayer manager precisely by
subclassing Object and aggregating an instance of that class to each Node
(via Object::AggregateObject).  This is a good approach because it makes
your crosslayer manager discoverable and binds its lifetime to the lifetime
of the node.


> As far as I can tell, it would only need to be inside the ns3 namespace.
>

What do you mean by ns3 namespace? C++ namespace, or Config namespace?  Why?


>
> Any hint on the subject is highly appreciated.
>

Besides the Object subclass, you might want to create a helper class that
has Install* methods, similar to the way InternetStackHelper works.

--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert