A Discrete-Event Network Simulator
API
hello-regression-test.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 IITP RAS
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Pavel Boyko <boyko@iitp.ru>
18  */
19 
20 #ifndef HELLO_REGRESSION_TEST_H
21 #define HELLO_REGRESSION_TEST_H
22 
23 #include "ns3/ipv4-raw-socket-impl.h"
24 #include "ns3/node-container.h"
25 #include "ns3/nstime.h"
26 #include "ns3/socket.h"
27 #include "ns3/test.h"
28 
29 namespace ns3
30 {
31 namespace olsr
32 {
54 {
55  public:
57  ~HelloRegressionTest() override;
58 
59  private:
61  const Time m_time;
63  void CreateNodes();
64  void DoRun() override;
65 
70  void ReceivePktProbeA(Ptr<Socket> socket);
72  uint8_t m_countA;
79  void ReceivePktProbeB(Ptr<Socket> socket);
81  uint8_t m_countB;
84 };
85 
86 } // namespace olsr
87 } // namespace ns3
88 
89 #endif /* HELLO_REGRESSION_TEST_H */
encapsulates test code
Definition: test.h:1060
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Trivial (still useful) test of OLSR operation.
void ReceivePktProbeA(Ptr< Socket > socket)
Receive raw data on node A.
Ptr< Ipv4RawSocketImpl > m_rxSocketA
Receiving socket on node A.
Ptr< Ipv4RawSocketImpl > m_rxSocketB
Receiving socket on node B.
const Time m_time
Total simulation time.
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_countA
Packet counter on node A.
uint8_t m_countB
Packet counter on node B.
void CreateNodes()
Create & configure test network.
void ReceivePktProbeB(Ptr< Socket > socket)
Receive raw data on node B.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition: olsr.py:1