lte: Random variable stream assignments on EPC nodes

This commit is contained in:
Tom Henderson
2022-08-11 15:13:04 -07:00
parent 7193a5f96d
commit 9080fdc458
5 changed files with 29 additions and 0 deletions

View File

@@ -169,6 +169,13 @@ public:
*/
virtual Ipv6Address GetUeDefaultGatewayAddress6 () = 0;
/**
* Assign a fixed random variable stream number to the random variables used.
*
* \param stream first stream index to use
* \return the number of stream indices (possibly zero) that have been assigned
*/
virtual int64_t AssignStreams (int64_t stream) = 0;
};

View File

@@ -1481,6 +1481,10 @@ LteHelper::AssignStreams (NetDeviceContainer c, int64_t stream)
currentStream += ueMac->AssignStreams (currentStream);
}
}
if (m_epcHelper)
{
currentStream += m_epcHelper->AssignStreams (currentStream);
}
return (currentStream - stream);
}

View File

@@ -652,6 +652,9 @@ public:
* If TraceFadingLossModel has been set as the fading model type, this method
* will also assign a stream number to it, if none has been assigned before.
*
* If an EPC has been configured, streams will be assigned on the EPC
* nodes as well via EpcHelper::AssignStreams ().
*
* \param c NetDeviceContainer of the set of net devices for which the
* LteNetDevice should be modified to use a fixed stream
* \param stream first stream index to use

View File

@@ -568,4 +568,18 @@ NoBackhaulEpcHelper::AddS1Interface (Ptr<Node> enb, Ipv4Address enbAddress, Ipv4
enbApp->SetS1apSapMme (m_mmeApp->GetS1apSapMme ());
}
int64_t
NoBackhaulEpcHelper::AssignStreams (int64_t stream)
{
int64_t currentStream = stream;
NS_ABORT_MSG_UNLESS (m_pgw && m_sgw && m_mme, "Running AssignStreams on empty node pointers");
InternetStackHelper internet;
NodeContainer nc;
nc.Add (m_pgw);
nc.Add (m_sgw);
nc.Add (m_mme);
currentStream += internet.AssignStreams (nc, currentStream);
return (currentStream - stream);
}
} // namespace ns3

View File

@@ -77,6 +77,7 @@ public:
virtual Ipv6InterfaceContainer AssignUeIpv6Address (NetDeviceContainer ueDevices);
virtual Ipv4Address GetUeDefaultGatewayAddress ();
virtual Ipv6Address GetUeDefaultGatewayAddress6 ();
virtual int64_t AssignStreams (int64_t stream) override;
protected:
/**