33 #include "ns3/core-module.h"
34 #include "ns3/network-module.h"
39 int main (
int argc,
char *argv[])
44 cmd.
AddValue (
"verbose",
"turn on log components", verbose);
45 cmd.
Parse(argc, argv);
65 txDev = CreateObject<SimpleNetDevice> ();
69 rxDev = CreateObject<SimpleNetDevice> ();
virtual Address GetAddress(void) const
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
smart pointer class similar to boost::intrusive_ptr
void SetLocal(PacketSocketAddress addr)
set the local address and protocol to be used
an address for a packet socket
static void Run(void)
Run the simulation until one of:
Give ns3::PacketSocket powers to ns3::Node.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
int main(int argc, char *argv[])
virtual void SetNode(Ptr< Node > node)
Parse command-line arguments.
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
void SetPhysicalAddress(const Address address)
Set the destination address.
keep track of a set of node pointers.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
void SetRemote(PacketSocketAddress addr)
set the remote address and protocol to be used
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD.
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
void SetProtocol(uint16_t protocol)
Set the protocol.
void Parse(int argc, char *argv[])
Parse the program arguments.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetChannel(Ptr< SimpleChannel > channel)
Attach a channel to this net device.
virtual uint32_t GetIfIndex(void) const
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.