A Discrete-Event Network Simulator
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
21namespace 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
37{
38 public:
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;
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 */
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
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 */
The LteSimpleSpectrumPhy models the physical layer of LTE This class is used to test Frequency Reuse ...
void SetMobility(Ptr< MobilityModel > m) override
Set the mobility model associated with this device.
Ptr< NetDevice > GetDevice() const override
Get the associated NetDevice instance.
Ptr< SpectrumChannel > m_channel
the channel
void SetRxSpectrumModel(Ptr< const SpectrumModel > model)
Set receive spectrum model.
void DoDispose() override
Destructor implementation.
Ptr< MobilityModel > GetMobility() const override
Get the associated MobilityModel instance.
Ptr< const SpectrumModel > GetRxSpectrumModel() const override
Ptr< AntennaModel > m_antenna
the antenna model
void SetDevice(Ptr< NetDevice > d) override
Set the associated NetDevice instance.
void StartRx(Ptr< SpectrumSignalParameters > params) override
Notify the SpectrumPhy instance of an incoming signal.
Ptr< Object > GetAntenna() const override
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Ptr< NetDevice > m_device
the device
Ptr< const SpectrumModel > m_rxSpectrumModel
the spectrum model
TracedCallback< Ptr< const SpectrumValue > > m_rxStart
receive start trace callback function
static TypeId GetTypeId()
Get the type ID.
Ptr< MobilityModel > m_mobility
the mobility model
void SetCellId(uint16_t cellId)
Set cell ID.
void SetChannel(Ptr< SpectrumChannel > c) override
Set the channel attached to this device.
Smart pointer class similar to boost::intrusive_ptr.
Abstract base class for Spectrum-aware PHY layers.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.