20#include "ns3/olsr-header.h"
21#include "ns3/olsr-repositories.h"
22#include "ns3/packet.h"
37 void DoRun()
override;
41 :
TestCase(
"Check Emf olsr time conversion")
48 for (
int time = 1; time <= 30; time++)
50 uint8_t emf = olsr::SecondsToEmf(time);
51 double seconds = olsr::EmfToSeconds(emf);
66 void DoRun()
override;
70 :
TestCase(
"Check Mid olsr messages")
90 addresses.emplace_back(
"1.2.3.4");
91 addresses.emplace_back(
"1.2.3.5");
103 addresses.emplace_back(
"2.2.3.4");
104 addresses.emplace_back(
"2.2.3.5");
179 void DoRun()
override;
183 :
TestCase(
"Check Hello olsr messages")
250 void DoRun()
override;
254 :
TestCase(
"Check Tc olsr messages")
293 void DoRun()
override;
297 :
TestCase(
"Check Hna olsr messages")
Check Emf olsr time conversion.
void DoRun() override
Implementation to actually run this TestCase.
Check Hello olsr messages.
void DoRun() override
Implementation to actually run this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
Check olsr header messages.
Ipv4 addresses are stored in host order in this class.
a class to represent an Ipv4 address mask
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void AddHeader(const Header &header)
Add header to this packet.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.