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"),
100 nodes.Get(0)->AggregateObject(a);
103 nodes.Get(1)->AggregateObject(b);
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));
122 buildingInfoA->MakeConsistent(a);
124 buildingInfoA->MakeConsistent(b);
127 NS_LOG_DEBUG(
"Got " << cond->GetLosCondition() <<
" expected condition "
131 " Got unexpected channel condition");
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.
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.
TestCase(const TestCase &)=delete
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
static constexpr auto UNIT
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