19#include <ns3/command-line.h>
20#include <ns3/constant-position-mobility-model.h>
22#include <ns3/lr-wpan-mac.h>
23#include <ns3/lr-wpan-phy.h>
24#include <ns3/packet.h>
25#include <ns3/simulator.h>
26#include <ns3/single-model-spectrum-channel.h>
51 <<
" LQI: " << (uint16_t)lqi);
64 sender->PdDataRequest(p->
GetSize(), p);
68main(
int argc,
char* argv[])
71 cmd.Parse(argc, argv);
88 CreateObject<ConstantPositionMobilityModel>();
89 sender->SetMobility(senderMobility);
91 CreateObject<ConstantPositionMobilityModel>();
92 receiver->SetMobility(receiverMobility);
104 Simulator::Stop(
Seconds(10.0));
108 Simulator::Destroy();
Parse command-line arguments.
uint32_t GetSize() 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()
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.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
@ LOG_LEVEL_ALL
Print everything.
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
void LogComponentEnable(const char *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.