A Discrete-Event Network Simulator
API
bug780-test.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 as
5  * published by the Free Software Foundation;
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15  *
16  * Authors: Pavel Boyko <boyko@iitp.ru>
17  */
18 
19 #ifndef BUG780_TEST_H
20 #define BUG780_TEST_H
21 
22 #include "ns3/test.h"
23 #include "ns3/nstime.h"
24 #include "ns3/node-container.h"
25 
26 namespace ns3 {
27 namespace olsr {
28 
35 class Bug780Test : public TestCase
36 {
37 public:
38  Bug780Test ();
39  ~Bug780Test ();
40 private:
42  const Time m_time;
44  void CreateNodes ();
45  void DoRun ();
47  void SendPing ();
52  void Receive (Ptr<Socket> socket);
56  uint16_t m_seq;
58  uint16_t m_recvCount;
59 };
60 
61 }
62 }
63 
64 #endif /* BUG780_TEST_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
void Receive(Ptr< Socket > socket)
Receive echo reply.
Definition: bug780-test.cc:145
encapsulates test code
Definition: test.h:1155
const Time m_time
Total simulation time.
Definition: bug780-test.h:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Definition: olsr.py:1
uint16_t m_seq
Sequence number.
Definition: bug780-test.h:56
void SendPing()
Send one ping.
Definition: bug780-test.cc:116
uint16_t m_recvCount
Received ECHO Reply counter.
Definition: bug780-test.h:58
Ptr< Socket > m_socket
Socket.
Definition: bug780-test.h:54
void DoRun()
Implementation to actually run this TestCase.
Definition: bug780-test.cc:56
void CreateNodes()
Create & configure test network.
Definition: bug780-test.cc:71