21 #include "ns3/simple-net-device.h" 
   22 #include "ns3/simulator.h" 
   23 #include "ns3/packet.h" 
   38     .AddConstructor<ErrorChannel> ()
 
  113     .AddConstructor<BinaryErrorModel> ()
 
virtual bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model. 
Simulation virtual time values and global simulation resolution. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory. 
std::vector< Ptr< SimpleNetDevice > > m_devices
void Receive(Ptr< Packet > packet, uint16_t protocol, Mac48Address to, Mac48Address from)
Receive a packet from a connected SimpleChannel. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
Abstract Channel Base Class. 
static TypeId GetTypeId(void)
General error model that can be used to corrupt packets. 
virtual ~BinaryErrorModel()
virtual void DoReset(void)
Re-initialize any state. 
bool IsEnabled(void) const 
static TypeId GetTypeId(void)
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event with the given context. 
void SetJumpingMode(bool mode)
Set if the odd packets are delayed (even ones are not delayed ever) 
Ptr< Packet > Copy(void) const 
performs a COW copy of the packet. 
void SetJumpingTime(Time delay)
Set the delay for the odd packets (even ones are not delayed) 
virtual void Add(Ptr< SimpleNetDevice > device)
Attached a net device to the channel. 
virtual void Send(Ptr< Packet > p, uint16_t protocol, Mac48Address to, Mac48Address from, Ptr< SimpleNetDevice > sender)
A packet is sent by a net device. 
virtual uint32_t GetNDevices(void) const 
a unique identifier for an interface. 
TypeId SetParent(TypeId tid)
virtual Ptr< NetDevice > GetDevice(uint32_t i) const