19 #include "ns3/abort.h"
20 #include "ns3/buildings-channel-condition-model.h"
21 #include "ns3/buildings-module.h"
22 #include "ns3/config.h"
23 #include "ns3/constant-position-mobility-model.h"
25 #include "ns3/simulator.h"
57 void DoRun()
override;
73 :
TestCase(
"Test case for the BuildingsChannelConditionModel"),
89 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
94 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
99 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
104 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
120 building->SetNRoomsX(1);
121 building->SetNRoomsY(1);
122 building->SetNFloors(1);
123 building->SetBoundaries(
Box(0.0, 10.0, 0.0, 10.0, 0.0, 5.0));
124 building->SetExtWallsType(Building::ExtWallsType_t::Wood);
126 BuildingsHelper::Install(
nodes);
134 buildingInfoA->MakeConsistent(a);
136 buildingInfoA->MakeConsistent(b);
139 NS_LOG_DEBUG(
"Got " << cond->GetLosCondition() <<
" expected condition "
143 " Got unexpected channel condition");
146 Simulator::Destroy();
161 :
TestSuite(
"buildings-channel-condition-model", UNIT)
static BuildingsChannelConditionModelsTestSuite BuildingsChannelConditionModelsTestSuite
Static variable for test initialization.
Test case for the class BuildingsChannelConditionModel.
void DoRun() override
Builds the simulation scenario and perform the tests.
~BuildingsChannelConditionModelTestCase() override
Destructor.
BuildingsChannelConditionModelTestCase()
Constructor.
TestVectors< TestVector > m_testVectors
array containing all the test vectors
Test suite for the buildings channel condition model.
BuildingsChannelConditionModelsTestSuite()
LosConditionValue
Possible values for Line-of-Sight condition.
mobility buildings information (to be used by mobility models)
void SetPosition(const Vector &position)
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
A simple way to store test vectors (for stimulus or from responses)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct containing the parameters for each test.
Vector m_positionB
the position of the second node
ChannelCondition::LosConditionValue m_losCond
the correct channel condition
Vector m_positionA
the position of the first node