11#include "ns3/double.h"
12#include "ns3/geographic-positions.h"
13#include "ns3/isotropic-antenna-model.h"
15#include "ns3/mobility-helper.h"
16#include "ns3/position-allocator.h"
17#include "ns3/uinteger.h"
32 0, 0, 54
e6, 60
e6, 66
e6, 76
e6, 82
e6, 174
e6, 180
e6, 186
e6, 192
e6, 198
e6,
33 204
e6, 210
e6, 470
e6, 476
e6, 482
e6, 488
e6, 494
e6, 500
e6, 506
e6, 512
e6, 518
e6, 524
e6,
34 530
e6, 536
e6, 542
e6, 548
e6, 554
e6, 560
e6, 566
e6, 572
e6, 578
e6, 584
e6, 590
e6, 596
e6,
35 602
e6, 608
e6, 614
e6, 620
e6, 626
e6, 632
e6, 638
e6, 644
e6, 650
e6, 656
e6, 662
e6, 668
e6,
36 674
e6, 680
e6, 686
e6, 692
e6, 698
e6, 704
e6, 710
e6, 716
e6, 722
e6, 728
e6, 734
e6, 740
e6,
37 746
e6, 752
e6, 758
e6, 764
e6, 770
e6, 776
e6, 782
e6, 788
e6, 794
e6, 800
e6, 806
e6, 812
e6,
38 818
e6, 824
e6, 830
e6, 836
e6, 842
e6, 848
e6, 854
e6, 860
e6, 866
e6, 872
e6, 878
e6, 884
e6,
42 0, 0, 60
e6, 66
e6, 72
e6, 82
e6, 88
e6, 180
e6, 186
e6, 192
e6, 198
e6, 204
e6,
43 210
e6, 216
e6, 476
e6, 482
e6, 488
e6, 494
e6, 500
e6, 506
e6, 512
e6, 518
e6, 524
e6, 530
e6,
44 536
e6, 542
e6, 548
e6, 554
e6, 560
e6, 566
e6, 572
e6, 578
e6, 584
e6, 590
e6, 596
e6, 602
e6,
45 608
e6, 614
e6, 620
e6, 626
e6, 632
e6, 638
e6, 644
e6, 650
e6, 656
e6, 662
e6, 668
e6, 674
e6,
46 680
e6, 686
e6, 692
e6, 698
e6, 704
e6, 710
e6, 716
e6, 722
e6, 728
e6, 734
e6, 740
e6, 746
e6,
47 752
e6, 758
e6, 764
e6, 770
e6, 776
e6, 782
e6, 788
e6, 794
e6, 800
e6, 806
e6, 812
e6, 818
e6,
48 824
e6, 830
e6, 836
e6, 842
e6, 848
e6, 854
e6, 860
e6, 866
e6, 872
e6, 878
e6, 884
e6, 890
e6,
55 0, 0, 0, 0, 0, 174
e6, 181
e6, 188
e6, 195
e6, 202
e6, 209
e6, 216
e6,
56 223
e6, 0, 0, 0, 0, 0, 0, 0, 0, 470
e6, 478
e6, 486
e6,
57 494
e6, 502
e6, 510
e6, 518
e6, 526
e6, 534
e6, 542
e6, 550
e6, 558
e6, 566
e6, 574
e6, 582
e6,
58 590
e6, 598
e6, 606
e6, 614
e6, 622
e6, 630
e6, 638
e6, 646
e6, 654
e6, 662
e6, 670
e6, 678
e6,
59 686
e6, 694
e6, 702
e6, 710
e6, 718
e6, 726
e6, 734
e6, 742
e6, 750
e6, 758
e6, 766
e6, 774
e6,
60 782
e6, 790
e6, 798
e6, 806
e6, 814
e6, 822
e6, 830
e6, 838
e6, 846
e6, 854
e6,
64 0, 0, 0, 0, 0, 181
e6, 188
e6, 195
e6, 202
e6, 209
e6, 216
e6, 223
e6,
65 230
e6, 0, 0, 0, 0, 0, 0, 0, 0, 478
e6, 486
e6, 494
e6,
66 502
e6, 510
e6, 518
e6, 526
e6, 534
e6, 542
e6, 550
e6, 558
e6, 566
e6, 574
e6, 582
e6, 590
e6,
67 598
e6, 606
e6, 614
e6, 622
e6, 630
e6, 638
e6, 646
e6, 654
e6, 662
e6, 670
e6, 678
e6, 686
e6,
68 694
e6, 702
e6, 710
e6, 718
e6, 726
e6, 734
e6, 742
e6, 750
e6, 758
e6, 766
e6, 774
e6, 782
e6,
69 790
e6, 798
e6, 806
e6, 814
e6, 822
e6, 830
e6, 838
e6, 846
e6, 854
e6, 862
e6,
76 0, 90
e6, 96
e6, 102
e6, 170
e6, 176
e6, 182
e6, 188
e6, 192
e6, 198
e6, 204
e6, 210
e6, 216
e6,
77 470
e6, 476
e6, 482
e6, 488
e6, 494
e6, 500
e6, 506
e6, 512
e6, 518
e6, 524
e6, 530
e6, 536
e6, 542
e6,
78 548
e6, 554
e6, 560
e6, 566
e6, 572
e6, 578
e6, 584
e6, 590
e6, 596
e6, 602
e6, 608
e6, 614
e6, 620
e6,
79 626
e6, 632
e6, 638
e6, 644
e6, 650
e6, 656
e6, 662
e6, 668
e6, 674
e6, 680
e6, 686
e6, 692
e6, 698
e6,
80 704
e6, 710
e6, 716
e6, 722
e6, 728
e6, 734
e6, 740
e6, 746
e6, 752
e6, 758
e6, 764
e6,
84 0, 96
e6, 102
e6, 108
e6, 176
e6, 182
e6, 188
e6, 194
e6, 198
e6, 204
e6, 210
e6, 216
e6, 222
e6,
85 476
e6, 482
e6, 488
e6, 494
e6, 500
e6, 506
e6, 512
e6, 518
e6, 524
e6, 530
e6, 536
e6, 542
e6, 548
e6,
86 554
e6, 560
e6, 566
e6, 572
e6, 578
e6, 584
e6, 590
e6, 596
e6, 602
e6, 608
e6, 614
e6, 620
e6, 626
e6,
87 632
e6, 638
e6, 644
e6, 650
e6, 656
e6, 662
e6, 668
e6, 674
e6, 680
e6, 686
e6, 692
e6, 698
e6, 704
e6,
88 710
e6, 716
e6, 722
e6, 728
e6, 734
e6, 740
e6, 746
e6, 752
e6, 758
e6, 764
e6, 770
e6,
140 node->AddDevice(dev);
152 double startFrequency;
157 "channel number " << channelNumber <<
" does not exist for this region");
159 "channel number " << channelNumber <<
" does not exist for this region");
167 "channel number " << channelNumber <<
" does not exist for this region");
169 "channel number " << channelNumber <<
" does not exist for this region");
177 "channel number " << channelNumber <<
" does not exist for this region");
179 "channel number " << channelNumber <<
" does not exist for this region");
189 phy->SetAttribute(
"StartFrequency",
DoubleValue(startFrequency));
202 node->AddDevice(dev);
222 phy->GetAttribute(
"StartFrequency", startFrequency);
224 phy->SetAttribute(
"StartFrequency",
237 node->AddDevice(dev);
248 uint16_t channelNumber)
252 double startFrequency;
264 <<
" does not exist for this region");
267 <<
" does not exist for this region");
276 <<
" does not exist for this region");
279 <<
" does not exist for this region");
288 <<
" does not exist for this region");
291 <<
" does not exist for this region");
298 phy->SetAttribute(
"StartFrequency",
DoubleValue(startFrequency));
311 node->AddDevice(dev);
448 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
Hold a value for an Attribute.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
static std::list< Vector > RandCartesianPointsAroundGeographicPoint(double originLatitude, double originLongitude, double maxAltitude, int numPoints, double maxDistFromOrigin, Ptr< UniformRandomVariable > uniRand)
Generates uniformly distributed random points (in ECEF Cartesian coordinates) within a given altitude...
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
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< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
std::list< int > GenerateRegionalTransmitterIndices(const double startFrequencies[], const int startFrequenciesLength, Density density)
Generates random indices of given region frequency array (ignoring indices referring to invalid chann...
TvSpectrumTransmitterHelper()
Default constructor.
void SetChannel(Ptr< SpectrumChannel > c)
Set the spectrum channel for the device(s) to transmit on.
NetDeviceContainer InstallAdjacent(NodeContainer nodes)
Set up and start the TV Transmitter's transmission on the spectrum channel.
Density
density of location that TV transmitters are being set up in
void InstallRandomRegionalTransmitters(Region region, std::list< int > transmitterIndicesToCreate, std::list< Vector > transmitterLocations)
Installs each randomly generated regional TV transmitter.
Region
geographical region that TV transmitters are being set up in
int GetRandomNumTransmitters(Density density, uint32_t numChannels)
Randomly generates the number of TV transmitters to be created based on given density and number of p...
virtual ~TvSpectrumTransmitterHelper()
Destructor.
Ptr< UniformRandomVariable > m_uniRand
Object to generate uniform random numbers.
int64_t AssignStreams(int64_t streamNum)
Assigns the stream number for the uniform random number generator to use.
ObjectFactory m_factory
Object factory for attribute setting.
void CreateRegionalTvTransmitters(Region region, Density density, double originLatitude, double originLongitude, double maxAltitude, double maxRadius)
Generates and installs (starts transmission on the spectrum channel) a random number of TV transmitte...
void SetAttribute(std::string name, const AttributeValue &val)
Set attribute for each TvSpectrumTransmitter instance to be created.
NetDeviceContainer Install(NodeContainer nodes)
Set up and start the TV Transmitter's transmission on the spectrum channel.
Ptr< SpectrumChannel > m_channel
Pointer to spectrum channel object.
SpectrumPhy implementation that creates a customizable TV transmitter which transmits a PSD spectrum ...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#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 ",...
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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const double northAmericaEndFrequencies[84]
NORTH AMERICA end frequencies.
const int japanArrayLength
JAPAN: 63 elements (index 0 - 62); valid channels = 1 - 62.
const double europeEndFrequencies[70]
EUROPE end frequencies.
const int northAmericaArrayLength
NORTH AMERICA: 84 elements (index 0 - 83); valid channels = 2 - 83.
const double japanStartFrequencies[63]
JAPAN start frequencies.
const double europeStartFrequencies[70]
EUROPE start frequencies.
const double japanEndFrequencies[63]
JAPAN end frequencies.
const double northAmericaStartFrequencies[84]
NORTH AMERICA start frequencies.
const int europeArrayLength
EUROPE: 70 elements (index 0 - 69); valid channels = 5 - 12, 21 - 69.