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) 2007 University of Washington | 3 * Copyright (c) 2007 University of Washington |
4 * Copyright (c) 2013 ResiliNets, ITTC, University of Kansas· | 4 * Copyright (c) 2013 ResiliNets, ITTC, University of Kansas· |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 { | 103 { |
104 } | 104 } |
105 | 105 |
106 ErrorModelSimple::~ErrorModelSimple () | 106 ErrorModelSimple::~ErrorModelSimple () |
107 { | 107 { |
108 } | 108 } |
109 | 109 |
110 bool· | 110 bool· |
111 ErrorModelSimple::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t prot
ocol, const Address& addr) | 111 ErrorModelSimple::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t prot
ocol, const Address& addr) |
112 { | 112 { |
113 NS_UNUSED(protocol); | 113 NS_UNUSED (protocol); |
114 NS_UNUSED(addr); | 114 NS_UNUSED (addr); |
115 m_count++; | 115 m_count++; |
116 return true; | 116 return true; |
117 } | 117 } |
118 | 118 |
119 void· | 119 void· |
120 ErrorModelSimple::DropEvent (Ptr<const Packet> p) | 120 ErrorModelSimple::DropEvent (Ptr<const Packet> p) |
121 { | 121 { |
122 m_drops++; | 122 m_drops++; |
123 } | 123 } |
124 | 124 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 { | 202 { |
203 } | 203 } |
204 | 204 |
205 BurstErrorModelSimple::~BurstErrorModelSimple () | 205 BurstErrorModelSimple::~BurstErrorModelSimple () |
206 { | 206 { |
207 } | 207 } |
208 | 208 |
209 bool | 209 bool |
210 BurstErrorModelSimple::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t
protocol, const Address& addr) | 210 BurstErrorModelSimple::Receive (Ptr<NetDevice> nd, Ptr<const Packet> p, uint16_t
protocol, const Address& addr) |
211 { | 211 { |
212 NS_UNUSED(protocol); | 212 NS_UNUSED (protocol); |
213 NS_UNUSED(addr); | 213 NS_UNUSED (addr); |
214 m_count++; | 214 m_count++; |
215 return true; | 215 return true; |
216 } | 216 } |
217 | 217 |
218 void | 218 void |
219 BurstErrorModelSimple::DropEvent (Ptr<const Packet> p) | 219 BurstErrorModelSimple::DropEvent (Ptr<const Packet> p) |
220 { | 220 { |
221 m_drops++; | 221 m_drops++; |
222 } | 222 } |
223 | 223 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 ErrorModelTestSuite::ErrorModelTestSuite () | 285 ErrorModelTestSuite::ErrorModelTestSuite () |
286 : TestSuite ("error-model", UNIT) | 286 : TestSuite ("error-model", UNIT) |
287 { | 287 { |
288 AddTestCase (new ErrorModelSimple, TestCase::QUICK); | 288 AddTestCase (new ErrorModelSimple, TestCase::QUICK); |
289 AddTestCase (new BurstErrorModelSimple, TestCase::QUICK); | 289 AddTestCase (new BurstErrorModelSimple, TestCase::QUICK); |
290 } | 290 } |
291 | 291 |
292 // Do not forget to allocate an instance of this TestSuite | 292 // Do not forget to allocate an instance of this TestSuite |
293 static ErrorModelTestSuite errorModelTestSuite; //!< Static variable for test in
itialization | 293 static ErrorModelTestSuite errorModelTestSuite; //!< Static variable for test in
itialization |
LEFT | RIGHT |