27 #include <ns3/packet.h>
28 #include <ns3/simulator.h>
30 NS_LOG_COMPONENT_DEFINE(
"SatSimpleChannel");
35 NS_OBJECT_ENSURE_REGISTERED(SatSimpleChannel);
41 TypeId(
"ns3::SatSimpleChannel").SetParent<Channel>().AddConstructor<SatSimpleChannel>();
47 NS_LOG_FUNCTION(
this);
55 Ptr<SatSimpleNetDevice> sender)
57 NS_LOG_FUNCTION(
this << p << protocol << to << from << sender);
58 for (std::vector<Ptr<SatSimpleNetDevice>>::const_iterator i =
m_devices.begin();
62 Ptr<SatSimpleNetDevice> device = *i;
66 Simulator::ScheduleWithContext(device->GetNode()->GetId(),
81 NS_LOG_FUNCTION(
this << device);
88 NS_LOG_FUNCTION(
this);
95 NS_LOG_FUNCTION(
this << i);
SatSimpleChannel()
Default constructor.
virtual void Send(Ptr< Packet > p, uint16_t protocol, Mac48Address to, Mac48Address from, Ptr< SatSimpleNetDevice > sender)
A packet is sent by a net device.
virtual std::size_t GetNDevices(void) const
std::vector< Ptr< SatSimpleNetDevice > > m_devices
static TypeId GetTypeId(void)
Get the type ID.
virtual void Add(Ptr< SatSimpleNetDevice > device)
Attached a net device to the channel.
virtual Ptr< NetDevice > GetDevice(std::size_t i) const
void Receive(Ptr< Packet > packet, uint16_t protocol, Mac48Address to, Mac48Address from)
Receive a packet from a connected SatSimpleChannel.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.