A Discrete-Event Network Simulator
API
three-gpp-v2v-channel-condition-model.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 SIGNET Lab, Department of Information Engineering,
4  * University of Padova
5  * Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation;
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 #ifndef THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
22 #define THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
23 
24 #include "ns3/channel-condition-model.h"
26 #include <functional>
27 
28 namespace ns3 {
29 
30 class MobilityModel;
31 
50 {
51 public:
57  static TypeId GetTypeId (void);
58 
63 
67  virtual ~ThreeGppV2vUrbanChannelConditionModel () override;
68 
69 private:
78  virtual double ComputePlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
79 
89  virtual double ComputePnlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
90 
92 };
93 
112 {
113 public:
119  static TypeId GetTypeId (void);
120 
125 
129  virtual ~ThreeGppV2vHighwayChannelConditionModel () override;
130 
131 private:
140  virtual double ComputePlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
141 
151  virtual double ComputePnlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
152 
166  std::function <Ptr<ChannelCondition> (Ptr<const MobilityModel>, Ptr<const MobilityModel>) > ComputeChCond;
167 
179 
191 
202 
204 };
205 
206 } // end ns3 namespace
207 
208 #endif /* THREE_GPP_V2V_CHANNEL_CONDITION_MODEL */
virtual ~ThreeGppV2vHighwayChannelConditionModel() override
Destructor for the ThreeGppV2vHighwayChannelConditionModel class.
Ptr< ChannelCondition > GetChCondWithNoBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Highway s...
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
std::function< Ptr< ChannelCondition >Ptr< const MobilityModel >, Ptr< const MobilityModel >) > ComputeChCond
The callback which is hooked to a method to compute channel condition.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
Ptr< ChannelCondition > GetChCondAndFixCallback(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Get the channel condition and redirect the callback ComputeChCond to GetChaCondWithBuildings or to Ge...
Base class for the 3GPP channel condition models.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
Ptr< ChannelCondition > GetChCondWithBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b using BuildingsChannelConditionModel.
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Urban sce...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Computes the channel condition for the V2V Highway scenario.
ThreeGppV2vHighwayChannelConditionModel()
Constructor for the ThreeGppV2vHighwayChannelConditionModel class.
virtual ~ThreeGppV2vUrbanChannelConditionModel() override
Destructor for the ThreeGppV2vUrbanChannelConditionModel class.
ThreeGppV2vUrbanChannelConditionModel()
Constructor for the ThreeGppV2vUrbanChannelConditionModel class.
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
a unique identifier for an interface.
Definition: type-id.h:58
Computes the channel condition for the V2V Urban scenario.