LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2015 University of Sussex | 3 * Copyright (c) 2015 University of Sussex |
4 * Copyright (c) 2015 Université Pierre et Marie Curie (UPMC) | 4 * Copyright (c) 2015 Université Pierre et Marie Curie (UPMC) |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 12 matching lines...) Expand all Loading... |
23 #ifndef MPTCP_SCHEDULER_ROUND_ROBIN_H | 23 #ifndef MPTCP_SCHEDULER_ROUND_ROBIN_H |
24 #define MPTCP_SCHEDULER_ROUND_ROBIN_H | 24 #define MPTCP_SCHEDULER_ROUND_ROBIN_H |
25 | 25 |
26 #include "ns3/mptcp-scheduler.h" | 26 #include "ns3/mptcp-scheduler.h" |
27 #include "ns3/object.h" | 27 #include "ns3/object.h" |
28 #include "ns3/ptr.h" | 28 #include "ns3/ptr.h" |
29 #include "ns3/mptcp-scheduler-round-robin.h" | 29 #include "ns3/mptcp-scheduler-round-robin.h" |
30 #include <vector> | 30 #include <vector> |
31 #include <list> | 31 #include <list> |
32 | 32 |
33 namespace ns3 | 33 namespace ns3 { |
34 { | |
35 | 34 |
36 class MpTcpSocketBase; | 35 class MpTcpSocketBase; |
37 class MpTcpSubflow; | 36 class MpTcpSubflow; |
38 | 37 |
39 class MpTcpSchedulerRoundRobin : public MpTcpScheduler | 38 class MpTcpSchedulerRoundRobin : public MpTcpScheduler |
40 { | 39 { |
41 | |
42 public: | 40 public: |
43 static TypeId | 41 static TypeId |
44 GetTypeId (void); | 42 GetTypeId (void); |
45 | 43 |
46 MpTcpSchedulerRoundRobin(); | 44 MpTcpSchedulerRoundRobin (); |
47 virtual ~MpTcpSchedulerRoundRobin (); | 45 virtual ~MpTcpSchedulerRoundRobin (); |
48 void SetMeta(Ptr<MpTcpSocketBase> metaSock); | 46 void SetMeta (Ptr<MpTcpSocketBase> metaSock); |
49 | 47 |
50 /** | 48 /** |
51 * \brief This function is responsible for generating a list of packets to sen
d | 49 * \brief This function is responsible for generating a list of packets to sen
d |
52 * and to specify on which subflow to send. | 50 * and to specify on which subflow to send. |
53 * | 51 * |
54 * These *mappings* will be passed on to the meta socket that will send them w
ithout altering the | 52 * These *mappings* will be passed on to the meta socket that will send them w
ithout altering the |
55 * mappings. | 53 * mappings. |
56 * It is of utmost importance to generate a perfect mapping !!! Any deviation | 54 * It is of utmost importance to generate a perfect mapping !!! Any deviation |
57 * from the foreseen mapping will trigger an error and crash the simulator | 55 * from the foreseen mapping will trigger an error and crash the simulator |
58 * | 56 * |
59 * \warn This function MUST NOT fiddle with metasockInternal | 57 * \warn This function MUST NOT fiddle with metasockInternal |
60 * subflowId: pair(start,size) | 58 * subflowId: pair(start,size) |
61 */ | 59 */ |
62 virtual bool GenerateMapping(int& activeSubflowArrayId, SequenceNumber64& dsn,
uint16_t& length); | 60 virtual bool GenerateMapping (int& activeSubflowArrayId, SequenceNumber64& dsn
, uint16_t& length); |
63 | 61 |
64 /** | 62 /** |
65 * \brief chooseSubflowForRetransmit | 63 * \brief chooseSubflowForRetransmit |
66 * \return Index of subflow to use | 64 * \return Index of subflow to use |
67 */ | 65 */ |
68 virtual Ptr<MpTcpSubflow> GetSubflowToUseForEmptyPacket(); | 66 virtual Ptr<MpTcpSubflow> GetSubflowToUseForEmptyPacket (); |
69 | 67 |
70 protected: | 68 protected: |
71 uint8_t m_lastUsedFlowId; //!< keep track of last used subflow | 69 uint8_t m_lastUsedFlowId; //!< keep track of last used subflow |
72 Ptr<MpTcpSocketBase> m_metaSock; //!< | 70 Ptr<MpTcpSocketBase> m_metaSock; //!< |
73 }; | 71 }; |
74 | 72 |
75 } // end of 'ns3' | 73 } // end of 'ns3' |
76 | 74 |
77 #endif /* MPTCP_SCHEDULER_ROUND_ROBIN_H */ | 75 #endif /* MPTCP_SCHEDULER_ROUND_ROBIN_H */ |
LEFT | RIGHT |