21 #include "ns3/simple-net-device.h"
22 #include "ns3/simulator.h"
23 #include "ns3/packet.h"
38 .AddConstructor<ErrorChannelSixlow> ()
151 static TypeId tid =
TypeId (
"ns3::BinaryErrorSixlowModel")
153 .AddConstructor<BinaryErrorSixlowModel> ()
virtual uint32_t GetNDevices(void) const
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 "...
static TypeId GetTypeId(void)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
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.
void SetDuplicateTime(Time delay)
Set the delay for the odd duplicate packets (even ones are not duplicated)
General error model that can be used to corrupt packets.
void SetJumpingMode(bool mode)
Set if the odd packets are delayed (even ones are not delayed ever)
void SetJumpingTime(Time delay)
Set the delay for the odd packets (even ones are not delayed)
bool IsEnabled(void) const
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
virtual void DoReset(void)
Re-initialize any state.
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 bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model.
virtual ~BinaryErrorSixlowModel()
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
static TypeId GetTypeId(void)
void SetDuplicateMode(bool mode)
Set if the odd packets are duplicated (even ones are not duplicated ever)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
std::vector< Ptr< SimpleNetDevice > > m_devices
virtual void Add(Ptr< SimpleNetDevice > device)
Attached a net device to the channel.