A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bug780-test.h
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation;
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 *
15 * Authors: Pavel Boyko <boyko@iitp.ru>
16 */
17
18#ifndef BUG780_TEST_H
19#define BUG780_TEST_H
20
21#include "ns3/node-container.h"
22#include "ns3/nstime.h"
23#include "ns3/ptr.h"
24#include "ns3/test.h"
25
26namespace ns3
27{
28
29class Socket;
30
31namespace olsr
32{
33
34/**
35 * \ingroup olsr-test
36 * \ingroup tests
37 *
38 * See \bugid{780}
39 */
40class Bug780Test : public TestCase
41{
42 public:
43 Bug780Test();
44 ~Bug780Test() override;
45
46 private:
47 /// Total simulation time
48 const Time m_time;
49 /// Create & configure test network
50 void CreateNodes();
51 void DoRun() override;
52 /// Send one ping
53 void SendPing();
54 /**
55 * Receive echo reply
56 * \param socket the socket
57 */
58 void Receive(Ptr<Socket> socket);
59 /// Socket
61 /// Sequence number
62 uint16_t m_seq;
63 /// Received ECHO Reply counter
64 uint16_t m_recvCount;
65};
66
67} // namespace olsr
68} // namespace ns3
69
70#endif /* BUG780_TEST_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
encapsulates test code
Definition: test.h:1061
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
uint16_t m_recvCount
Received ECHO Reply counter.
Definition: bug780-test.h:64
void DoRun() override
Implementation to actually run this TestCase.
Definition: bug780-test.cc:60
const Time m_time
Total simulation time.
Definition: bug780-test.h:48
void Receive(Ptr< Socket > socket)
Receive echo reply.
Definition: bug780-test.cc:149
void CreateNodes()
Create & configure test network.
Definition: bug780-test.cc:75
uint16_t m_seq
Sequence number.
Definition: bug780-test.h:62
Ptr< Socket > m_socket
Socket.
Definition: bug780-test.h:60
void SendPing()
Send one ping.
Definition: bug780-test.cc:120
~Bug780Test() override
Definition: bug780-test.cc:55
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition: olsr.py:1