satellite-signal-parameters.cc
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 
24 
25 #include "satellite-phy-tx.h"
26 
27 #include <ns3/log.h>
28 #include <ns3/ptr.h>
29 
30 NS_LOG_COMPONENT_DEFINE("SatSignalParameters");
31 
32 namespace ns3
33 {
34 
36  : m_satId(),
37  m_beamId(),
38  m_carrierId(),
39  m_carrierFreq_hz(),
40  m_duration(),
41  m_txPower_W(),
42  m_rxPower_W(),
43  m_phyTx(),
44  m_channelType()
45 {
46  NS_LOG_FUNCTION(this);
47  m_ifParams = CreateObject<SatInterferenceParameters>();
48 }
49 
51 {
52  for (PacketsInBurst_t::const_iterator i = p.m_packetsInBurst.begin();
53  i != p.m_packetsInBurst.end();
54  i++)
55  {
56  m_packetsInBurst.push_back((*i)->Copy());
57  }
58 
59  m_satId = p.m_satId;
60  m_beamId = p.m_beamId;
63  m_phyTx = p.m_phyTx;
76 }
77 
79 {
80  NS_LOG_FUNCTION(this);
81  m_ifParams = nullptr;
82 }
83 
84 Ptr<SatSignalParameters>
86 {
87  NS_LOG_FUNCTION(this);
88 
89  Ptr<SatSignalParameters> p(new SatSignalParameters(*this), false);
90  return p;
91 }
92 
93 TypeId
95 {
96  static TypeId tid = TypeId("ns3::SatSignalParameters").SetParent<Object>();
97  return tid;
98 }
99 
100 void
102  double rxNoisePowerW,
103  double rxAciIfPowerW,
104  double rxExtNoisePowerW)
105 {
106  m_ifParams->m_rxPowerInSatellite_W = rxPowerW;
107  m_ifParams->m_rxNoisePowerInSatellite_W = rxNoisePowerW;
108  m_ifParams->m_rxAciIfPowerInSatellite_W = rxAciIfPowerW;
109  m_ifParams->m_rxExtNoisePowerInSatellite_W = rxExtNoisePowerW;
110 }
111 
112 void
113 SatSignalParameters::SetSinr(double sinr, double additionalInterference)
114 {
115  m_ifParams->m_sinr = sinr;
116  m_ifParams->m_additionalInterference = additionalInterference;
117  m_ifParams->m_sinrComputed = true;
118 }
119 
121 {
122 }
123 
124 } // namespace ns3
Actual physical layer transmission container.
Ptr< SatPhyTx > m_phyTx
The SatPhyTx instance that is making the transmission.
static TypeId GetTypeId(void)
Get the type ID.
double m_txPower_W
The TX power in Watts.
SatSignalParameters()
default constructor
Time m_duration
The duration of the packet transmission.
void SetRxPowersInSatellite(double rxPowerW, double rxNoisePowerW, double rxAciIfPowerW, double rxExtNoisePowerW)
Set various power after receiving the packet in the satellite.
uint32_t m_carrierId
The carrier for the packet transmission.
double m_rxPower_W
The RX power in Watts.
Ptr< SatSignalParameters > Copy()
uint32_t m_satId
The sat for the packet transmission.
uint32_t m_beamId
The beam for the packet transmission.
PacketsInBurst_t m_packetsInBurst
The packets being transmitted with this signal i.e.
double m_carrierFreq_hz
The carrier center frequency for the packet transmission.
void SetSinr(double sinr, double additionalInterference)
Set computed SINR.
Ptr< SatInterferenceParameters > m_ifParams
txInfo_s m_txInfo
Transmission information including packet type, modcod and waveform ID.
SatEnums::ChannelType_t m_channelType
The SatChannel instance received the packet.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.