Loading...
Searching...
No Matches
satellite-phy-rx.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 Magister Solutions Ltd.
4 * Copyright (c) 2018 CNES
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author: Jani Puttonen <jani.puttonen@magister.fi>
20 * Author: Mathias Ettinger <mettinger@toulouse.viveris.fr>
21 */
22
23#ifndef SATELLITE_PHY_RX_H
24#define SATELLITE_PHY_RX_H
25
32
33#include "ns3/mobility-model.h"
34#include "ns3/nstime.h"
35#include "ns3/packet.h"
36
37#include <stdint.h>
38#include <vector>
39
40namespace ns3
41{
42
44class SatPhyRxCarrier;
49
56class SatPhyRx : public Object
57{
58 public:
62 SatPhyRx();
63
67 virtual ~SatPhyRx();
68
72 static TypeId GetTypeId(void);
73
77 virtual void DoDispose();
78
79 void SetMobility(Ptr<MobilityModel> m);
80 Ptr<MobilityModel> GetMobility();
81
82 /*
83 * Set the receive antenna gain pattern.
84 * @param agp antenna gain pattern
85 * @param mobility mobility model of satellite
86 */
87 void SetAntennaGainPattern(Ptr<SatAntennaGainPattern> agp, Ptr<SatMobilityModel> mobility);
88
89 void SetDevice(Ptr<NetDevice> d);
90 Ptr<NetDevice> GetDevice();
91
96 void SetMaxAntennaGain_Db(double gain_Db);
97
105 double GetAntennaGain(Ptr<MobilityModel> mobility);
106
111 void SetDefaultFadingValue(double fadingValue);
112
119 double GetFadingValue(Address macAddress, SatEnums::ChannelType_t channelType);
120
125 void SetFadingContainer(Ptr<SatBaseFading> fadingContainer);
126
131 void SetAntennaLoss_Db(double loss_Db);
132
138 double GetLosses();
139
144 void SetSatId(uint32_t satId);
145
150 uint32_t GetSatId() const;
151
156 void SetBeamId(uint32_t beamId);
157
162 uint32_t GetBeamId() const;
163
168 void ConfigurePhyRxCarriers(Ptr<SatPhyRxCarrierConf> carrierConf,
169 Ptr<SatSuperframeConf> superFrameConf);
170
175 virtual void StartRx(Ptr<SatSignalParameters> rxParams);
176
182 typedef Callback<void, Ptr<SatSignalParameters>, bool> ReceiveCallback;
183
192 typedef Callback<void, uint32_t, uint32_t, Address, Address, double, bool> CnoCallback;
193
201 typedef Callback<void, uint32_t, uint32_t, uint32_t, uint8_t, double>
203
209
215
221
226 Mac48Address GetAddress() const;
227
232 void SetNodeInfo(const Ptr<SatNodeInfo> nodeInfo);
233
237 void BeginEndScheduling();
238
243 double GetRxTemperatureK(Ptr<SatSignalParameters> rxParams);
244
245 private:
246 Ptr<MobilityModel> m_mobility;
247 Ptr<NetDevice> m_device;
248
249 uint32_t m_satId;
250 uint32_t m_beamId;
251 Mac48Address m_macAddress;
252
253 /*
254 * Receive antenna gain pattern
255 */
256 Ptr<SatAntennaGainPattern> m_antennaGainPattern;
257
258 /*
259 * Satellite mobility model
260 */
261 Ptr<SatMobilityModel> m_satMobility;
262
267
272
273 // A SatPhyRxCarrier object for receiving packets from each carrier
274 std::vector<Ptr<SatPhyRxCarrier>> m_rxCarriers;
275
279 Ptr<SatBaseFading> m_fadingContainer;
280
285};
286
287} // namespace ns3
288
289#endif /* SATELLITE_PHY_RX_H */
ChannelType_t
Types of channel.
Information of beam users liken UTs and their users.
Base class for all SatPhyRxCarriers.
Inherited the functionality of ground station SatPhyRxCarriers and extended it with CRDSA functionali...
Inherited the base functionality of SatPhyRxCarriers for ground station nodes.
Inherited the functionality of ground station SatPhyRxCarriers and extended it with CRDSA functionali...
void ConfigurePhyRxCarriers(Ptr< SatPhyRxCarrierConf > carrierConf, Ptr< SatSuperframeConf > superFrameConf)
uint32_t GetSatId() const
Get satellite id of this receiver.
Ptr< SatAntennaGainPattern > m_antennaGainPattern
virtual void DoDispose()
Dispose of this class instance.
SatPhyRx()
Default constructor.
void SetFadingContainer(Ptr< SatBaseFading > fadingContainer)
Set fading container.
void SetAntennaLoss_Db(double loss_Db)
Set the Antenna loss in Db.
void SetAntennaGainPattern(Ptr< SatAntennaGainPattern > agp, Ptr< SatMobilityModel > mobility)
void SetMaxAntennaGain_Db(double gain_Db)
Set the maximum Antenna gain in Db.
void SetDevice(Ptr< NetDevice > d)
Callback< void, uint32_t, uint32_t, Address, Address, double, bool > CnoCallback
virtual ~SatPhyRx()
Destructor for SatPhyRx.
double GetFadingValue(Address macAddress, SatEnums::ChannelType_t channelType)
Get fading value.
double GetRxTemperatureK(Ptr< SatSignalParameters > rxParams)
Method for querying the temperature of the chosen carrier.
void BeginEndScheduling()
Begin frame/window end scheduling for processes utilizing frame length as interval.
double m_maxAntennaGain
Configured maximum antenna gain in linear.
void SetSatId(uint32_t satId)
Set the satellite id for all the transmissions from this SatPhyTx.
void SetMobility(Ptr< MobilityModel > m)
Mac48Address m_macAddress
Mac48Address GetAddress() const
Get MAC address of this PHY/MAC.
void SetAverageNormalizedOfferedLoadCallback(SatPhyRx::AverageNormalizedOfferedLoadCallback cb)
Set average normalized offered load callback.
void SetCnoCallback(SatPhyRx::CnoCallback cb)
Set C/N0 receiver.
std::vector< Ptr< SatPhyRxCarrier > > m_rxCarriers
void SetDefaultFadingValue(double fadingValue)
Function for setting the default fading value.
double GetAntennaGain(Ptr< MobilityModel > mobility)
Get antenna gain based on position or in case that antenna pattern is not configured,...
Ptr< NetDevice > m_device
double m_defaultFadingValue
Default fading value.
Ptr< MobilityModel > m_mobility
Callback< void, Ptr< SatSignalParameters >, bool > ReceiveCallback
void SetReceiveCallback(SatPhyRx::ReceiveCallback cb)
Set the upper layer receive callback.
virtual void StartRx(Ptr< SatSignalParameters > rxParams)
Start packet reception from the SatChannel.
double GetLosses()
Get configures RX losses, currently only antenna loss used.
Ptr< MobilityModel > GetMobility()
void SetBeamId(uint32_t beamId)
Set the beam id for all the transmissions from this SatPhyTx.
Ptr< SatBaseFading > m_fadingContainer
Fading container for fading model.
void SetNodeInfo(const Ptr< SatNodeInfo > nodeInfo)
Set the node info class.
double m_antennaLoss
Configured antenna loss in linear.
Callback< void, uint32_t, uint32_t, uint32_t, uint8_t, double > AverageNormalizedOfferedLoadCallback
Ptr< SatMobilityModel > m_satMobility
uint32_t GetBeamId() const
Get beam id of this receiver.
Ptr< NetDevice > GetDevice()
static TypeId GetTypeId(void)
inherited from Object
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.