A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
buildings-channel-condition-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering, New York
3 * University
4 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
5 * University of Padova
6 *
7 * SPDX-License-Identifier: GPL-2.0-only
8 */
9
10#ifndef BUILDINGS_CHANNEL_CONDITION_MODEL_H
11#define BUILDINGS_CHANNEL_CONDITION_MODEL_H
12
13#include "ns3/channel-condition-model.h"
14
15namespace ns3
16{
17
18class MobilityModel;
19
20/**
21 * \ingroup buildings
22 * \ingroup propagation
23 *
24 * \brief Determines the channel condition based on the buildings deployed in the
25 * scenario
26 *
27 * Code adapted from MmWave3gppBuildingsPropagationLossModel
28 */
30{
31 public:
32 /**
33 * Get the type ID.
34 * \brief Get the type ID.
35 * \return the object TypeId
36 */
37 static TypeId GetTypeId();
38
39 /**
40 * Constructor for the BuildingsChannelConditionModel class
41 */
43
44 /**
45 * Destructor for the BuildingsChannelConditionModel class
46 */
48
49 /**
50 * Computes the condition of the channel between a and b.
51 *
52 * \param a mobility model
53 * \param b mobility model
54 * \return the condition of the channel between a and b
55 */
57 Ptr<const MobilityModel> b) const override;
58
59 /**
60 * If this model uses objects of type RandomVariableStream,
61 * set the stream numbers to the integers starting with the offset
62 * 'stream'. Return the number of streams (possibly zero) that
63 * have been assigned.
64 *
65 * \param stream
66 * \return the number of stream indices assigned by this model
67 */
68 int64_t AssignStreams(int64_t stream) override;
69
70 private:
71 /**
72 * \brief Checks if the line of sight between position l1 and position l2 is
73 * blocked by a building.
74 *
75 * \param l1 position
76 * \param l2 position
77 * \return true if the line of sight is blocked, false otherwise
78 */
79 bool IsLineOfSightBlocked(const Vector& l1, const Vector& l2) const;
80};
81
82} // namespace ns3
83
84#endif /* BUILDINGS_CHANNEL_CONDITION_MODEL_H */
Determines the channel condition based on the buildings deployed in the scenario.
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b.
bool IsLineOfSightBlocked(const Vector &l1, const Vector &l2) const
Checks if the line of sight between position l1 and position l2 is blocked by a building.
BuildingsChannelConditionModel()
Constructor for the BuildingsChannelConditionModel class.
~BuildingsChannelConditionModel() override
Destructor for the BuildingsChannelConditionModel class.
Models the channel condition.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.