12#include <ns3/building.h>
13#include <ns3/buildings-helper.h>
14#include <ns3/constant-position-mobility-model.h>
15#include <ns3/double.h>
18#include <ns3/mobility-building-info.h>
19#include <ns3/simulator.h>
20#include <ns3/string.h>
45 "OH Urban Large city"),
46 TestCase::Duration::QUICK);
54 "OH Urban small city"),
55 TestCase::Duration::QUICK);
64 TestCase::Duration::QUICK);
73 TestCase::Duration::QUICK);
85 "COST231 Urban Large city"),
86 TestCase::Duration::QUICK);
94 "COST231 Urban small city and suburban"),
95 TestCase::Duration::QUICK);
108 TestCase::Duration::QUICK);
120 TestCase::Duration::QUICK);
133 TestCase::Duration::QUICK);
140 TestCase::Duration::QUICK);
153 "Okumura Hata Outdoor -> Indoor"),
154 TestCase::Duration::QUICK);
166 "ITU1411 LOS Outdoor -> Indoor"),
167 TestCase::Duration::QUICK);
181 "ITU1411 LOS Indoor -> Outdoor"),
182 TestCase::Duration::QUICK);
196 "ITU1411 NLOS Indoor -> Outdoor"),
197 TestCase::Duration::QUICK);
214 :
TestCase(
"LOSS calculation: " + name),
216 m_mobilityModelIndex1(
m1),
217 m_mobilityModelIndex2(
m2),
236 building1->SetBoundaries(
Box(-3000, -1, -4000, 4000.0, 0.0, 12));
239 building1->SetNFloors(3);
247 propagationLossModel->SetAttribute(
"Environment",
EnumValue(
m_env));
250 propagationLossModel->SetAttribute(
"ShadowSigmaOutdoor",
DoubleValue(0.0));
251 propagationLossModel->SetAttribute(
"ShadowSigmaIndoor",
DoubleValue(0.0));
252 propagationLossModel->SetAttribute(
"ShadowSigmaExtWalls",
DoubleValue(0.0));
254 double loss = propagationLossModel->GetLoss(mma, mmb);
278 double henbHeight = 10.0;
286 mm->SetPosition(Vector(0.0, 0.0, hb));
291 mm->SetPosition(Vector(2000, 0.0, hm));
296 mm->SetPosition(Vector(100, 0.0, hm));
301 mm->SetPosition(Vector(900, 0.0, hm));
306 mm->SetPosition(Vector(-5, 0.0, hm));
311 mm->SetPosition(Vector(-5, 30, henbHeight));
316 mm->SetPosition(Vector(-2000, 0.0, hm));
321 mm->SetPosition(Vector(-100, 0.0, hm));
326 mm->SetPosition(Vector(0, 0.0, hm));
331 mm->SetPosition(Vector(-100, 0.0, henbHeight));
336 mm->SetPosition(Vector(-500, 0.0, henbHeight));
344 mm->AggregateObject(buildingInfo);
345 buildingInfo->MakeConsistent(mm);
static BuildingsPathlossTestSuite buildingsPathlossTestSuite
Static variable for test initialization.
Test 1.1 BuildingsPathlossModel Pathloss test.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< MobilityModel > CreateMobilityModel(uint16_t index)
Create a mobility model based on its index.
uint16_t m_mobilityModelIndex2
Second MobilityModel Index.
double m_lossRef
Theoretical loss.
CitySize m_city
City size.
double m_freq
Communication frequency.
EnvironmentType m_env
Environment type.
uint16_t m_mobilityModelIndex1
First MobilityModel Index.
~BuildingsPathlossTestCase() override
BuildingsPathlossTestCase(double freq, uint16_t m1, uint16_t m2, EnvironmentType env, CitySize city, double refValue, std::string name)
Constructor.
Test 1.1 BuildingsPathlossModel Pathloss compound test.
BuildingsPathlossTestSuite()
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold variables of type enum.
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.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
EnvironmentType
The type of propagation environment.
CitySize
The size of the city in which propagation takes place.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
const double m1
First component modulus, 232 - 209.
const double m2
Second component modulus, 232 - 22853.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
@ LOG_LEVEL_ALL
Print everything.