A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
15
namespace
ns3
16
{
17
18
class
Socket;
19
20
namespace
olsr
21
{
22
23
/**
24
* \ingroup olsr-test
25
* \ingroup tests
26
*
27
* See \bugid{780}
28
*/
29
class
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
49
Ptr<Socket>
m_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 */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TestCase
encapsulates test code
Definition
test.h:1050
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::olsr::Bug780Test
See Bug 780
Definition
bug780-test.h:30
ns3::olsr::Bug780Test::m_recvCount
uint16_t m_recvCount
Received ECHO Reply counter.
Definition
bug780-test.h:53
ns3::olsr::Bug780Test::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
bug780-test.cc:48
ns3::olsr::Bug780Test::Bug780Test
Bug780Test()
Definition
bug780-test.cc:35
ns3::olsr::Bug780Test::m_time
const Time m_time
Total simulation time.
Definition
bug780-test.h:37
ns3::olsr::Bug780Test::Receive
void Receive(Ptr< Socket > socket)
Receive echo reply.
Definition
bug780-test.cc:137
ns3::olsr::Bug780Test::CreateNodes
void CreateNodes()
Create & configure test network.
Definition
bug780-test.cc:63
ns3::olsr::Bug780Test::m_seq
uint16_t m_seq
Sequence number.
Definition
bug780-test.h:51
ns3::olsr::Bug780Test::m_socket
Ptr< Socket > m_socket
Socket.
Definition
bug780-test.h:49
ns3::olsr::Bug780Test::SendPing
void SendPing()
Send one ping.
Definition
bug780-test.cc:108
ns3::olsr::Bug780Test::~Bug780Test
~Bug780Test() override
Definition
bug780-test.cc:43
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
olsr
Definition
olsr.py:1
src
olsr
test
bug780-test.h
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0