|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #ifndef MATRIX_BASED_CHANNEL_H
23 #define MATRIX_BASED_CHANNEL_H
26 #include <ns3/object.h>
27 #include <ns3/nstime.h>
28 #include <ns3/vector.h>
29 #include <ns3/phased-array-model.h>
81 bool IsReverse (
const uint32_t aId,
const uint32_t bId)
const
85 NS_ASSERT_MSG ((sId == aId && uId == bId) || (sId == bId && uId == aId),
86 "This matrix represents the channel between " << sId <<
" and " << uId);
87 return (sId == bId && uId == aId);
120 static constexpr uint32_t
GetKey (uint32_t x1, uint32_t x2)
122 return (((x1 + x2) * (x1 + x2 + 1)) / 2) + x2;
134 #endif // MATRIX_BASED_CHANNEL_H
DoubleVector m_delay
cluster delay in nanoseconds.
static const uint8_t ZOA_INDEX
index of the ZOA value in the m_angle array
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Double2DVector m_angle
cluster angle angle[direction][n], where direction = 0(AOA), 1(ZOA), 2(AOD), 3(ZOD) in degree.
Complex3DVector m_channel
channel matrix H[u][s][n].
static const uint8_t AOA_INDEX
index of the AOA value in the m_angle array
A template-based reference counting class.
std::vector< DoubleVector > Double2DVector
type definition for matrices of doubles
std::vector< Double2DVector > Double3DVector
type definition for 3D matrices of doubles
This is an interface for a channel model that can be described by a channel matrix,...
static constexpr uint32_t GetKey(uint32_t x1, uint32_t x2)
Calculate the channel key using the Cantor function.
Smart pointer class similar to boost::intrusive_ptr.
Time m_generatedTime
generation time
A base class which provides memory management and object aggregation.
bool IsReverse(const uint32_t aId, const uint32_t bId) const
Returns true if the ChannelMatrix object was generated considering node b as transmitter and node a a...
static const uint8_t ZOD_INDEX
index of the ZOD value in the m_angle array
Simulation virtual time values and global simulation resolution.
virtual ~ChannelMatrix()=default
Destructor for ChannelMatrix.
std::pair< uint32_t, uint32_t > m_nodeIds
the first element is the s-node ID (the transmitter when the channel was generated),...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
static const uint8_t AOD_INDEX
index of the AOD value in the m_angle array
std::vector< double > DoubleVector
type definition for vectors of doubles
std::vector< PhasedArrayModel::ComplexVector > Complex2DVector
type definition for complex matrices
virtual Ptr< const ChannelMatrix > GetChannel(Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna)=0
Returns a matrix with a realization of the channel between the nodes with mobility objects passed as ...
std::vector< Complex2DVector > Complex3DVector
type definition for complex 3D matrices
Data structure that stores a channel realization.
virtual ~MatrixBasedChannelModel()
Destructor for MatrixBasedChannelModel.