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> 
   27 #include <ns3/constant-position-mobility-model.h> 
   34                         << 
" Received Set TRX Confirm: " << status);
 
   43                         << 
" Received frame size: " << psduLength << 
" LQI: " <<
 
   55 int main (
int argc, 
char *argv[])
 
   66   receiver->SetChannel (channel);
 
   67   channel->AddRx (sender);
 
   68   channel->AddRx (receiver);
 
   74   receiver->SetMobility (senderMobility);
 
void ReceivePdDataIndication(uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
 
void SetPlmeSetTRXStateConfirmCallback(PlmeSetTRXStateConfirmCallback c)
set the callback for the end of an SetTRXState, as part of the interconnections betweenthe PHY and th...
 
static void Run(void)
Run the simulation. 
 
void GetSetTRXStateConfirm(LrWpanPhyEnumeration status)
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
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. 
 
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay. 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy(). 
 
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components. 
 
void PlmeSetTRXStateRequest(LrWpanPhyEnumeration state)
IEEE 802.15.4-2006 section 6.2.2.7 PLME-SET-TRX-STATE.request Set PHY state. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device. 
 
Prefix all trace prints with function. 
 
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionaly. 
 
void SendOnePacket(Ptr< LrWpanPhy > sender, Ptr< LrWpanPhy > receiver)
 
static Time Now(void)
Return the current simulation virtual time. 
 
static void Stop(void)
Tell the Simulator the calling event should be the last one executed. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
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) ...
 
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.