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 #include <stdint.h>
31 
32 NS_LOG_COMPONENT_DEFINE("SatSignalParameters");
33 
34 namespace ns3
35 {
36 
38  : m_satId(),
39  m_beamId(),
40  m_carrierId(),
41  m_carrierFreq_hz(),
42  m_duration(),
43  m_txPower_W(),
44  m_rxPower_W(),
45  m_phyTx(),
46  m_channelType()
47 {
48  NS_LOG_FUNCTION(this);
49  m_ifParams = CreateObject<SatInterferenceParameters>();
50 }
51 
53 {
54  for (PacketsInBurst_t::const_iterator i = p.m_packetsInBurst.begin();
55  i != p.m_packetsInBurst.end();
56  i++)
57  {
58  m_packetsInBurst.push_back((*i)->Copy());
59  }
60 
61  m_satId = p.m_satId;
62  m_beamId = p.m_beamId;
65  m_phyTx = p.m_phyTx;
78 }
79 
81 {
82  NS_LOG_FUNCTION(this);
83  m_ifParams = nullptr;
84 }
85 
86 Ptr<SatSignalParameters>
88 {
89  NS_LOG_FUNCTION(this);
90 
91  Ptr<SatSignalParameters> p(new SatSignalParameters(*this), false);
92  return p;
93 }
94 
95 TypeId
97 {
98  static TypeId tid = TypeId("ns3::SatSignalParameters").SetParent<Object>();
99  return tid;
100 }
101 
102 void
104  double rxNoisePowerW,
105  double rxAciIfPowerW,
106  double rxExtNoisePowerW)
107 {
108  m_ifParams->m_rxPowerInSatellite_W = rxPowerW;
109  m_ifParams->m_rxNoisePowerInSatellite_W = rxNoisePowerW;
110  m_ifParams->m_rxAciIfPowerInSatellite_W = rxAciIfPowerW;
111  m_ifParams->m_rxExtNoisePowerInSatellite_W = rxExtNoisePowerW;
112 }
113 
114 void
115 SatSignalParameters::SetSinr(double sinr, double additionalInterference)
116 {
117  m_ifParams->m_sinr = sinr;
118  m_ifParams->m_additionalInterference = additionalInterference;
119  m_ifParams->m_sinrComputed = true;
120 }
121 
123 {
124 }
125 
126 } // 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.