Bug 1873 - Energy source checked to be aggregated to the node

This commit is contained in:
Tomasz Seweryn
2014-04-26 23:01:09 +02:00
parent af31d858d2
commit f7e18f35b4
4 changed files with 5 additions and 16 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;