|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
20 #include "ns3/abort.h"
22 #include "ns3/config.h"
23 #include "ns3/buildings-channel-condition-model.h"
24 #include "ns3/constant-position-mobility-model.h"
25 #include "ns3/buildings-module.h"
27 #include "ns3/simulator.h"
55 virtual void DoRun (
void);
71 :
TestCase (
"Test case for the BuildingsChannelConditionModel"), m_testVectors ()
86 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
91 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
96 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
101 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
109 nodes.Get (0)->AggregateObject (a);
112 nodes.Get (1)->AggregateObject (b);
122 BuildingsHelper::Install (
nodes);
139 Simulator::Destroy ();
152 :
TestSuite (
"buildings-channel-condition-model", UNIT)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
void SetPosition(const Vector &position)
Test case for the class BuildingsChannelConditionModel.
LosConditionValue
Possible values for Line-of-Sight condition.
virtual ~BuildingsChannelConditionModelTestCase()
Destructor.
Vector m_positionB
the position of the second node
void SetNRoomsX(uint16_t nroomx)
TestVectors< TestVector > m_testVectors
array containg all the test vectors
ChannelCondition::LosConditionValue m_losCond
the correct channel condition
void MakeConsistent(Ptr< MobilityModel > mm)
Make the given mobility model consistent, by determining whether its position falls inside any of the...
BuildingsChannelConditionModelsTestSuite()
mobility buildings information (to be used by mobility models)
Struct containing the parameters for each test.
void SetBoundaries(Box box)
Set the boundaries of the building.
LosConditionValue GetLosCondition() const
Get the LosConditionValue contaning the information about the LOS/NLOS state of the channel.
BuildingsChannelConditionModelTestCase()
Constructor.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b.
Vector m_positionA
the position of the first node
void SetNRoomsY(uint16_t nroomy)
virtual void DoRun(void)
Builds the simulation scenario and perform the tests.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Test suite for the buildings channel condition model.
keep track of a set of node pointers.
static BuildingsChannelConditionModelsTestSuite BuildingsChannelConditionModelsTestSuite
A simple way to store test vectors (for stimulus or from responses)
void SetNFloors(uint16_t nfloors)