21 #ifndef SATELLITE_ORBITER_NET_DEVICE_H
22 #define SATELLITE_ORBITER_NET_DEVICE_H
31 #include <ns3/error-model.h>
32 #include <ns3/mac48-address.h>
33 #include <ns3/net-device.h>
34 #include <ns3/output-stream-wrapper.h>
35 #include <ns3/traced-callback.h>
46 class PointToPointIslNetDevice;
108 Ptr<SatSignalParameters> rxParams) = 0;
115 void AddUserPhy(Ptr<SatPhy> phy, uint32_t beamId);
155 void AddUserMac(Ptr<SatMac> mac, uint32_t beamId);
163 void AddFeederMac(Ptr<SatMac> mac, Ptr<SatMac> macUsed, uint32_t beamId);
202 void AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress);
209 void AddUserPair(uint32_t beamId, Mac48Address satelliteUserAddress);
250 void ConnectGw(Mac48Address gwAddress, uint32_t beamId);
257 void DisconnectGw(Mac48Address gwAddress, uint32_t beamId);
271 virtual void ConnectUt(Mac48Address utAddress, uint32_t beamId) = 0;
278 virtual void DisconnectUt(Mac48Address utAddress, uint32_t beamId) = 0;
316 void SendToIsl(Ptr<Packet> packet, Mac48Address destination);
326 virtual void SetIfIndex(
const uint32_t index);
330 virtual bool SetMtu(
const uint16_t mtu);
331 virtual uint16_t
GetMtu(
void)
const;
337 virtual Address
GetMulticast(Ipv4Address multicastGroup)
const;
340 virtual bool Send(Ptr<Packet> packet,
const Address& dest, uint16_t protocolNumber);
341 virtual bool SendFrom(Ptr<Packet> packet,
342 const Address& source,
344 uint16_t protocolNumber);
345 virtual Ptr<Node>
GetNode(
void)
const;
346 virtual void SetNode(Ptr<Node> node);
SatLinkDir_t
Link direction used for packet tracing.
SatNodeType_t
Node type used for packet tracing.
SatPacketEvent_t
Packet event used for packet tracing.
SatLogLevel_t
Log level used for packet tracing.
RegenerationMode_t
The regeneration mode used in satellites.
SatOrbiterNetDevice to be utilized in geostationary satellite.
Ptr< SatIslArbiter > m_arbiter
Arbiter used to route on ISLs.
virtual bool IsLinkUp(void) const
void ReceiveFeeder(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
std::map< uint32_t, Mac48Address > m_addressMapFeeder
virtual void ConnectUt(Mac48Address utAddress, uint32_t beamId)=0
Connect a UT to this satellite.
std::map< uint32_t, Mac48Address > m_addressMapUser
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SatOrbiterNetDevice.
virtual bool IsPointToPoint(void) const
std::set< Mac48Address > GetGwConnected()
The the list of MAC GW connected to this satellite.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
void ConnectGw(Mac48Address gwAddress, uint32_t beamId)
Connect a GW to this satellite.
void DisconnectGw(Mac48Address gwAddress, uint32_t beamId)
Disconnect a GW to this satellite.
std::map< Mac48Address, uint32_t > m_gwConnected
Set containing all connected GWs.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
virtual uint32_t GetIfIndex(void) const
std::vector< Ptr< PointToPointIslNetDevice > > GetIslsNetDevices()
Get all the ISL Net devices.
std::map< uint32_t, Ptr< SatMac > > GetFeederMac()
Get all Feeder MAC objects attached to this satellite that are in use.
TracedCallback< Ptr< const Packet > > m_txTrace
Traced callback for all packets received to be transmitted.
virtual void AddLinkChangeCallback(Callback< void > callback)
void SetNodeId(uint32_t nodeId)
void AddUserPair(uint32_t beamId, Mac48Address satelliteUserAddress)
Add an entry in the database to get satellite user address from beam ID.
virtual void DisconnectUt(Mac48Address utAddress, uint32_t beamId)=0
Disconnect a UT to this satellite.
virtual bool SendControlMsgToFeeder(Ptr< SatControlMessage > msg, const Address &dest, Ptr< SatSignalParameters > rxParams)=0
Send a control packet on the feeder link.
Mac48Address GetSatelliteUserAddress(uint32_t beamId)
Get satellite user entry from associated beam ID.
virtual Address GetMulticast(Ipv4Address multicastGroup) const
std::set< Mac48Address > GetUtConnected()
The the list of UT MAC connected to this satellite.
void SetArbiter(Ptr< SatIslArbiter > arbiter)
Set the arbiter for ISL routing.
std::set< uint32_t > m_broadcastReceived
Keep a count of all incoming broadcast data to avoid handling them several times.
Address GetRxUtAddress(Ptr< Packet > packet, SatEnums::SatLinkDir_t ld)
Get UT MAC address associated to this packet.
std::map< uint32_t, Ptr< SatPhy > > GetUserPhy()
Get all User Phy objects attached to this satellite.
std::vector< Ptr< PointToPointIslNetDevice > > m_islNetDevices
List of ISLs starting from this node.
void ReceiveUser(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
virtual Ptr< Node > GetNode(void) const
void SetForwardLinkRegenerationMode(SatEnums::RegenerationMode_t forwardLinkRegenerationMode)
Set the forward link regeneration mode.
NetDevice::ReceiveCallback m_rxCallback
TracedCallback< const Time &, const Address & > m_rxUserLinkJitterTrace
Traced callback for all received packets, including user link jitter information and the address of t...
TracedCallback< Ptr< const Packet >, const Address & > m_rxUserTrace
Traced callback for all received packets on user, including the address of the senders.
TracedCallback< Ptr< const Packet >, const Address & > m_signallingTxTrace
Traced callback for all signalling (control message) packets sent, including the destination address.
TracedCallback< Ptr< const Packet >, const Address & > m_rxFeederTrace
Traced callback for all received packets on feeder, including the address of the senders.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
TracedCallback< const Time &, const Address & > m_rxFeederLinkDelayTrace
Traced callback for all received packets, including feeder link delay information and the address of ...
std::map< uint32_t, Ptr< SatMac > > m_feederMac
virtual Address GetAddress(void) const
virtual void SetAddress(Address address)
virtual bool NeedsArp(void) const
void AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress)
Add an entry in the database to get satellite feeder address from beam ID.
std::map< Mac48Address, Time > m_lastDelays
std::map< uint32_t, Ptr< SatMac > > m_userMac
SatOrbiterNetDevice()
Default constructor.
virtual bool SupportsSendFrom(void) const
std::map< uint32_t, Ptr< SatPhy > > m_userPhy
void AddUserMac(Ptr< SatMac > mac, uint32_t beamId)
Add the User MAC object for the beam.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
void AddFeederPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the Feeder Phy object for the beam.
void SetReturnLinkRegenerationMode(SatEnums::RegenerationMode_t returnLinkRegenerationMode)
Set the return link regeneration mode.
void AddFeederMac(Ptr< SatMac > mac, Ptr< SatMac > macUsed, uint32_t beamId)
Add the Feeder MAC object for the beam.
Ptr< SatIslArbiter > GetArbiter()
Get the arbiter for ISL routing.
std::map< uint32_t, Ptr< SatPhy > > GetFeederPhy()
Get all Feeder Phy objects attached to this satellite.
std::map< uint32_t, Ptr< SatMac > > GetUserMac()
Get all User MAC objects attached to this satellite.
void SendToIsl(Ptr< Packet > packet, Mac48Address destination)
Send a packet to ISL.
NetDevice::PromiscReceiveCallback m_promiscCallback
Ptr< ErrorModel > m_receiveErrorModel
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
virtual bool IsBridge(void) const
virtual bool SetMtu(const uint16_t mtu)
virtual void ReceivePacketFeeder(Ptr< Packet > packet, const Address &feederAddress)=0
Receive the packet from the lower layers, in network regeneration on forward link.
std::map< uint32_t, Ptr< SatMac > > GetAllFeederMac()
Get all Feeder MAC objects attached to this satellite.
std::map< uint32_t, Ptr< SatMac > > m_allFeederMac
TracedCallback< const Time &, const Address & > m_rxUserLinkDelayTrace
Traced callback for all received packets, including user link delay information and the address of th...
void AddUserPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the User Phy object for the beam.
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
TracedCallback< const Time &, const Address & > m_rxFeederLinkJitterTrace
Traced callback for all received packets, including feeder link jitter information and the address of...
virtual bool IsMulticast(void) const
virtual Ptr< Channel > GetChannel(void) const
virtual bool IsBroadcast(void) const
static TypeId GetTypeId(void)
Get the type ID.
Mac48Address GetSatelliteFeederAddress(uint32_t beamId)
Get satellite feeder entry from associated beam ID.
virtual Address GetBroadcast(void) const
virtual void SetIfIndex(const uint32_t index)
std::map< uint32_t, Ptr< SatPhy > > m_feederPhy
bool m_isStatisticsTagsEnabled
void AddIslsNetDevice(Ptr< PointToPointIslNetDevice > islNetDevices)
Add a ISL Net Device to this satellite.
virtual uint16_t GetMtu(void) const
virtual void ReceiveFromIsl(Ptr< Packet > packet, Mac48Address destination)=0
Receive a packet from ISL.
virtual void ReceivePacketUser(Ptr< Packet > packet, const Address &userAddress)=0
Receive the packet from the lower layers, in network regeneration on return link.
std::map< Mac48Address, uint32_t > m_utConnected
Set containing all connected UTs.
virtual void DoDispose(void)
Dispose of this class instance.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual void SetNode(Ptr< Node > node)
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.