Bug 2179

Summary: Add EnergySource to Config path
Product: ns-3 Reporter: Konstantinos Katsaros <dinos.katsaros>
Component: energyAssignee: Cristiano Tapparello <cristiano.tapparello>
Status: NEW ---    
Severity: enhancement CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

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
that.


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
EnergySourceContainer.

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

- Tom