9#include "ns3/buildings-channel-condition-model.h"
10#include "ns3/buildings-module.h"
11#include "ns3/config.h"
12#include "ns3/constant-position-mobility-model.h"
14#include "ns3/simulator.h"
45 void DoRun()
override;
61 :
TestCase(
"Test case for the BuildingsChannelConditionModel"),
77 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
82 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
87 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
92 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
108 building->SetNRoomsX(1);
109 building->SetNRoomsY(1);
110 building->SetNFloors(1);
111 building->SetBoundaries(
Box(0.0, 10.0, 0.0, 10.0, 0.0, 5.0));
112 building->SetExtWallsType(Building::ExtWallsType_t::Wood);
122 buildingInfoA->MakeConsistent(a);
124 buildingInfoA->MakeConsistent(b);
127 NS_LOG_DEBUG(
"Got " << cond->GetLosCondition() <<
" expected condition "
131 " Got unexpected channel condition");
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()
static void Install(Ptr< Node > node)
Install the MobilityBuildingInfo to a node.
LosConditionValue
Possible values for Line-of-Sight condition.
mobility buildings information (to be used by mobility models)
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.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
void AddTestCase(TestCase *testCase, Duration duration=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.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#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