A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
isotropic-antenna-model.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#include "
isotropic-antenna-model.h
"
10
11
#include "
antenna-model.h
"
12
13
#include <ns3/double.h>
14
#include <ns3/log.h>
15
16
namespace
ns3
17
{
18
19
NS_LOG_COMPONENT_DEFINE
(
"IsotropicAntennaModel"
);
20
21
NS_OBJECT_ENSURE_REGISTERED
(IsotropicAntennaModel);
22
23
TypeId
24
IsotropicAntennaModel::GetTypeId
()
25
{
26
static
TypeId
tid =
TypeId
(
"ns3::IsotropicAntennaModel"
)
27
.
SetParent
<
AntennaModel
>()
28
.SetGroupName(
"Antenna"
)
29
.AddConstructor<
IsotropicAntennaModel
>()
30
.AddAttribute(
"Gain"
,
31
"The gain of the antenna in dB"
,
32
DoubleValue
(0),
33
MakeDoubleAccessor
(&
IsotropicAntennaModel::m_gainDb
),
34
MakeDoubleChecker<double>
());
35
return
tid;
36
}
37
38
IsotropicAntennaModel::IsotropicAntennaModel
()
39
{
40
NS_LOG_FUNCTION
(
this
);
41
}
42
43
double
44
IsotropicAntennaModel::GetGainDb
(
Angles
a)
45
{
46
NS_LOG_FUNCTION
(
this
<< a);
47
return
m_gainDb
;
48
}
49
50
}
// namespace ns3
antenna-model.h
ns3::Angles
Class holding the azimuth and inclination angles of spherical coordinates.
Definition
angles.h:107
ns3::AntennaModel
interface for antenna radiation pattern models
Definition
antenna-model.h:44
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition
double.h:31
ns3::IsotropicAntennaModel
Isotropic antenna model.
Definition
isotropic-antenna-model.h:27
ns3::IsotropicAntennaModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
isotropic-antenna-model.cc:24
ns3::IsotropicAntennaModel::m_gainDb
double m_gainDb
gain of the antenna in dB, in all directions
Definition
isotropic-antenna-model.h:45
ns3::IsotropicAntennaModel::IsotropicAntennaModel
IsotropicAntennaModel()
Definition
isotropic-antenna-model.cc:38
ns3::IsotropicAntennaModel::GetGainDb
double GetGainDb(Angles a) override
this method is expected to be re-implemented by each antenna model
Definition
isotropic-antenna-model.cc:44
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::MakeDoubleChecker
Ptr< const AttributeChecker > MakeDoubleChecker()
Definition
double.h:82
ns3::MakeDoubleAccessor
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition
double.h:32
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
isotropic-antenna-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
antenna
model
isotropic-antenna-model.cc
Generated on Tue Dec 10 2024 18:20:36 for ns-3 by
1.11.0