A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
UanTest Class Reference
+ Inheritance diagram for UanTest:
+ Collaboration diagram for UanTest:

Public Member Functions

 UanTest ()
 
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

Ptr< UanNetDeviceCreateNode (Vector pos, Ptr< UanChannel > chan)
 
uint32_t DoOnePhyTest (Time t1, Time t2, uint32_t r1, uint32_t r2, Ptr< UanPropModel > prop, uint32_t mode1=0, uint32_t mode2=0)
 
bool DoPhyTests ()
 
bool RxPacket (Ptr< NetDevice > dev, Ptr< const Packet > pkt, uint16_t mode, const Address &sender)
 
void SendOnePacket (Ptr< UanNetDevice > dev, uint32_t mode)
 

Private Attributes

uint32_t m_bytesRx
 
ObjectFactory m_phyFac
 

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)
 
void AddTestCase (TestCase *testCase) NS_DEPRECATED
 Add an individual child TestCase case to this TestCase. More...
 
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
TestCaseGetParent () const
 
bool IsStatusFailure (void) const
 
bool IsStatusSuccess (void) const
 
void SetDataDir (std::string directory)
 
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
 
bool MustContinueOnFailure (void) const
 
std::string CreateDataDirFilename (std::string filename)
 
std::string CreateTempDirFilename (std::string filename)
 

Detailed Description

Definition at line 37 of file uan-test.cc.

Constructor & Destructor Documentation

UanTest::UanTest ( )

Definition at line 55 of file uan-test.cc.

Member Function Documentation

Ptr< UanNetDevice > UanTest::CreateNode ( Vector  pos,
Ptr< UanChannel chan 
)
private

Definition at line 74 of file uan-test.cc.

References ns3::ObjectFactory::Create(), and m_phyFac.

Referenced by DoOnePhyTest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t UanTest::DoOnePhyTest ( Time  t1,
Time  t2,
uint32_t  r1,
uint32_t  r2,
Ptr< UanPropModel prop,
uint32_t  mode1 = 0,
uint32_t  mode2 = 0 
)
private

Definition at line 101 of file uan-test.cc.

References CreateNode(), m_bytesRx, ns3::MakeCallback(), RxPacket(), SendOnePacket(), ns3::ObjectBase::SetAttribute(), and ns3::UanNetDevice::SetReceiveCallback().

Referenced by DoPhyTests().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UanTest::DoPhyTests ( )
private

Definition at line 132 of file uan-test.cc.

References ns3::UanModesList::AppendMode(), DoOnePhyTest(), anonymous_namespace{rng-stream.cc}::m1, m_phyFac, NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UanTest::DoRun ( void  )
virtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 221 of file uan-test.cc.

References ns3::UanPhyPerUmodem::CalcPer(), DoPhyTests(), and NS_TEST_ASSERT_MSG_EQ_TOL.

+ Here is the call graph for this function:

bool UanTest::RxPacket ( Ptr< NetDevice dev,
Ptr< const Packet pkt,
uint16_t  mode,
const Address sender 
)
private

Definition at line 61 of file uan-test.cc.

References ns3::Packet::GetSize(), and m_bytesRx.

Referenced by DoOnePhyTest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UanTest::SendOnePacket ( Ptr< UanNetDevice dev,
uint32_t  mode 
)
private

Definition at line 67 of file uan-test.cc.

References ns3::UanNetDevice::GetBroadcast(), and ns3::UanNetDevice::Send().

Referenced by DoOnePhyTest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t UanTest::m_bytesRx
private

Definition at line 50 of file uan-test.cc.

Referenced by DoOnePhyTest(), and RxPacket().

ObjectFactory UanTest::m_phyFac
private

Definition at line 49 of file uan-test.cc.

Referenced by CreateNode(), and DoPhyTests().


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