Protocol with state on nodes

34 views
Skip to first unread message

fa

unread,
Jan 9, 2015, 7:07:35 AM1/9/15
to ns-3-...@googlegroups.com
Hello,

I am implementing a protocol following AODV example.
I want to store state data on every node, a particular state for each of them.
I have defined variables related to the protocol in the RoutingProtocol class. This protocol is installed in the nodes.
However,  I do not know if the RoutingProtocol class is the right place to define state variables. If so, how can I access these variables?  If not, what should I do? Should I create a different class that inherits from Node class?
In AODV protocol most variables are common for the protocol (not specific to nodes). The only one that seems to be specific is m_routingTable which does not have (as far as I have seen) methods to be accessed directly.

Thanks in advance,

Tommaso Pecorella

unread,
Jan 9, 2015, 9:52:22 AM1/9/15
to ns-3-...@googlegroups.com
Hi,

may I suggest a good book about C++ and a deeper check / study of the ns-3 tutorial and manual ?
You seems to miss that a routing protocol instance is installed in each node. As a consequence, the members variable (not the class variables) are specific for each node. However this isn't ns-3, this is a C++ thing.

Don't rush, learn first.

Hope this helps,

T.

fa

unread,
Jan 9, 2015, 10:36:45 AM1/9/15
to ns-3-...@googlegroups.com

Thank you.

Reply all
Reply to author
Forward
0 new messages