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 #include <stdint.h>
30 #include <vector>
31 
32 namespace ns3
33 {
34 
43 class SatDamaEntry : public SimpleRefCount<SatDamaEntry>
44 {
45  public:
52  SatDamaEntry();
53 
58  SatDamaEntry(Ptr<SatLowerLayerServiceConf> llsConf);
59 
65  ~SatDamaEntry();
66 
72  uint8_t GetRcCount() const;
73 
80  uint32_t GetCraBasedBytes(Time duration) const;
81 
90  uint32_t GetMinRateBasedBytes(Time duration) const;
91 
98  uint32_t GetRbdcBasedBytes(Time duration) const;
99 
105  uint32_t GetVbdcBasedBytes() const;
106 
113  uint16_t GetCraInKbps(uint8_t index) const;
114 
121  uint16_t GetMinRbdcInKbps(uint8_t index) const;
122 
129  uint16_t GetRbdcInKbps(uint8_t index) const;
130 
137  void UpdateRbdcInKbps(uint8_t index, uint16_t rateInKbps);
138 
145  uint32_t GetVbdcInBytes(uint8_t index) const;
146 
153  void UpdateVbdcInBytes(uint8_t index, uint32_t volumeInBytes);
154 
161  void SetVbdcInBytes(uint8_t index, uint32_t volumeInBytes);
162 
167 
172 
177 
182 
183  private:
186  Ptr<SatLowerLayerServiceConf> m_llsConf;
187  std::vector<uint16_t> m_dynamicRateRequestedInKbps;
188  std::vector<uint32_t> m_volumeBacklogRequestedInBytes;
189 };
190 
191 } // namespace ns3
192 
193 #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.