summaryrefslogtreecommitdiffstats
path: root/libtransport/src/protocols/raaqm.h
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-09-04 08:21:02 +0000
committerMauro Sardara <msardara@cisco.com>2020-09-14 17:29:46 +0000
commitd875ae92a7fa1eaab3bc2616aeeedfc64a81fea4 (patch)
tree35b25f1ce17c06c4e2664400ac0e81d9276c421f /libtransport/src/protocols/raaqm.h
parent1fc9a18f95fd2ff491679e4c8de519afe49d8c47 (diff)
[HICN-635] Expose protocol API in libtransport.
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I626acb5f79a85b167d50da5c07fa597a9ff4d239
Diffstat (limited to 'libtransport/src/protocols/raaqm.h')
-rw-r--r--libtransport/src/protocols/raaqm.h55
1 files changed, 9 insertions, 46 deletions
diff --git a/libtransport/src/protocols/raaqm.h b/libtransport/src/protocols/raaqm.h
index fce4194d4..2999b50cf 100644
--- a/libtransport/src/protocols/raaqm.h
+++ b/libtransport/src/protocols/raaqm.h
@@ -20,6 +20,7 @@
#include <protocols/congestion_window_protocol.h>
#include <protocols/protocol.h>
#include <protocols/raaqm_data_path.h>
+#include <protocols/raaqm_transport_algorithm.h>
#include <protocols/rate_estimation.h>
#include <queue>
@@ -29,8 +30,7 @@ namespace transport {
namespace protocol {
-class RaaqmTransportProtocol : public TransportProtocol,
- public CWindowProtocol {
+class RaaqmTransportProtocol : public TransportProtocol {
public:
RaaqmTransportProtocol(implementation::ConsumerSocket *icnet_socket);
@@ -51,16 +51,6 @@ class RaaqmTransportProtocol : public TransportProtocol,
using PathTable =
std::unordered_map<uint32_t, std::unique_ptr<RaaqmDataPath>>;
- void increaseWindow() override;
- void decreaseWindow() override;
-
- virtual void afterContentReception(const Interest &interest,
- const ContentObject &content_object);
- virtual void afterDataUnsatisfied(uint64_t segment);
-
- virtual void updateStats(uint32_t suffix, uint64_t rtt,
- utils::TimePoint &now);
-
private:
void init();
@@ -86,48 +76,21 @@ class RaaqmTransportProtocol : public TransportProtocol,
void updateRtt(uint64_t segment);
- void RAAQM();
-
- void updatePathTable(const ContentObject &content_object);
-
- void checkDropProbability();
-
- void checkForStalePaths();
-
- void printRtt();
-
protected:
- // Congestion window management
- double current_window_size_;
- // Protocol management
- uint64_t interests_in_flight_;
- std::array<std::uint32_t, buffer_size> interest_retransmissions_;
- std::array<utils::TimePoint, buffer_size> interest_timepoints_;
std::queue<Interest::Ptr> interest_to_retransmit_;
+ std::array<std::uint32_t, buffer_size> interest_retransmissions_;
+ uint32_t interests_in_flight_;
+ double current_window_size_;
private:
- /**
- * Current download path
- */
- RaaqmDataPath *cur_path_;
-
- /**
- * Hash table for path: each entry is a pair path ID(key) - path object
- */
- PathTable path_table_;
-
+ std::unique_ptr<TransportAlgorithm> raaqm_algorithm_;
+ std::unique_ptr<IcnRateEstimator> rate_estimator_;
// TimePoints for statistic
utils::TimePoint t0_;
- bool set_interest_filter_;
-
- // for rate-estimation at packet level
- IcnRateEstimator *rate_estimator_;
-
- // params for autotuning
+ // Temporary placeholder for RAAQM algorithm
+ // parameters
bool raaqm_autotune_;
- double default_beta_;
- double default_drop_;
double beta_wifi_;
double drop_wifi_;
double beta_lte_;