Loading...
Searching...
No Matches
satellite-orbiter-user-phy.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 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Sami Rantanen <sami.rantanen@magister.fi>
19 * Bastien Tauran <bastien.tauran@viveris.fr>
20 */
21
22#ifndef SATELLITE_ORBITER_USER_PHY_H
23#define SATELLITE_ORBITER_USER_PHY_H
24
26#include "satellite-phy.h"
28
29#include "ns3/address.h"
30#include "ns3/nstime.h"
31#include "ns3/object.h"
32#include "ns3/packet.h"
33#include "ns3/ptr.h"
34
35#include <queue>
36#include <stdint.h>
37#include <tuple>
38
39namespace ns3
40{
41
42class SatPhyRxCarrier;
47
55{
56 public:
61
63 Ptr<SatLinkResults> linkResults,
64 SatPhyRxCarrierConf::RxCarrierCreateParams_s parameters,
65 Ptr<SatSuperframeConf> superFrameConf);
66
75 virtual void NotifyConstructionCompleted() override;
76
80 virtual ~SatOrbiterUserPhy();
81
85 static TypeId GetTypeId(void);
86 virtual void DoInitialize(void);
87
91 virtual void DoDispose(void);
92
97 virtual void SendPduWithParams(Ptr<SatSignalParameters> rxParams);
98
108 virtual void Receive(Ptr<SatSignalParameters> rxParams, bool phyError);
109
115 virtual double GetAdditionalInterference();
116
122 typedef void (*QueueSizeCallback)(uint32_t size, const Address& from);
123
127 typedef Callback<bool, Ptr<SatControlMessage>, const Address&, Ptr<SatSignalParameters>>
129
134
139
140 protected:
145 virtual void RxTraces(SatPhy::PacketContainer_t packets);
146
152
158
162 TracedCallback<uint32_t, const Address&> m_queueSizeBytesTrace;
163
167 TracedCallback<uint32_t, const Address&> m_queueSizePacketsTrace;
168
169 private:
173 Ptr<SatLinkResults> m_linkResults;
174
178 SatPhyRxCarrierConf::RxCarrierCreateParams_s m_parameters;
179
183 Ptr<SatSuperframeConf> m_superFrameConf;
184
188 void SendFromQueue();
189
193 void EndTx();
194
201
206
211
216
221
226
231
236 std::queue<std::tuple<Ptr<SatSignalParameters>, uint32_t, uint32_t>> m_queue;
237
242
247
252
257};
258
259} // namespace ns3
260
261#endif /* SATELLITE_ORBITER_USER_PHY_H */
SatLinkDir_t
Link direction used for packet tracing.
RegenerationMode_t
The regeneration mode used in satellites.
TracedCallback< uint32_t, const Address & > m_queueSizePacketsTrace
Traced callback to monitor RTN feeder queue size in packets.
void SetSendControlMsgToFeederCallback(SendControlMsgToFeederCallback cb)
Set SendControlMsgToFeederCallback.
SatOrbiterUserPhy::SendControlMsgToFeederCallback m_txCtrlFeederCallback
Callback to send ctrl packet on orbiter feeder.
double m_otherSysInterferenceCOverI
Other system interference in linear.
uint32_t m_queueSizeBytes
Size of FIFO queue in bytes.
Ptr< SatSuperframeConf > m_superFrameConf
Super frame cofiguration.
virtual void SendPduWithParams(Ptr< SatSignalParameters > rxParams)
Send Pdu to the PHY tx module (for satellite switch packet forwarding).
virtual void DoInitialize(void)
Initialization of SatPhy.
uint32_t m_queueSizeMax
Maximum size of FIFO m_queue in bytes.
Address GetE2EDestinationAddress(SatPhy::PacketContainer_t packets)
Get destination address of packets.
virtual void DoDispose(void)
Dispose of this class instance.
virtual void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
virtual double GetAdditionalInterference()
Get additional interference, used to compute final SINR at RX.
Callback< bool, Ptr< SatControlMessage >, const Address &, Ptr< SatSignalParameters > > SendControlMsgToFeederCallback
SatOrbiterUserPhy(void)
Default constructor.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
Regeneration mode on forward link.
virtual void RxTraces(SatPhy::PacketContainer_t packets)
Invoke the Rx trace source for each received packet.
bool m_isSending
Indicates if a packet is already being sent.
double m_otherSysInterferenceCOverIDb
Configured other system interference in dB.
double m_aciInterferenceCOverIDb
Configured Adjacent Channel Interference (ACI) in dB.
std::queue< std::tuple< Ptr< SatSignalParameters >, uint32_t, uint32_t > > m_queue
Simple FIFO queue to avoid collisions on TX in case of REGENERATION_PHY.
virtual SatEnums::SatLinkDir_t GetSatLinkRxDir()
Get the link RX direction.
static TypeId GetTypeId(void)
inherited from Object
Ptr< SatLinkResults > m_linkResults
Link results used for this physical layer.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
Regeneration mode on return link.
virtual SatEnums::SatLinkDir_t GetSatLinkTxDir()
Get the link TX direction.
TracedCallback< uint32_t, const Address & > m_queueSizeBytesTrace
Traced callback to monitor RTN feeder queue size in bytes.
void(* QueueSizeCallback)(uint32_t size, const Address &from)
Callback signature for QueueSizeBytes and QueueSizePackets trace source.
void SendFromQueue()
Send a packet from the queue.
virtual ~SatOrbiterUserPhy()
Destructor for SatOrbiterUserPhy.
virtual void Receive(Ptr< SatSignalParameters > rxParams, bool phyError)
Receives packets from lower layer.
SatPhyRxCarrierConf::RxCarrierCreateParams_s m_parameters
RX carrier configuration parameters.
void EndTx()
Notify a packet has finished being sent.
uint32_t m_queueSizePackets
Size of FIFO queue in packets.
double m_aciInterferenceCOverI
Adjacent Channel Interference (ACI) in linear.
SatPhy(void)
Default constructor.
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
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...
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Creation parameters for base PHY object.