satellite-dama-entry.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 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 SATELLITE_DAMA_ENTRY_H
22 #define SATELLITE_DAMA_ENTRY_H
23 
25 
26 #include <ns3/simple-ref-count.h>
27 
28 #include <map>
29 
30 namespace ns3
31 {
32 
41 class SatDamaEntry : public SimpleRefCount<SatDamaEntry>
42 {
43  public:
50  SatDamaEntry();
51 
56  SatDamaEntry(Ptr<SatLowerLayerServiceConf> llsConf);
57 
63  ~SatDamaEntry();
64 
70  uint8_t GetRcCount() const;
71 
78  uint32_t GetCraBasedBytes(Time duration) const;
79 
88  uint32_t GetMinRateBasedBytes(Time duration) const;
89 
96  uint32_t GetRbdcBasedBytes(Time duration) const;
97 
103  uint32_t GetVbdcBasedBytes() const;
104 
111  uint16_t GetCraInKbps(uint8_t index) const;
112 
119  uint16_t GetMinRbdcInKbps(uint8_t index) const;
120 
127  uint16_t GetRbdcInKbps(uint8_t index) const;
128 
135  void UpdateRbdcInKbps(uint8_t index, uint16_t rateInKbps);
136 
143  uint32_t GetVbdcInBytes(uint8_t index) const;
144 
151  void UpdateVbdcInBytes(uint8_t index, uint32_t volumeInBytes);
152 
159  void SetVbdcInBytes(uint8_t index, uint32_t volumeInBytes);
160 
165 
170 
175 
180 
181  private:
184  Ptr<SatLowerLayerServiceConf> m_llsConf;
185  std::vector<uint16_t> m_dynamicRateRequestedInKbps;
186  std::vector<uint32_t> m_volumeBacklogRequestedInBytes;
187 };
188 
189 } // namespace ns3
190 
191 #endif /* SATELLITE_DAMA_ENTRY_H */
class for module SatDamaEntry.
uint32_t GetCraBasedBytes(Time duration) const
Get CRA based bytes with given duration.
uint32_t GetVbdcBasedBytes() const
Get VBDC based bytes.
uint8_t m_volumeBacklogPersistence
void DecrementDynamicRatePersistence()
Decrement dynamic rate persistence.
uint16_t GetCraInKbps(uint8_t index) const
Get configured value of the CRA.
~SatDamaEntry()
Destroy a SatDamaEntry.
void UpdateVbdcInBytes(uint8_t index, uint32_t volumeInBytes)
Update VBDC request of the RC.
void UpdateRbdcInKbps(uint8_t index, uint16_t rateInKbps)
Update RBDC request of a RC.
std::vector< uint32_t > m_volumeBacklogRequestedInBytes
void ResetDynamicRatePersistence()
Reset dynamic rate persistence to the value given in lower layer service configuration.
uint32_t GetMinRateBasedBytes(Time duration) const
Get minimum rate based bytes with given duration.
void DecrementVolumeBacklogPersistence()
Decrement volume backlog persistence.
SatDamaEntry()
Default construct a SatDamaEntry.
uint16_t GetRbdcInKbps(uint8_t index) const
Get current value of the RBDC requested.
void ResetVolumeBacklogPersistence()
Reset volume backlog persistence to the value given in lower layer service configuration.
uint32_t GetRbdcBasedBytes(Time duration) const
Get RBDC based bytes with given duration.
std::vector< uint16_t > m_dynamicRateRequestedInKbps
void SetVbdcInBytes(uint8_t index, uint32_t volumeInBytes)
Set VBDC request of the RC.
uint8_t m_dynamicRatePersistence
uint16_t GetMinRbdcInKbps(uint8_t index) const
Get configured value of the minimum RBDC.
uint8_t GetRcCount() const
Get number of RCs in the SatDamaEntry.
Ptr< SatLowerLayerServiceConf > m_llsConf
uint32_t GetVbdcInBytes(uint8_t index) const
Get current value of the VBDC requested.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.