27 #include <ns3/packet.h>
28 #include <ns3/simulator.h>
33 NS_LOG_COMPONENT_DEFINE(
"SatSimpleChannel");
38 NS_OBJECT_ENSURE_REGISTERED(SatSimpleChannel);
44 TypeId(
"ns3::SatSimpleChannel").SetParent<Channel>().AddConstructor<SatSimpleChannel>();
50 NS_LOG_FUNCTION(
this);
58 Ptr<SatSimpleNetDevice> sender)
60 NS_LOG_FUNCTION(
this << p << protocol << to << from << sender);
61 for (std::vector<Ptr<SatSimpleNetDevice>>::const_iterator i =
m_devices.begin();
65 Ptr<SatSimpleNetDevice> device = *i;
69 Simulator::ScheduleWithContext(device->GetNode()->GetId(),
84 NS_LOG_FUNCTION(
this << device);
91 NS_LOG_FUNCTION(
this);
98 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.