22 #include <ns3/command-line.h> 23 #include <ns3/packet.h> 24 #include <ns3/lr-wpan-phy.h> 25 #include <ns3/lr-wpan-mac.h> 26 #include <ns3/simulator.h> 27 #include <ns3/single-model-spectrum-channel.h> 28 #include <ns3/constant-position-mobility-model.h> 35 <<
" Received Set TRX Confirm: " << status);
44 <<
" Received frame size: " << psduLength <<
" LQI: " <<
56 int main (
int argc,
char *argv[])
59 cmd.Parse (argc, argv);
78 receiver->SetMobility (receiverMobility);
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...
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
static void Run(void)
Run the simulation.
void GetSetTRXStateConfirm(LrWpanPhyEnumeration status)
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)
Parse command-line arguments.
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.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
void SendOnePacket(Ptr< LrWpanPhy > sender, Ptr< LrWpanPhy > receiver)
static Time Now(void)
Return the current simulation virtual time.
Prefix all trace prints with function.
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.