21 #ifndef SATELLITE_GEO_NET_DEVICE_H
22 #define SATELLITE_GEO_NET_DEVICE_H
24 #include <ns3/error-model.h>
25 #include <ns3/mac48-address.h>
26 #include <ns3/net-device.h>
27 #include <ns3/output-stream-wrapper.h>
28 #include <ns3/satellite-channel.h>
29 #include <ns3/satellite-isl-arbiter.h>
30 #include <ns3/satellite-mac.h>
31 #include <ns3/satellite-phy.h>
32 #include <ns3/satellite-point-to-point-isl-net-device.h>
33 #include <ns3/satellite-signal-parameters.h>
34 #include <ns3/traced-callback.h>
43 class PointToPointIslNetDevice;
105 Ptr<SatSignalParameters> rxParams);
112 void AddUserPhy(Ptr<SatPhy> phy, uint32_t beamId);
152 void AddUserMac(Ptr<SatMac> mac, uint32_t beamId);
160 void AddFeederMac(Ptr<SatMac> mac, Ptr<SatMac> macUsed, uint32_t beamId);
199 void AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress);
295 void SendToIsl(Ptr<Packet> packet, Mac48Address destination);
302 void ReceiveFromIsl(Ptr<Packet> packet, Mac48Address destination);
305 virtual void SetIfIndex(
const uint32_t index);
309 virtual bool SetMtu(
const uint16_t mtu);
310 virtual uint16_t
GetMtu(
void)
const;
316 virtual Address
GetMulticast(Ipv4Address multicastGroup)
const;
319 virtual bool Send(Ptr<Packet> packet,
const Address& dest, uint16_t protocolNumber);
320 virtual bool SendFrom(Ptr<Packet> packet,
321 const Address& source,
323 uint16_t protocolNumber);
324 virtual Ptr<Node>
GetNode(
void)
const;
325 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.
SatGeoNetDevice to be utilized in geostationary satellite.
bool m_isStatisticsTagsEnabled
void ReceiveFromIsl(Ptr< Packet > packet, Mac48Address destination)
Receive a packet from ISL.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual uint16_t GetMtu(void) const
Mac48Address GetSatelliteFeederAddress(uint32_t beamId)
Get satellite feeder entry from associated beam ID.
virtual Address GetAddress(void) const
TracedCallback< const Time &, const Address & > m_rxFeederLinkJitterTrace
Traced callback for all received packets, including feeder link jitter information and the address of...
virtual bool IsBridge(void) const
Ptr< SatIslArbiter > GetArbiter()
Get the arbiter for ISL routing.
std::map< Mac48Address, Time > m_lastDelays
SatGeoNetDevice()
Default constructor.
std::map< uint32_t, Ptr< SatMac > > GetAllFeederMac()
Get all Feeder MAC objects attached to this satellite.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
void DisconnectGw(Mac48Address gwAddress)
Disconnect a GW to this satellite.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
std::set< Mac48Address > m_utConnected
Set containing all connected UTs.
virtual bool SetMtu(const uint16_t mtu)
void AddUserPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the User Phy object for the beam.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual void SetAddress(Address address)
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
void AddIslsNetDevice(Ptr< PointToPointIslNetDevice > islNetDevices)
Add a ISL Net Device to this satellite.
NetDevice::PromiscReceiveCallback m_promiscCallback
std::map< uint32_t, Ptr< SatPhy > > m_userPhy
std::map< uint32_t, Ptr< SatMac > > m_userMac
std::map< uint32_t, Ptr< SatPhy > > GetFeederPhy()
Get all Feeder Phy objects attached to this satellite.
Address GetRxUtAddress(Ptr< Packet > packet, SatEnums::SatLinkDir_t ld)
Get UT MAC address associated to this packet.
static TypeId GetTypeId(void)
Get the type ID.
std::set< Mac48Address > m_gwConnected
Set containing all connected GWs.
void SetForwardLinkRegenerationMode(SatEnums::RegenerationMode_t forwardLinkRegenerationMode)
Set the forward link regeneration mode.
virtual bool SupportsSendFrom(void) const
std::map< uint32_t, Ptr< SatMac > > m_allFeederMac
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.
NetDevice::ReceiveCallback m_rxCallback
TracedCallback< Ptr< const Packet >, const Address & > m_signallingTxTrace
Traced callback for all signalling (control message) packets sent, including the destination address.
std::map< uint32_t, Ptr< SatPhy > > m_feederPhy
std::set< Mac48Address > GetUtConnected()
The the list of UT MAC connected to this satellite.
virtual void SetIfIndex(const uint32_t index)
virtual bool IsMulticast(void) const
void ReceivePacketFeeder(Ptr< Packet > packet, const Address &feederAddress)
Receive the packet from the lower layers, in network regeneration on forward link.
void SendToIsl(Ptr< Packet > packet, Mac48Address destination)
Send a packet to ISL.
virtual Address GetBroadcast(void) const
virtual bool IsLinkUp(void) const
void ConnectUt(Mac48Address utAddress)
Connect a UT to this satellite.
void AddFeederMac(Ptr< SatMac > mac, Ptr< SatMac > macUsed, uint32_t beamId)
Add the Feeder MAC object for the beam.
void AddUserMac(Ptr< SatMac > mac, uint32_t beamId)
Add the User MAC object for the beam.
std::map< uint32_t, Ptr< SatMac > > GetUserMac()
Get all User MAC objects attached to this satellite.
std::map< uint32_t, Mac48Address > m_addressMapFeeder
Ptr< ErrorModel > m_receiveErrorModel
void AddFeederPair(uint32_t beamId, Mac48Address satelliteFeederAddress)
Add an entry in the database to get satellite feeder address from beam ID.
virtual void DoDispose(void)
Dispose of this class instance.
std::map< uint32_t, Ptr< SatMac > > GetFeederMac()
Get all Feeder MAC objects attached to this satellite that are in use.
virtual bool NeedsArp(void) const
virtual uint32_t GetIfIndex(void) const
TracedCallback< const Time &, const Address & > m_rxFeederLinkDelayTrace
Traced callback for all received packets, including feeder link delay information and the address of ...
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SatGeoNetDevice.
void DisconnectUt(Mac48Address utAddress)
Disconnect a UT to this satellite.
bool SendControlMsgToFeeder(Ptr< SatControlMessage > msg, const Address &dest, Ptr< SatSignalParameters > rxParams)
Send a control packet on the feeder link.
std::vector< Ptr< PointToPointIslNetDevice > > m_islNetDevices
List of ISLs starting from this node.
Ptr< SatIslArbiter > m_arbiter
Arbiter used to route on ISLs.
TracedCallback< Ptr< const Packet > > m_txTrace
Traced callback for all packets received to be transmitted.
virtual Ptr< Node > GetNode(void) const
virtual void AddLinkChangeCallback(Callback< void > callback)
virtual void SetNode(Ptr< Node > node)
void SetReturnLinkRegenerationMode(SatEnums::RegenerationMode_t returnLinkRegenerationMode)
Set the return link regeneration mode.
virtual bool IsPointToPoint(void) const
std::vector< Ptr< PointToPointIslNetDevice > > GetIslsNetDevices()
Get all the ISL Net devices.
TracedCallback< const Time &, const Address & > m_rxUserLinkJitterTrace
Traced callback for all received packets, including user link jitter information and the address of t...
void ReceiveUser(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
virtual Address GetMulticast(Ipv4Address multicastGroup) const
void ReceivePacketUser(Ptr< Packet > packet, const Address &userAddress)
Receive the packet from the lower layers, in network regeneration on return link.
void ConnectGw(Mac48Address gwAddress)
Connect a GW to this satellite.
TracedCallback< const Time &, const Address & > m_rxUserLinkDelayTrace
Traced callback for all received packets, including user link delay information and the address of th...
std::set< Mac48Address > GetGwConnected()
The the list of MAC GW connected to this satellite.
void SetNodeId(uint32_t nodeId)
TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > m_packetTrace
void ReceiveFeeder(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters > rxParams)
Receive the packet from the lower layers.
virtual bool IsBroadcast(void) const
virtual Ptr< Channel > GetChannel(void) const
void AddFeederPhy(Ptr< SatPhy > phy, uint32_t beamId)
Add the Feeder Phy object for the beam.
std::map< uint32_t, Ptr< SatPhy > > GetUserPhy()
Get all User Phy objects attached to this satellite.
TracedCallback< Ptr< const Packet >, const Address & > m_rxUserTrace
Traced callback for all received packets on user, including the address of the senders.
std::map< uint32_t, Ptr< SatMac > > m_feederMac
TracedCallback< Ptr< const Packet >, const Address & > m_rxFeederTrace
Traced callback for all received packets on feeder, including the address of the senders.
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.