23 #include <ns3/building.h>
24 #include <ns3/buildings-helper.h>
25 #include <ns3/constant-position-mobility-model.h>
26 #include <ns3/double.h>
29 #include <ns3/mobility-building-info.h>
30 #include <ns3/simulator.h>
31 #include <ns3/string.h>
44 :
TestSuite(
"buildings-pathloss-test", SYSTEM)
56 "OH Urban Large city"),
65 "OH Urban small city"),
96 "COST231 Urban Large city"),
105 "COST231 Urban small city and suburban"),
164 "Okumura Hata Outdoor -> Indoor"),
177 "ITU1411 LOS Outdoor -> Indoor"),
192 "ITU1411 LOS Indoor -> Outdoor"),
207 "ITU1411 NLOS Indoor -> Outdoor"),
225 :
TestCase(
"LOSS calculation: " + name),
227 m_mobilityModelIndex1(
m1),
228 m_mobilityModelIndex2(
m2),
247 building1->SetBoundaries(
Box(-3000, -1, -4000, 4000.0, 0.0, 12));
248 building1->SetBuildingType(Building::Residential);
249 building1->SetExtWallsType(Building::ConcreteWithWindows);
250 building1->SetNFloors(3);
256 CreateObject<HybridBuildingsPropagationLossModel>();
258 propagationLossModel->SetAttribute(
"Environment",
EnumValue(
m_env));
261 propagationLossModel->SetAttribute(
"ShadowSigmaOutdoor",
DoubleValue(0.0));
262 propagationLossModel->SetAttribute(
"ShadowSigmaIndoor",
DoubleValue(0.0));
263 propagationLossModel->SetAttribute(
"ShadowSigmaExtWalls",
DoubleValue(0.0));
265 double loss = propagationLossModel->GetLoss(mma, mmb);
271 Simulator::Destroy();
289 double henbHeight = 10.0;
296 mm = CreateObject<ConstantPositionMobilityModel>();
301 mm = CreateObject<ConstantPositionMobilityModel>();
306 mm = CreateObject<ConstantPositionMobilityModel>();
311 mm = CreateObject<ConstantPositionMobilityModel>();
316 mm = CreateObject<ConstantPositionMobilityModel>();
321 mm = CreateObject<ConstantPositionMobilityModel>();
326 mm = CreateObject<ConstantPositionMobilityModel>();
331 mm = CreateObject<ConstantPositionMobilityModel>();
336 mm = CreateObject<ConstantPositionMobilityModel>();
341 mm = CreateObject<ConstantPositionMobilityModel>();
346 mm = CreateObject<ConstantPositionMobilityModel>();
356 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.
void SetPosition(const Vector &position)
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, TestDuration 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.
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.