Bug 1873 - Energy source checked to be aggregated to the node
This commit is contained in:
@@ -67,6 +67,7 @@ Bugs fixed
|
||||
- Bug 1855 - SixLowPanNetDevice is not correctly indexed
|
||||
- Bug 1862 - NS_LOG="Time=*|prefix_time" causes stack overflow
|
||||
- Bug 1870 - Remove unnecessary AsInt functions
|
||||
- Bug 1873 - Energy source checked to be aggregated to the node
|
||||
- Bug 1874 - Ipv4L3Protocol::ProcessFragment: addressCombination and idProto identifiers not properly computed
|
||||
- Bug 1882 - int64x64 tests trigger valgrind bug
|
||||
- Bug 1883 - IPv6 don't consider the prefix and network when choosing output address
|
||||
|
||||
@@ -42,13 +42,7 @@ Ptr<EnergySource>
|
||||
BasicEnergySourceHelper::DoInstall (Ptr<Node> node) const
|
||||
{
|
||||
NS_ASSERT (node != NULL);
|
||||
// check if energy source already exists
|
||||
Ptr<EnergySource> source = node->GetObject<EnergySource> ();
|
||||
if (source != NULL)
|
||||
{
|
||||
NS_FATAL_ERROR ("Energy source already installed!");
|
||||
}
|
||||
source = m_basicEnergySource.Create<EnergySource> ();
|
||||
Ptr<EnergySource> source = m_basicEnergySource.Create<EnergySource> ();
|
||||
NS_ASSERT (source != NULL);
|
||||
source->SetNode (node);
|
||||
return source;
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace ns3 {
|
||||
* \ingroup energy
|
||||
* \brief Creates EnergySource objects.
|
||||
*
|
||||
* This class creates and installs an energy source onto network nodes. Only a
|
||||
* single source can exist on a network node.
|
||||
* This class creates and installs an energy source onto network nodes.
|
||||
* Multiple sources can exist on a network node.
|
||||
*
|
||||
*/
|
||||
class EnergySourceHelper
|
||||
|
||||
@@ -42,13 +42,7 @@ Ptr<EnergySource>
|
||||
RvBatteryModelHelper::DoInstall (Ptr<Node> node) const
|
||||
{
|
||||
NS_ASSERT (node != NULL);
|
||||
// check if energy source already exists
|
||||
Ptr<EnergySource> source = node->GetObject<EnergySource> ();
|
||||
if (source != NULL)
|
||||
{
|
||||
NS_FATAL_ERROR ("Energy source already installed!");
|
||||
}
|
||||
source = m_rvBatteryModel.Create<EnergySource> ();
|
||||
Ptr<EnergySource> source = m_rvBatteryModel.Create<EnergySource> ();
|
||||
NS_ASSERT (source != NULL);
|
||||
source->SetNode (node);
|
||||
return source;
|
||||
|
||||
Reference in New Issue
Block a user