29 #include <ns3/core-module.h> 
   30 #include <ns3/lr-wpan-module.h> 
   31 #include <ns3/propagation-loss-model.h> 
   32 #include <ns3/propagation-delay-model.h> 
   33 #include <ns3/simulator.h> 
   34 #include <ns3/single-model-spectrum-channel.h> 
   35 #include <ns3/constant-position-mobility-model.h> 
   36 #include <ns3/packet.h> 
   59 int main (
int argc, 
char *argv[])
 
   66   cmd.
AddValue (
"verbose", 
"turn on all log components", verbose);
 
   67   cmd.
AddValue (
"extended", 
"use extended addressing", extended);
 
   69   cmd.
Parse (argc, argv);
 
  107   dev0->SetChannel (channel);
 
  108   dev1->SetChannel (channel);
 
  112   n1->AddDevice (dev1);
 
  120   dev0->GetPhy ()->SetMobility (sender0Mobility);
 
  124   dev1->GetPhy ()->SetMobility (sender1Mobility);
 
  128   dev0->GetMac ()->SetMcpsDataConfirmCallback (cb0);
 
  132   dev0->GetMac ()->SetMcpsDataIndicationCallback (cb1);
 
  136   dev1->GetMac ()->SetMcpsDataConfirmCallback (cb2);
 
  140   dev1->GetMac ()->SetMcpsDataIndicationCallback (cb3);
 
  143   lrWpanHelper.
EnablePcapAll (std::string (
"lr-wpan-data"), 
true);
 
  164       params.m_dstExtAddr = 
Mac64Address (
"00:00:00:00:00:00:00:02");
 
  166   params.m_msduHandle = 0;
 
  171                                   dev0->GetMac (), params, p0);
 
  181       params.m_dstExtAddr = 
Mac64Address (
"00:00:00:00:00:00:00:01");
 
  185                                   dev1->GetMac (), params, p2);
 
uint16_t m_dstPanId
Destination PAN identifier. 
 
Simulation virtual time values and global simulation resolution. 
 
Manage ASCII trace files for device models. 
 
static std::string LrWpanPhyEnumerationPrinter(LrWpanPhyEnumeration e)
Transform the LrWpanPhyEnumeration enumeration into a printable string. 
 
static void Run(void)
Run the simulation. 
 
static void StateChangeNotification(std::string context, Time now, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits. ...
 
virtual void AddPropagationLossModel(Ptr< PropagationLossModel > loss)
Add the single-frequency propagation loss model to be used. 
 
void McpsDataRequest(McpsDataRequestParams params, Ptr< Packet > p)
IEEE 802.15.4-2006, section 7.1.1.1 MCPS-DATA.request Request to transfer a MSDU. ...
 
double GetSeconds(void) const 
Get an approximation of the time stored in this instance in the indicated unit. 
 
static void DataIndication(McpsDataIndicationParams params, Ptr< Packet > p)
 
void EnablePcapAll(std::string prefix, bool promiscuous=false)
Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created ...
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
MCPS-DATA.confirm params. 
 
Parse command-line arguments. 
 
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy(). 
 
LrWpanMcpsDataConfirmStatus m_status
The status of the last MSDU transmission. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionaly. 
 
This class can contain 16 bit addresses. 
 
void SetPosition(const Vector &position)
 
void SetExtendedAddress(Mac64Address address)
Set the extended address of this MAC. 
 
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context. 
 
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node. 
 
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
virtual void SetPropagationDelayModel(Ptr< PropagationDelayModel > delay)
Set the propagation delay model to be used. 
 
void Parse(int argc, char *argv[])
Parse the program arguments. 
 
void EnableAsciiAll(std::string prefix)
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes c...
 
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3. 
 
MCPS-DATA.request params. 
 
helps to manage and create IEEE 802.15.4 NetDevice objects 
 
void EnableLogComponents(void)
Helper to enable all LrWpan log components with one statement. 
 
static void DataConfirm(McpsDataConfirmParams params)
 
MCPS-DATA.indication params.