53 { |
53 { |
54 static TypeId tid = TypeId("ns3::TcpWestwood") |
54 static TypeId tid = TypeId("ns3::TcpWestwood") |
55 .SetParent<TcpSocketBase>() |
55 .SetParent<TcpSocketBase>() |
56 .AddConstructor<TcpWestwood>() |
56 .AddConstructor<TcpWestwood>() |
57 .AddTraceSource("CongestionWindow", "The TCP connection's congestion window", |
57 .AddTraceSource("CongestionWindow", "The TCP connection's congestion window", |
58 MakeTraceSourceAccessor(&TcpWestwood::m_cWnd)) |
58 MakeTraceSourceAccessor(&TcpWestwood::m_cWnd), |
|
59 "ns3::TracedValue::Uint32Callback") |
59 .AddTraceSource ("SlowStartThreshold", |
60 .AddTraceSource ("SlowStartThreshold", |
60 "TCP slow start threshold (bytes)", |
61 "TCP slow start threshold (bytes)", |
61 MakeTraceSourceAccessor (&TcpWestwood::m_ssThresh)) |
62 MakeTraceSourceAccessor (&TcpWestwood::m_ssThresh), |
|
63 "ns3::TracedValue::Uint32Callback") |
62 .AddAttribute("FilterType", "Use this to choose no filter or Tustin's approximation filter", |
64 .AddAttribute("FilterType", "Use this to choose no filter or Tustin's approximation filter", |
63 EnumValue(TcpWestwood::TUSTIN), MakeEnumAccessor(&TcpWestwood::m_fType), |
65 EnumValue(TcpWestwood::TUSTIN), MakeEnumAccessor(&TcpWestwood::m_fType), |
64 MakeEnumChecker(TcpWestwood::NONE, "None", TcpWestwood::TUSTIN, "Tustin")) |
66 MakeEnumChecker(TcpWestwood::NONE, "None", TcpWestwood::TUSTIN, "Tustin")) |
65 .AddAttribute("ProtocolType", "Use this to let the code run as Westwood or WestwoodPlus", |
67 .AddAttribute("ProtocolType", "Use this to let the code run as Westwood or WestwoodPlus", |
66 EnumValue(TcpWestwood::WESTWOOD), |
68 EnumValue(TcpWestwood::WESTWOOD), |
67 MakeEnumAccessor(&TcpWestwood::m_pType), |
69 MakeEnumAccessor(&TcpWestwood::m_pType), |
68 MakeEnumChecker(TcpWestwood::WESTWOOD, "Westwood",TcpWestwood::WESTWOODPLUS, "WestwoodPlus")) |
70 MakeEnumChecker(TcpWestwood::WESTWOOD, "Westwood",TcpWestwood::WESTWOODPLUS, "WestwoodPlus")) |
69 .AddTraceSource("EstimatedBW", "The estimated bandwidth", |
71 .AddTraceSource("EstimatedBW", "The estimated bandwidth", |
70 MakeTraceSourceAccessor(&TcpWestwood::m_currentBW)); |
72 MakeTraceSourceAccessor(&TcpWestwood::m_currentBW), |
|
73 "ns3::TracedValue::DoubleCallback"); |
71 return tid; |
74 return tid; |
72 } |
75 } |
73 |
76 |
74 TcpWestwood::TcpWestwood (void) : |
77 TcpWestwood::TcpWestwood (void) : |
75 m_inFastRec(false), |
78 m_inFastRec(false), |