Bug 2179 - Add EnergySource to Config path
Add EnergySource to Config path
Status: NEW
Product: ns-3
Classification: Unclassified
Component: energy
All All
: P5 enhancement
Assigned To: Cristiano Tapparello
Depends on:
  Show dependency treegraph
Reported: 2015-09-13 14:29 EDT by Konstantinos Katsaros
Modified: 2015-09-13 14:29 EDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Konstantinos Katsaros 2015-09-13 14:29:06 EDT
This is from a discussion with Tom and Peter to add EnergySource(s) to Config system for Attribute and TraceSource manipulation.

On 09/13/2015 09:46 AM, Konstantinos Katsaros wrote:
Hi Peter,

I can see that the EnergySourceContainer is manually aggregated in
the doxygen, not the EnergySource itself.

1282 info.RecordAggregationInfo ("ns3::Node", "ns3::EnergyHarvesterContainer");
1283 info.RecordAggregationInfo ("ns3::Node", "ns3::EnergySourceContainer”);

In the installation of an EnergySource, a pointer to the node is set on
that object
source->SetNode (node);
but I can not see any other aggregation.
I CC’d Sidharth and He who developed the Energy Model and can comment on

On Sunday, 13 September 2015 at 18:35, Tom Henderson wrote:

This is probably by oversight/accident.

The EnergySourceContainer is aggregated instead of an EnergySource,
since only one instance of an object may be aggregated (and we may have
multiple EnergySources).

However, if EnergySources need to be available from the config system,
there must be a path through the attributes for EnergySourceContainer.
so they must be exposed as a list, similar to how Tcp Sockets are
exposed by TcpL4Protocol:

.AddAttribute ("SocketList", "The list of sockets associated to
this protocol.",
ObjectVectorValue (),
MakeObjectVectorAccessor (&TcpL4Protocol::m_sockets),
MakeObjectVectorChecker<TcpSocketBase> ())

So, probably an "EnergySourceList" should be similarly created for

Please open a bug with this feature request so we don't forget about it.

- Tom