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 namespace ns3
28 {
29 
34 class SatUplinkInfoTag : public Tag
35 {
36  public:
41  static TypeId GetTypeId(void);
42 
47  virtual TypeId GetInstanceTypeId(void) const;
48 
53 
63  SatUplinkInfoTag(Time satelliteReceptionTime,
64  double sinr,
65  double additionalInterference,
66  uint32_t satId,
67  uint32_t beamId,
68  bool isControl);
69 
74  virtual void Serialize(TagBuffer i) const;
75 
80  virtual void Deserialize(TagBuffer i);
81 
86  virtual uint32_t GetSerializedSize() const;
87 
92  virtual void Print(std::ostream& os) const;
93 
98  Time GetSatelliteReceptionTime(void) const;
99 
104  void SetSatelliteReceptionTime(Time satelliteReceptionTime);
105 
110  double GetSinr(void) const;
111 
117  void SetSinr(double sinr, double additionalInterference);
118 
123  double GetAdditionalInterference(void) const;
124 
129  bool IsSinrComputed(void) const;
130 
135  uint32_t GetSatId(void) const;
136 
141  void SetSatId(uint32_t satId);
142 
147  uint32_t GetBeamId(void) const;
148 
153  void SetBeamId(uint32_t beamId);
154 
159  bool IsControl(void) const;
160 
165  void SetIsControl(bool isControl);
166 
167  private:
168  Time m_satelliteReceptionTime; // Reception time of packet in satellite
169  double m_sinr; // SINR computed on uplink
170  double m_additionalInterference; // Other interference to add to compute final SINR
171  bool m_sinrComputed; // Flag to tell if SINR has been already computed
172  uint32_t m_satId; // Sat ID where the UT is located
173  uint32_t m_beamId; // Beam ID where the UT is located
174  bool m_isControl; // Uplink burst is control and has been sent using WF02
175 };
176 
177 } // namespace ns3
178 
179 #endif /* SATELLITE_UPLINK_INFO_TAG_H */
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.