A Discrete-Event Network Simulator
API
SixlowpanIphcStatefulImplTest Class Reference

6LoWPAN IPHC stateful compression Test More...

+ Inheritance diagram for SixlowpanIphcStatefulImplTest:
+ Collaboration diagram for SixlowpanIphcStatefulImplTest:

Classes

struct  Data
 Structure to hold the Rx/Tx packets. More...
 

Public Member Functions

 SixlowpanIphcStatefulImplTest ()
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

bool PromiscReceiveFromSixLowPanDevice (Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, Address const &source, Address const &destination, NetDevice::PacketType packetType)
 
bool ReceiveFromMockDevice (Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, Address const &source, Address const &destination, NetDevice::PacketType packetType)
 
void SendOnePacket (NetDeviceContainer devices, Ipv6Address from, Ipv6Address to)
 

Private Attributes

NetDeviceContainer m_mockDevices
 MockNetDevice container. More...
 
std::vector< Datam_rxPackets
 Received packets. More...
 
NetDeviceContainer m_sixDevices
 SixLowPanNetDevice container. More...
 
std::vector< Datam_txPackets
 Transmitted packets. More...
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) const
 Check if all tests passed. More...
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found. More...
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase. More...
 
bool MustAssertOnFailure (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) const
 Check if this run should continue on failure. More...
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory. More...
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory. More...
 

Detailed Description

6LoWPAN IPHC stateful compression Test

Definition at line 57 of file sixlowpan-iphc-stateful-test.cc.

Constructor & Destructor Documentation

◆ SixlowpanIphcStatefulImplTest()

SixlowpanIphcStatefulImplTest::SixlowpanIphcStatefulImplTest ( )

Definition at line 89 of file sixlowpan-iphc-stateful-test.cc.

Member Function Documentation

◆ DoRun()

◆ PromiscReceiveFromSixLowPanDevice()

bool SixlowpanIphcStatefulImplTest::PromiscReceiveFromSixLowPanDevice ( Ptr< NetDevice device,
Ptr< const Packet packet,
uint16_t  protocol,
Address const &  source,
Address const &  destination,
NetDevice::PacketType  packetType 
)
private

Definition at line 114 of file sixlowpan-iphc-stateful-test.cc.

References ns3::Packet::Copy(), SixlowpanIphcStatefulImplTest::Data::dst, m_rxPackets, SixlowpanIphcStatefulImplTest::Data::packet, and SixlowpanIphcStatefulImplTest::Data::src.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceiveFromMockDevice()

bool SixlowpanIphcStatefulImplTest::ReceiveFromMockDevice ( Ptr< NetDevice device,
Ptr< const Packet packet,
uint16_t  protocol,
Address const &  source,
Address const &  destination,
NetDevice::PacketType  packetType 
)
private

◆ SendOnePacket()

void SixlowpanIphcStatefulImplTest::SendOnePacket ( NetDeviceContainer  devices,
Ipv6Address  from,
Ipv6Address  to 
)
private

Definition at line 127 of file sixlowpan-iphc-stateful-test.cc.

References ns3::Packet::AddHeader(), first::devices, and ns3::Ipv6Header::SetSourceAddress().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_mockDevices

NetDeviceContainer SixlowpanIphcStatefulImplTest::m_mockDevices
private

MockNetDevice container.

Definition at line 81 of file sixlowpan-iphc-stateful-test.cc.

Referenced by DoRun(), and ReceiveFromMockDevice().

◆ m_rxPackets

std::vector<Data> SixlowpanIphcStatefulImplTest::m_rxPackets
private

Received packets.

Definition at line 71 of file sixlowpan-iphc-stateful-test.cc.

Referenced by DoRun(), and PromiscReceiveFromSixLowPanDevice().

◆ m_sixDevices

NetDeviceContainer SixlowpanIphcStatefulImplTest::m_sixDevices
private

SixLowPanNetDevice container.

Definition at line 82 of file sixlowpan-iphc-stateful-test.cc.

Referenced by DoRun().

◆ m_txPackets

std::vector<Data> SixlowpanIphcStatefulImplTest::m_txPackets
private

Transmitted packets.

Definition at line 70 of file sixlowpan-iphc-stateful-test.cc.

Referenced by DoRun(), and ReceiveFromMockDevice().


The documentation for this class was generated from the following file: