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);
117 building->SetNRoomsX (1);
118 building->SetNRoomsY (1);
119 building->SetNFloors (1);
120 building->SetBoundaries (
Box (0.0, 10.0, 0.0, 10.0, 0.0, 5.0));
122 BuildingsHelper::Install (
nodes);
139 Simulator::Destroy ();
152 :
TestSuite (
"buildings-channel-condition-model", UNIT)
Test suite for the buildings channel condition model.
BuildingsChannelConditionModelsTestSuite()
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
LosConditionValue GetLosCondition() const
Get the LosConditionValue contaning the information about the LOS/NLOS state of the channel...
BuildingsChannelConditionModelTestCase()
Constructor.
A simple way to store test vectors (for stimulus or from responses)
static BuildingsChannelConditionModelsTestSuite BuildingsChannelConditionModelsTestSuite
virtual ~BuildingsChannelConditionModelTestCase()
Destructor.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#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.
Vector m_positionA
the position of the first node
TestVectors< TestVector > m_testVectors
array containg all the test vectors
Test case for the class BuildingsChannelConditionModel.
Struct containing the parameters for each test.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Vector m_positionB
the position of the second node
void SetPosition(const Vector &position)
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b.
ChannelCondition::LosConditionValue m_losCond
the correct channel condition
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
mobility buildings information (to be used by mobility models)
void MakeConsistent(Ptr< MobilityModel > mm)
Make the given mobility model consistent, by determining whether its position falls inside any of the...
virtual void DoRun(void)
Builds the simulation scenario and perform the tests.
LosConditionValue
Possible values for Line-of-Sight condition.