22 #include <ns3/packet.h> 23 #include <ns3/lr-wpan-phy.h> 24 #include <ns3/lr-wpan-mac.h> 25 #include <ns3/simulator.h> 26 #include <ns3/single-model-spectrum-channel.h> 43 virtual void DoRun (
void);
55 :
TestCase (
"Test the PLME and PD SAP per IEEE 802.15.4")
69 <<
" Received frame size: " << psduLength <<
" LQI: " <<
94 Simulator::Destroy ();
110 :
TestSuite (
"lr-wpan-plme-pd-sap", UNIT)
void ReceivePdDataIndication(uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
LrWpan PLME and PD Interfaces Test.
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
LrWpanPlmeAndPdInterfaceTestCase()
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoRun(void)
Implementation to actually run this TestCase.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
LrWpanPlmeAndPdInterfaceTestSuite()
Prefix all trace prints with function.
void PdDataRequest(const uint32_t psduLength, Ptr< Packet > p)
IEEE 802.15.4-2006 section 6.2.1.1 PD-DATA.request Request to transfer MPDU from MAC (transmitting) ...
static LrWpanPlmeAndPdInterfaceTestSuite g_lrWpanPlmeAndPdInterfaceTestSuite
Static variable for test initialization.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
virtual ~LrWpanPlmeAndPdInterfaceTestCase()
void ReceivePdDataIndication(uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
Receives a PdData indication.
LrWpan PLME and PD Interfaces TestSuite.