Loading...
Searching...
No Matches
satellite-uplink-info-tag.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: Author: Bastien TAURAN <bastien.tauran@viveris.fr>
19 */
20
21#ifndef SATELLITE_UPLINK_INFO_TAG_H
22#define SATELLITE_UPLINK_INFO_TAG_H
23
24#include "ns3/nstime.h"
25#include "ns3/tag.h"
26
27#include <ostream>
28#include <stdint.h>
29
30namespace ns3
31{
32
37class SatUplinkInfoTag : public Tag
38{
39 public:
44 static TypeId GetTypeId(void);
45
50 virtual TypeId GetInstanceTypeId(void) const;
51
56
66 SatUplinkInfoTag(Time satelliteReceptionTime,
67 double sinr,
68 double additionalInterference,
69 uint32_t satId,
70 uint32_t beamId,
71 bool isControl);
72
77 virtual void Serialize(TagBuffer i) const;
78
83 virtual void Deserialize(TagBuffer i);
84
89 virtual uint32_t GetSerializedSize() const;
90
95 virtual void Print(std::ostream& os) const;
96
101 Time GetSatelliteReceptionTime(void) const;
102
107 void SetSatelliteReceptionTime(Time satelliteReceptionTime);
108
113 double GetSinr(void) const;
114
120 void SetSinr(double sinr, double additionalInterference);
121
126 double GetAdditionalInterference(void) const;
127
132 bool IsSinrComputed(void) const;
133
138 uint32_t GetSatId(void) const;
139
144 void SetSatId(uint32_t satId);
145
150 uint32_t GetBeamId(void) const;
151
156 void SetBeamId(uint32_t beamId);
157
162 bool IsControl(void) const;
163
168 void SetIsControl(bool isControl);
169
170 private:
171 Time m_satelliteReceptionTime; // Reception time of packet in satellite
172 double m_sinr; // SINR computed on uplink
173 double m_additionalInterference; // Other interference to add to compute final SINR
174 bool m_sinrComputed; // Flag to tell if SINR has been already computed
175 uint32_t m_satId; // Sat ID where the UT is located
176 uint32_t m_beamId; // Beam ID where the UT is located
177 bool m_isControl; // Uplink burst is control and has been sent using WF02
178};
179
180} // namespace ns3
181
182#endif /* SATELLITE_UPLINK_INFO_TAG_H */
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.