satellite-beam-user-info.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  */
20 
21 #ifndef SAT_BEAM_USER_INFO_H
22 #define SAT_BEAM_USER_INFO_H
23 
24 #include <ns3/geo-coordinate.h>
25 
26 #include <vector>
27 
28 namespace ns3
29 {
30 
44 {
45  public:
50 
59  SatBeamUserInfo(uint32_t utCount, uint32_t userCountPerUt);
60 
64  virtual ~SatBeamUserInfo()
65  {
66  }
67 
71  uint32_t GetUtCount() const;
72 
78  uint32_t GetUtUserCount(uint32_t utIndex) const;
79 
88  void SetUtUserCount(uint32_t utIndex, uint32_t userCount);
89 
95  void AppendUt(uint32_t userCount);
96 
100  std::vector<std::pair<GeoCoordinate, uint32_t>> GetPositions();
101 
105  void SetPositions(std::vector<std::pair<GeoCoordinate, uint32_t>> positions);
106 
107  private:
108  // vector to store users per UT
109  std::vector<uint32_t> m_userCount;
110 
111  // storing static positions for some UTs
112  std::vector<std::pair<GeoCoordinate, uint32_t>> m_positions;
113 };
114 
115 } // namespace ns3
116 
117 #endif /* SAT_BEAM_USER_INFO_H */
Class that holds information for each beam regarding UTs and their users camped in each beam.
uint32_t GetUtUserCount(uint32_t utIndex) const
void AppendUt(uint32_t userCount)
Appends new UT to end of the list with given user count for the appended UT.
virtual ~SatBeamUserInfo()
Destructor for SatBeamUserInfo.
std::vector< std::pair< GeoCoordinate, uint32_t > > GetPositions()
void SetUtUserCount(uint32_t utIndex, uint32_t userCount)
Sets user count for the UT with given uIndex.
void SetPositions(std::vector< std::pair< GeoCoordinate, uint32_t >> positions)
Set the list of custom positions to create, and associated group.
std::vector< std::pair< GeoCoordinate, uint32_t > > m_positions
SatBeamUserInfo()
Default constructor for SatBeamUserInfo enables creating an empty information structure.
std::vector< uint32_t > m_userCount
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.