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
lte-simple-spectrum-phy.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Piotr Gawlowicz
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7
*
8
*/
9
10
#ifndef LTE_SIMPLE_SPECTRUM_PHY_H
11
#define LTE_SIMPLE_SPECTRUM_PHY_H
12
13
#include <ns3/event-id.h>
14
#include <ns3/mobility-model.h>
15
#include <ns3/net-device.h>
16
#include <ns3/spectrum-channel.h>
17
#include <ns3/spectrum-phy.h>
18
#include <ns3/spectrum-value.h>
19
#include <ns3/traced-callback.h>
20
21
namespace
ns3
22
{
23
24
/**
25
* \ingroup lte
26
*
27
* The LteSimpleSpectrumPhy models the physical layer of LTE
28
* This class is used to test Frequency Reuse Algorithms,
29
* it allow to get SpectrumValue from channel and pass it to
30
* test script by trace mechanism.
31
* When m_cellId is 0, all received signals will be traced,
32
* if m_cellId > 0, only signals from specified Cell will be traced.
33
*
34
*/
35
36
class
LteSimpleSpectrumPhy
:
public
SpectrumPhy
37
{
38
public
:
39
LteSimpleSpectrumPhy
();
40
~LteSimpleSpectrumPhy
()
override
;
41
42
/**
43
* \brief Get the type ID.
44
* \return the object TypeId
45
*/
46
static
TypeId
GetTypeId
();
47
// inherited from Object
48
void
DoDispose
()
override
;
49
50
// inherited from SpectrumPhy
51
void
SetChannel
(
Ptr<SpectrumChannel>
c)
override
;
52
void
SetMobility
(
Ptr<MobilityModel>
m)
override
;
53
void
SetDevice
(
Ptr<NetDevice>
d)
override
;
54
Ptr<MobilityModel>
GetMobility
()
const override
;
55
Ptr<NetDevice>
GetDevice
()
const override
;
56
Ptr<const SpectrumModel>
GetRxSpectrumModel
()
const override
;
57
Ptr<Object>
GetAntenna
()
const override
;
58
void
StartRx
(
Ptr<SpectrumSignalParameters>
params)
override
;
59
60
/**
61
* \brief Set receive spectrum model.
62
* \param model the spectrum model
63
*/
64
void
SetRxSpectrumModel
(
Ptr<const SpectrumModel>
model);
65
66
/**
67
* \brief Set cell ID.
68
* \param cellId the cell ID
69
*/
70
void
SetCellId
(uint16_t cellId);
71
72
private
:
73
Ptr<MobilityModel>
m_mobility
;
///< the mobility model
74
Ptr<AntennaModel>
m_antenna
;
///< the antenna model
75
Ptr<NetDevice>
m_device
;
///< the device
76
Ptr<SpectrumChannel>
m_channel
;
///< the channel
77
Ptr<const SpectrumModel>
m_rxSpectrumModel
;
///< the spectrum model
78
79
uint16_t
m_cellId
;
///< the cell ID
80
81
TracedCallback<Ptr<const SpectrumValue>
>
m_rxStart
;
///< receive start trace callback function
82
};
83
84
}
// namespace ns3
85
86
#endif
/* LTE_SIMPLE_SPECTRUM_PHY_H */
ns3::LteSimpleSpectrumPhy
The LteSimpleSpectrumPhy models the physical layer of LTE This class is used to test Frequency Reuse ...
Definition
lte-simple-spectrum-phy.h:37
ns3::LteSimpleSpectrumPhy::~LteSimpleSpectrumPhy
~LteSimpleSpectrumPhy() override
Definition
lte-simple-spectrum-phy.cc:35
ns3::LteSimpleSpectrumPhy::SetMobility
void SetMobility(Ptr< MobilityModel > m) override
Set the mobility model associated with this device.
Definition
lte-simple-spectrum-phy.cc:85
ns3::LteSimpleSpectrumPhy::GetDevice
Ptr< NetDevice > GetDevice() const override
Get the associated NetDevice instance.
Definition
lte-simple-spectrum-phy.cc:64
ns3::LteSimpleSpectrumPhy::m_channel
Ptr< SpectrumChannel > m_channel
the channel
Definition
lte-simple-spectrum-phy.h:76
ns3::LteSimpleSpectrumPhy::SetRxSpectrumModel
void SetRxSpectrumModel(Ptr< const SpectrumModel > model)
Set receive spectrum model.
Definition
lte-simple-spectrum-phy.cc:140
ns3::LteSimpleSpectrumPhy::DoDispose
void DoDispose() override
Destructor implementation.
Definition
lte-simple-spectrum-phy.cc:41
ns3::LteSimpleSpectrumPhy::GetMobility
Ptr< MobilityModel > GetMobility() const override
Get the associated MobilityModel instance.
Definition
lte-simple-spectrum-phy.cc:71
ns3::LteSimpleSpectrumPhy::GetRxSpectrumModel
Ptr< const SpectrumModel > GetRxSpectrumModel() const override
Definition
lte-simple-spectrum-phy.cc:99
ns3::LteSimpleSpectrumPhy::m_antenna
Ptr< AntennaModel > m_antenna
the antenna model
Definition
lte-simple-spectrum-phy.h:74
ns3::LteSimpleSpectrumPhy::SetDevice
void SetDevice(Ptr< NetDevice > d) override
Set the associated NetDevice instance.
Definition
lte-simple-spectrum-phy.cc:78
ns3::LteSimpleSpectrumPhy::StartRx
void StartRx(Ptr< SpectrumSignalParameters > params) override
Notify the SpectrumPhy instance of an incoming signal.
Definition
lte-simple-spectrum-phy.cc:111
ns3::LteSimpleSpectrumPhy::GetAntenna
Ptr< Object > GetAntenna() const override
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Definition
lte-simple-spectrum-phy.cc:105
ns3::LteSimpleSpectrumPhy::m_device
Ptr< NetDevice > m_device
the device
Definition
lte-simple-spectrum-phy.h:75
ns3::LteSimpleSpectrumPhy::LteSimpleSpectrumPhy
LteSimpleSpectrumPhy()
Definition
lte-simple-spectrum-phy.cc:30
ns3::LteSimpleSpectrumPhy::m_rxSpectrumModel
Ptr< const SpectrumModel > m_rxSpectrumModel
the spectrum model
Definition
lte-simple-spectrum-phy.h:77
ns3::LteSimpleSpectrumPhy::m_rxStart
TracedCallback< Ptr< const SpectrumValue > > m_rxStart
receive start trace callback function
Definition
lte-simple-spectrum-phy.h:81
ns3::LteSimpleSpectrumPhy::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-simple-spectrum-phy.cc:51
ns3::LteSimpleSpectrumPhy::m_mobility
Ptr< MobilityModel > m_mobility
the mobility model
Definition
lte-simple-spectrum-phy.h:73
ns3::LteSimpleSpectrumPhy::SetCellId
void SetCellId(uint16_t cellId)
Set cell ID.
Definition
lte-simple-spectrum-phy.cc:147
ns3::LteSimpleSpectrumPhy::SetChannel
void SetChannel(Ptr< SpectrumChannel > c) override
Set the channel attached to this device.
Definition
lte-simple-spectrum-phy.cc:92
ns3::LteSimpleSpectrumPhy::m_cellId
uint16_t m_cellId
the cell ID
Definition
lte-simple-spectrum-phy.h:79
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SpectrumPhy
Abstract base class for Spectrum-aware PHY layers.
Definition
spectrum-phy.h:35
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition
traced-callback.h:43
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
test
lte-simple-spectrum-phy.h
Generated on Fri Nov 8 2024 13:59:03 for ns-3 by
1.11.0