A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-spectrum-propagation-loss-model.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering,
3 * New York University
4 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
5 * University of Padova
6 *
7 * SPDX-License-Identifier: GPL-2.0-only
8 *
9 */
10
12
15
16#include "ns3/double.h"
17#include "ns3/log.h"
18#include "ns3/net-device.h"
19#include "ns3/node.h"
20#include "ns3/pointer.h"
21#include "ns3/simulator.h"
22#include "ns3/string.h"
23
24#include <map>
25
26namespace ns3
27{
28
29NS_LOG_COMPONENT_DEFINE("ThreeGppSpectrumPropagationLossModel");
30
31NS_OBJECT_ENSURE_REGISTERED(ThreeGppSpectrumPropagationLossModel);
32
37
42
43void
50
53{
54 static TypeId tid =
55 TypeId("ns3::ThreeGppSpectrumPropagationLossModel")
57 .SetGroupName("Spectrum")
59 .AddAttribute(
60 "ChannelModel",
61 "The channel model. It needs to implement the MatrixBasedChannelModel interface",
62 StringValue("ns3::ThreeGppChannelModel"),
66 return tid;
67}
68
69void
74
80
81double
83{
84 DoubleValue freq;
85 m_channelModel->GetAttribute("Frequency", freq);
86 return freq.Get();
87}
88
89void
91 const AttributeValue& value)
92{
93 m_channelModel->SetAttribute(name, value);
94}
95
96void
98 AttributeValue& value) const
99{
100 m_channelModel->GetAttribute(name, value);
101}
102
108{
109 NS_LOG_FUNCTION(this);
110
111 const PhasedArrayModel::ComplexVector& sW = sAnt->GetBeamformingVectorRef();
112 const PhasedArrayModel::ComplexVector& uW = uAnt->GetBeamformingVectorRef();
113 size_t sAntNumElems = sW.GetSize();
114 size_t uAntNumElems = uW.GetSize();
115 NS_ASSERT(uAntNumElems == params->m_channel.GetNumRows());
116 NS_ASSERT(sAntNumElems == params->m_channel.GetNumCols());
117 NS_LOG_DEBUG("CalcLongTerm with " << uW.GetSize() << " u antenna elements and " << sW.GetSize()
118 << " s antenna elements, and with "
119 << " s ports: " << sAnt->GetNumPorts()
120 << " u ports: " << uAnt->GetNumPorts());
121 NS_ASSERT_MSG((sAnt != nullptr) && (uAnt != nullptr), "Improper call to the method");
122 size_t numClusters = params->m_channel.GetNumPages();
123 // create and initialize the size of the longTerm 3D matrix
126 sAnt->GetNumPorts(),
127 numClusters);
128 // Calculate long term uW * Husn * sW, the result is a matrix
129 // with the dimensions #uPorts, #sPorts, #cluster
130 for (auto sPortIdx = 0; sPortIdx < sAnt->GetNumPorts(); sPortIdx++)
131 {
132 for (auto uPortIdx = 0; uPortIdx < uAnt->GetNumPorts(); uPortIdx++)
133 {
134 for (size_t cIndex = 0; cIndex < numClusters; cIndex++)
135 {
136 longTerm->Elem(uPortIdx, sPortIdx, cIndex) =
137 CalculateLongTermComponent(params, sAnt, uAnt, sPortIdx, uPortIdx, cIndex);
138 }
139 }
140 }
141 return longTerm;
142}
143
144std::complex<double>
149 uint16_t sPortIdx,
150 uint16_t uPortIdx,
151 uint16_t cIndex) const
152{
153 NS_LOG_FUNCTION(this);
154 const PhasedArrayModel::ComplexVector& sW = sAnt->GetBeamformingVectorRef();
155 const PhasedArrayModel::ComplexVector& uW = uAnt->GetBeamformingVectorRef();
156 auto sPortElems = sAnt->GetNumElemsPerPort();
157 auto uPortElems = uAnt->GetNumElemsPerPort();
158 auto startS = sAnt->ArrayIndexFromPortIndex(sPortIdx, 0);
159 auto startU = uAnt->ArrayIndexFromPortIndex(uPortIdx, 0);
160 std::complex<double> txSum(0, 0);
161 // limiting multiplication operations to the port location
162 auto sIndex = startS;
163 // The sub-array partition model is adopted for TXRU virtualization,
164 // as described in Section 5.2.2 of 3GPP TR 36.897,
165 // and so equal beam weights are used for all the ports.
166 // Support of the full-connection model for TXRU virtualization would need extensions.
167 const auto uElemsPerPort = uAnt->GetHElemsPerPort();
168 const auto sElemsPerPort = sAnt->GetHElemsPerPort();
169 for (size_t tIndex = 0; tIndex < sPortElems; tIndex++, sIndex++)
170 {
171 std::complex<double> rxSum(0, 0);
172 auto uIndex = startU;
173 for (size_t rIndex = 0; rIndex < uPortElems; rIndex++, uIndex++)
174 {
175 rxSum += uW[uIndex - startU] * params->m_channel(uIndex, sIndex, cIndex);
176 auto testV = (rIndex % uElemsPerPort);
177 auto ptInc = uElemsPerPort - 1;
178 if (testV == ptInc)
179 {
180 auto incVal = uAnt->GetNumColumns() - uElemsPerPort;
181 uIndex += incVal; // Increment by a factor to reach next column in a port
182 }
183 }
184
185 txSum += sW[sIndex - startS] * rxSum;
186 auto testV = (tIndex % sElemsPerPort);
187 auto ptInc = sElemsPerPort - 1;
188 if (testV == ptInc)
189 {
190 size_t incVal = sAnt->GetNumColumns() - sElemsPerPort;
191 sIndex += incVal; // Increment by a factor to reach next column in a port
192 }
193 }
194 return txSum;
195}
196
203 const Vector& sSpeed,
204 const ns3::Vector& uSpeed,
205 uint8_t numTxPorts,
206 uint8_t numRxPorts,
207 bool isReverse) const
208
209{
210 NS_LOG_FUNCTION(this);
211 Ptr<SpectrumSignalParameters> rxParams = params->Copy();
212 size_t numCluster = channelMatrix->m_channel.GetNumPages();
213 // compute the doppler term
214 // NOTE the update of Doppler is simplified by only taking the center angle of
215 // each cluster in to consideration.
216 double slotTime = Simulator::Now().GetSeconds();
217 double factor = 2 * M_PI * slotTime * GetFrequency() / 3e8;
218 PhasedArrayModel::ComplexVector doppler(numCluster);
219
220 // Make sure that all the structures that are passed to this function
221 // are of the correct dimensions before using the operator [].
222 NS_ASSERT(numCluster <= channelParams->m_alpha.size());
223 NS_ASSERT(numCluster <= channelParams->m_D.size());
224 NS_ASSERT(numCluster <= channelParams->m_angle[MatrixBasedChannelModel::ZOA_INDEX].size());
225 NS_ASSERT(numCluster <= channelParams->m_angle[MatrixBasedChannelModel::ZOD_INDEX].size());
226 NS_ASSERT(numCluster <= channelParams->m_angle[MatrixBasedChannelModel::AOA_INDEX].size());
227 NS_ASSERT(numCluster <= channelParams->m_angle[MatrixBasedChannelModel::AOD_INDEX].size());
228 NS_ASSERT(numCluster <= longTerm->GetNumPages());
229
230 // check if channelParams structure is generated in direction s-to-u or u-to-s
231 bool isSameDir = (channelParams->m_nodeIds == channelMatrix->m_nodeIds);
232
233 // if channel params is generated in the same direction in which we
234 // generate the channel matrix, angles and zenith of departure and arrival are ok,
235 // just set them to corresponding variable that will be used for the generation
236 // of channel matrix, otherwise we need to flip angles and zeniths of departure and arrival
237 using DPV = std::vector<std::pair<double, double>>;
238 using MBCM = MatrixBasedChannelModel;
239 const auto& cachedAngleSincos = channelParams->m_cachedAngleSincos;
240 const DPV& zoa = cachedAngleSincos[isSameDir ? MBCM::ZOA_INDEX : MBCM::ZOD_INDEX];
241 const DPV& zod = cachedAngleSincos[isSameDir ? MBCM::ZOD_INDEX : MBCM::ZOA_INDEX];
242 const DPV& aoa = cachedAngleSincos[isSameDir ? MBCM::AOA_INDEX : MBCM::AOD_INDEX];
243 const DPV& aod = cachedAngleSincos[isSameDir ? MBCM::AOD_INDEX : MBCM::AOA_INDEX];
244
245 for (size_t cIndex = 0; cIndex < numCluster; cIndex++)
246 {
247 // Compute alpha and D as described in 3GPP TR 37.885 v15.3.0, Sec. 6.2.3
248 // These terms account for an additional Doppler contribution due to the
249 // presence of moving objects in the surrounding environment, such as in
250 // vehicular scenarios.
251 // This contribution is applied only to the delayed (reflected) paths and
252 // must be properly configured by setting the value of
253 // m_vScatt, which is defined as "maximum speed of the vehicle in the
254 // layout".
255 // By default, m_vScatt is set to 0, so there is no additional Doppler
256 // contribution.
257
258 double alpha = channelParams->m_alpha[cIndex];
259 double D = channelParams->m_D[cIndex];
260
261 // cluster angle angle[direction][n], where direction = 0(aoa), 1(zoa).
262 double tempDoppler =
263 factor *
264 ((zoa[cIndex].first * aoa[cIndex].second * uSpeed.x +
265 zoa[cIndex].first * aoa[cIndex].first * uSpeed.y + zoa[cIndex].second * uSpeed.z) +
266 (zod[cIndex].first * aod[cIndex].second * sSpeed.x +
267 zod[cIndex].first * aod[cIndex].first * sSpeed.y + zod[cIndex].second * sSpeed.z) +
268 2 * alpha * D);
269 doppler[cIndex] = std::complex<double>(cos(tempDoppler), sin(tempDoppler));
270 }
271
272 NS_ASSERT(numCluster <= doppler.GetSize());
273
274 // set the channel matrix
275 rxParams->spectrumChannelMatrix = GenSpectrumChannelMatrix(rxParams->psd,
276 longTerm,
277 channelMatrix,
278 channelParams,
279 doppler,
280 numTxPorts,
281 numRxPorts,
282 isReverse);
283
284 // The precoding matrix is not set
285 if (!rxParams->precodingMatrix)
286 {
287 // Update rxParams->Psd.
288 // Compute RX PSD from the channel matrix
289 auto vit = rxParams->psd->ValuesBegin(); // psd iterator
290 size_t rbIdx = 0;
291 while (vit != rxParams->psd->ValuesEnd())
292 {
293 // Calculate PSD for the first antenna port (correct for SISO)
294 *vit = std::norm(rxParams->spectrumChannelMatrix->Elem(0, 0, rbIdx));
295 vit++;
296 rbIdx++;
297 }
298 }
299 else
300 {
301 NS_ASSERT_MSG(rxParams->psd->GetValuesN() == rxParams->spectrumChannelMatrix->GetNumPages(),
302 "RX PSD and the spectrum channel matrix should have the same number of RBs ");
303 // Calculate RX PSD from the spectrum channel matrix, H and
304 // the precoding matrix, P as:
305 // PSD = (H*P)^h * (H*P),
306 // where the dimensions are:
307 // H (rxPorts,txPorts,numRbs) x P (txPorts,txStreams, numRbs) =
308 // HxP (rxPorts,txStreams, numRbs)
310 *rxParams->spectrumChannelMatrix * (*rxParams->precodingMatrix);
311 // (HxP)^h dimensions are (txStreams, rxPorts, numRbs)
313
314 // Finally, (HxP)^h x (HxP) = PSD (txStreams, txStreams, numRbs)
316 // Update rxParams->Psd
317 for (uint32_t rbIdx = 0; rbIdx < rxParams->psd->GetValuesN(); ++rbIdx)
318 {
319 (*rxParams->psd)[rbIdx] = 0.0;
320
321 for (size_t txStream = 0; txStream < psd.GetNumRows(); ++txStream)
322 {
323 (*rxParams->psd)[rbIdx] += std::real(psd(txStream, txStream, rbIdx));
324 }
325 }
326 }
327 return rxParams;
328}
329
332 Ptr<SpectrumValue> inPsd,
337 uint8_t numTxPorts,
338 uint8_t numRxPorts,
339 bool isReverse) const
340{
341 size_t numCluster = channelMatrix->m_channel.GetNumPages();
342 auto numRb = inPsd->GetValuesN();
343
344 auto directionalLongTerm = isReverse ? longTerm->Transpose() : (*longTerm);
345
347 Create<MatrixBasedChannelModel::Complex3DVector>(numRxPorts, numTxPorts, (uint16_t)numRb);
348
349 // Precompute the delay until numRb, numCluster or RB width changes
350 // Whenever the channelParams is updated, the number of numRbs, numClusters
351 // and RB width (12*SCS) are reset, ensuring these values are updated too
352 double rbWidth = inPsd->ConstBandsBegin()->fh - inPsd->ConstBandsBegin()->fl;
353
354 if (channelParams->m_cachedDelaySincos.GetNumRows() != numRb ||
355 channelParams->m_cachedDelaySincos.GetNumCols() != numCluster ||
356 channelParams->m_cachedRbWidth != rbWidth)
357 {
358 channelParams->m_cachedRbWidth = rbWidth;
359 channelParams->m_cachedDelaySincos = ComplexMatrixArray(numRb, numCluster);
360 auto sbit = inPsd->ConstBandsBegin(); // band iterator
361 for (unsigned i = 0; i < numRb; i++)
362 {
363 double fsb = (*sbit).fc; // center frequency of the sub-band
364 for (std::size_t cIndex = 0; cIndex < numCluster; cIndex++)
365 {
366 double delay = -2 * M_PI * fsb * (channelParams->m_delay[cIndex]);
367 channelParams->m_cachedDelaySincos(i, cIndex) =
368 std::complex<double>(cos(delay), sin(delay));
369 }
370 sbit++;
371 }
372 }
373
374 // Compute the product between the doppler and the delay sincos
375 auto delaySincosCopy = channelParams->m_cachedDelaySincos;
376 for (size_t iRb = 0; iRb < inPsd->GetValuesN(); iRb++)
377 {
378 for (std::size_t cIndex = 0; cIndex < numCluster; cIndex++)
379 {
380 delaySincosCopy(iRb, cIndex) *= doppler[cIndex];
381 }
382 }
383
384 // If "params" (ChannelMatrix) and longTerm were computed for the reverse direction (e.g. this
385 // is a DL transmission but params and longTerm were last updated during UL), then the elements
386 // in longTerm start from different offsets.
387
388 auto vit = inPsd->ValuesBegin(); // psd iterator
389 size_t iRb = 0;
390 // Compute the frequency-domain channel matrix
391 while (vit != inPsd->ValuesEnd())
392 {
393 if ((*vit) != 0.00)
394 {
395 auto sqrtVit = sqrt(*vit);
396 for (auto rxPortIdx = 0; rxPortIdx < numRxPorts; rxPortIdx++)
397 {
398 for (auto txPortIdx = 0; txPortIdx < numTxPorts; txPortIdx++)
399 {
400 std::complex<double> subsbandGain(0.0, 0.0);
401 for (size_t cIndex = 0; cIndex < numCluster; cIndex++)
402 {
403 subsbandGain += directionalLongTerm(rxPortIdx, txPortIdx, cIndex) *
404 delaySincosCopy(iRb, cIndex);
405 }
406 // Multiply with the square root of the input PSD so that the norm (absolute
407 // value squared) of chanSpct will be the output PSD
408 chanSpct->Elem(rxPortIdx, txPortIdx, iRb) = sqrtVit * subsbandGain;
409 }
410 }
411 }
412 vit++;
413 iRb++;
414 }
415 return chanSpct;
416}
417
421 Ptr<const PhasedArrayModel> aPhasedArrayModel,
422 Ptr<const PhasedArrayModel> bPhasedArrayModel) const
423{
425 longTerm; // vector containing the long term component for each cluster
426
427 // check if the channel matrix was generated considering a as the s-node and
428 // b as the u-node or vice-versa
429 auto isReverse =
430 channelMatrix->IsReverse(aPhasedArrayModel->GetId(), bPhasedArrayModel->GetId());
431 auto sAntenna = isReverse ? bPhasedArrayModel : aPhasedArrayModel;
432 auto uAntenna = isReverse ? aPhasedArrayModel : bPhasedArrayModel;
433
436 if (!isReverse)
437 {
438 sW = aPhasedArrayModel->GetBeamformingVector();
439 uW = bPhasedArrayModel->GetBeamformingVector();
440 }
441 else
442 {
443 sW = bPhasedArrayModel->GetBeamformingVector();
444 uW = aPhasedArrayModel->GetBeamformingVector();
445 }
446
447 bool update = false; // indicates whether the long term has to be updated
448 bool notFound = false; // indicates if the long term has not been computed yet
449
450 // compute the long term key, the key is unique for each tx-rx pair
451 uint64_t longTermId =
452 MatrixBasedChannelModel::GetKey(aPhasedArrayModel->GetId(), bPhasedArrayModel->GetId());
453
454 // look for the long term in the map and check if it is valid
455 if (m_longTermMap.find(longTermId) != m_longTermMap.end())
456 {
457 NS_LOG_DEBUG("found the long term component in the map");
458 longTerm = m_longTermMap[longTermId]->m_longTerm;
459
460 // check if the channel matrix has been updated
461 // or the s beam has been changed
462 // or the u beam has been changed
463 update = (m_longTermMap[longTermId]->m_channel->m_generatedTime !=
464 channelMatrix->m_generatedTime ||
465 m_longTermMap[longTermId]->m_sW != sW || m_longTermMap[longTermId]->m_uW != uW);
466 }
467 else
468 {
469 NS_LOG_DEBUG("long term component NOT found");
470 notFound = true;
471 }
472
473 if (update || notFound)
474 {
475 NS_LOG_DEBUG("compute the long term");
476 // compute the long term component
477 longTerm = CalcLongTerm(channelMatrix, sAntenna, uAntenna);
478 Ptr<LongTerm> longTermItem = Create<LongTerm>();
479 longTermItem->m_longTerm = longTerm;
480 longTermItem->m_channel = channelMatrix;
481 longTermItem->m_sW = std::move(sW);
482 longTermItem->m_uW = std::move(uW);
483 // store the long term to reduce computation load
484 // only the small scale fading needs to be updated if the large scale parameters and antenna
485 // weights remain unchanged.
486 m_longTermMap[longTermId] = longTermItem;
487 }
488
489 return longTerm;
490}
491
494 Ptr<const SpectrumSignalParameters> spectrumSignalParams,
497 Ptr<const PhasedArrayModel> aPhasedArrayModel,
498 Ptr<const PhasedArrayModel> bPhasedArrayModel) const
499{
500 NS_LOG_FUNCTION(this << spectrumSignalParams << a << b << aPhasedArrayModel
501 << bPhasedArrayModel);
502
503 uint32_t aId = a->GetObject<Node>()->GetId(); // id of the node a
504 uint32_t bId = b->GetObject<Node>()->GetId(); // id of the node b
505 NS_ASSERT_MSG(aPhasedArrayModel, "Antenna not found for node " << aId);
506 NS_LOG_DEBUG("a node " << aId << " antenna " << aPhasedArrayModel);
507 NS_ASSERT_MSG(bPhasedArrayModel, "Antenna not found for node " << bId);
508 NS_LOG_DEBUG("b node " << bId << " antenna " << bPhasedArrayModel);
509
511 m_channelModel->GetChannel(a, b, aPhasedArrayModel, bPhasedArrayModel);
513 m_channelModel->GetParams(a, b);
514
515 // retrieve the long term component
517 GetLongTerm(channelMatrix, aPhasedArrayModel, bPhasedArrayModel);
518
519 auto isReverse =
520 channelMatrix->IsReverse(aPhasedArrayModel->GetId(), bPhasedArrayModel->GetId());
521
522 // apply the beamforming gain
523 return CalcBeamformingGain(spectrumSignalParams,
524 longTerm,
525 channelMatrix,
526 channelParams,
527 a->GetVelocity(),
528 b->GetVelocity(),
529 aPhasedArrayModel->GetNumPorts(),
530 bPhasedArrayModel->GetNumPorts(),
531 isReverse);
532}
533
534int64_t
536{
537 return 0;
538}
539
540} // namespace ns3
Hold a value for an Attribute.
Definition attribute.h:59
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition double.h:31
double Get() const
Definition double.cc:26
MatrixArray< T > HermitianTranspose() const
Function that performs the Hermitian transpose of this MatrixArray and returns a new matrix that is t...
This is an interface for a channel model that can be described by a channel matrix,...
static const uint8_t AOA_INDEX
index of the AOA value in the m_angle array
static const uint8_t ZOD_INDEX
index of the ZOD value in the m_angle array
static const uint8_t AOD_INDEX
index of the AOD value in the m_angle array
static const uint8_t ZOA_INDEX
index of the ZOA value in the m_angle array
static uint64_t GetKey(uint32_t a, uint32_t b)
Generate a unique value for the pair of unsigned integer of 32 bits, where the order does not matter,...
A network Node.
Definition node.h:46
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
Smart pointer class similar to boost::intrusive_ptr.
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
Hold variables of type string.
Definition string.h:45
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< SpectrumSignalParameters > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > spectrumSignalParams, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
Computes the received PSD.
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
Ptr< MatrixBasedChannelModel::Complex3DVector > GenSpectrumChannelMatrix(Ptr< SpectrumValue > inPsd, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, PhasedArrayModel::ComplexVector doppler, uint8_t numTxPorts, uint8_t numRxPorts, bool isReverse) const
Computes the frequency-domain channel matrix with the dimensions numRxPorts*numTxPorts*numRBs.
Ptr< const MatrixBasedChannelModel::Complex3DVector > GetLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
Looks for the long term component in m_longTermMap.
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
Ptr< const MatrixBasedChannelModel::Complex3DVector > CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt) const
Computes the long term component.
std::unordered_map< uint64_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
Ptr< SpectrumSignalParameters > CalcBeamformingGain(Ptr< const SpectrumSignalParameters > params, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, const Vector &sSpeed, const Vector &uSpeed, uint8_t numTxPorts, uint8_t numRxPorts, bool isReverse) const
Computes the beamforming gain and applies it to the TX PSD.
std::complex< double > CalculateLongTermComponent(Ptr< const MatrixBasedChannelModel::ChannelMatrix > params, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt, uint16_t sPortIdx, uint16_t uPortIdx, uint16_t cIndex) const
Computes a longTerm component from a specific port of s device to the specific port of u device and f...
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition nstime.h:392
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
size_t GetSize() const
Definition val-array.h:394
size_t GetNumRows() const
Definition val-array.h:373
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition assert.h:75
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition pointer.h:248
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition pointer.h:269
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Definition first.py:1
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MatrixArray< std::complex< double > > ComplexMatrixArray
Create an alias for MatrixArray using complex type.