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>
40 <<
" Received Set TRX Confirm: " << status);
55 <<
" Received frame size: " << psduLength <<
" LQI: " <<
69 sender->PdDataRequest (p->
GetSize (), p);
73int main (
int argc,
char *argv[])
76 cmd.Parse (argc, argv);
93 sender->SetMobility (senderMobility);
95 receiver->SetMobility (receiverMobility);
108 Simulator::Stop (
Seconds (10.0));
112 Simulator::Destroy ();
Parse command-line arguments.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
@ IEEE_802_15_4_PHY_RX_ON
@ IEEE_802_15_4_PHY_TX_ON
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Time Seconds(double value)
Construct a Time in the indicated unit.
void GetSetTRXStateConfirm(LrWpanPhyEnumeration status)
Function called when a the PHY state change is confirmed.
void SendOnePacket(Ptr< LrWpanPhy > sender, Ptr< LrWpanPhy > receiver)
Send one packet.
void ReceivePdDataIndication(uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
Function called when a the PHY receives a packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ LOG_LEVEL_ALL
Print everything.
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...