A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bug780-test.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-2.0-only
3 *
4 * Authors: Pavel Boyko <boyko@iitp.ru>
5 */
6
7#ifndef BUG780_TEST_H
8#define BUG780_TEST_H
9
10#include "ns3/node-container.h"
11#include "ns3/nstime.h"
12#include "ns3/ptr.h"
13#include "ns3/test.h"
14
15namespace ns3
16{
17
18class Socket;
19
20namespace olsr
21{
22
23/**
24 * \ingroup olsr-test
25 * \ingroup tests
26 *
27 * See \bugid{780}
28 */
29class Bug780Test : public TestCase
30{
31 public:
32 Bug780Test();
33 ~Bug780Test() override;
34
35 private:
36 /// Total simulation time
37 const Time m_time;
38 /// Create & configure test network
39 void CreateNodes();
40 void DoRun() override;
41 /// Send one ping
42 void SendPing();
43 /**
44 * Receive echo reply
45 * \param socket the socket
46 */
47 void Receive(Ptr<Socket> socket);
48 /// Socket
50 /// Sequence number
51 uint16_t m_seq;
52 /// Received ECHO Reply counter
53 uint16_t m_recvCount;
54};
55
56} // namespace olsr
57} // namespace ns3
58
59#endif /* BUG780_TEST_H */
Smart pointer class similar to boost::intrusive_ptr.
encapsulates test code
Definition test.h:1050
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
uint16_t m_recvCount
Received ECHO Reply counter.
Definition bug780-test.h:53
void DoRun() override
Implementation to actually run this TestCase.
const Time m_time
Total simulation time.
Definition bug780-test.h:37
void Receive(Ptr< Socket > socket)
Receive echo reply.
void CreateNodes()
Create & configure test network.
uint16_t m_seq
Sequence number.
Definition bug780-test.h:51
Ptr< Socket > m_socket
Socket.
Definition bug780-test.h:49
void SendPing()
Send one ping.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition olsr.py:1