27 #include <ns3/callback.h>
28 #include <ns3/nstime.h>
30 #include <ns3/traced-callback.h>
45 class SatSignalParameters;
46 class SatFwdLinkScheduler;
89 uint32_t feederBeamId);
114 void TbtpSent(Ptr<SatTbtpMessage> tbtp);
183 typedef Callback<void, Address, uint32_t, uint32_t, Callback<void, uint32_t>>
LogonCallback;
255 void ChangeBeam(uint32_t satId, uint32_t beamId);
309 Time satelliteReceptionTime,
346 std::map<uint32_t, std::vector<Ptr<SatTbtpMessage>>>
m_tbtps;
GW specific Mac class for Sat Net Devices.
void SetLogonCallback(SatGwMac::LogonCallback cb)
Method to set logon callback.
bool m_disableSchedulingIfNoDeviceConnected
If true, the periodic calls of StartTransmission are not called when no devices are connected to this...
SatGwMac::HandoverCallback m_handoverCallback
Callback to query/apply handover on the terrestrial network.
Ptr< SatFwdLinkScheduler > m_fwdScheduler
Scheduler for the forward link.
void TbtpSent(Ptr< SatTbtpMessage > tbtp)
Function called when a TBTP has been sent by the SatBeamScheduler.
Callback< void > ClearQueuesCallback
Callback to clear LLC queues.
SatGwMac::TxOpportunityCallback m_txOpportunityCallback
Callback to notify the txOpportunity to upper layer Returns a packet Attributes: payload in bytes.
void SendLogonResponse(Address utId, uint32_t raChannel)
std::map< Address, Time > m_lastCmtSent
Time of last CMT sending for each UT.
void SetTxOpportunityCallback(SatGwMac::TxOpportunityCallback cb)
Method to set Tx opportunity callback.
void SetRemoveUtCallback(SatGwMac::RemoveUtCallback cb)
Method to set callback for UT removing.
Time m_cmtPeriodMin
Minimum interval between two CMT control messages for a same UT.
Callback< void, Address, uint32_t, uint32_t > RemoveUtCallback
Callback to indicate NCC a UT needs to be removed.
void SetFwdScheduler(Ptr< SatFwdLinkScheduler > fwdScheduler)
Method to set forward link scheduler.
static TypeId GetTypeId(void)
Get the type ID.
SatGwMac::PhyBeamCallback m_beamCallback
Callback to change phy-layer beam ID.
Callback< Ptr< Packet >, uint32_t, Mac48Address, uint32_t & > TxOpportunityCallback
Callback to notify upper layer about Tx opportunity.
SatGwMac::CrReceiveCallback m_crReceiveCallback
Capacity request receive callback.
bool m_broadcastNcr
Broadcast NCR messages to all UTs.
void ChangeBeam(uint32_t satId, uint32_t beamId)
Method handling beam handover.
static void SendLogonResponseHelper(SatGwMac *self, Address utId, uint32_t raChannel)
void SetHandoverCallback(SatGwMac::HandoverCallback cb)
Method to set handover callback.
void ConnectUt(Mac48Address utAddress)
Connect a UT to this satellite.
bool HasPeer()
Indicates if at least one device is connected in this beam.
SatGwMac::ClearQueuesCallback m_clearQueuesCallback
Callback to clear LLC queues.
void SetCrReceiveCallback(SatGwMac::CrReceiveCallback cb)
Method to set read control message callback.
uint32_t m_feederBeamId
ID of beam linked to this GW.
SatGwMac::LogonCallback m_logonCallback
Callback to log a terminal on.
Callback< void, Address, uint32_t, uint32_t, Callback< void, uint32_t > > LogonCallback
Callback to register UT logon.
void StartNcrTransmission()
Send a NCR packet to the UTs.
void ReceiveSignalingPacket(Ptr< Packet > packet, uint32_t satId, uint32_t beamId)
Signaling packet receiver, which handles all the signaling packet receptions.
~SatGwMac()
Destroy a SatGwMac.
SatGwMac()
Default constructor, which is not used.
uint32_t GetFeederBeamId()
Get ID of beam linked to this GW.
TracedCallback< Ptr< SatBbFrame > > m_bbFrameTxTrace
Trace for transmitted BB frames.
void SendCmtMessage(Address utId, Time burstDuration, Time satelliteReceptionTime, uint32_t satId, uint32_t beamId)
void StartTransmission(uint32_t carrierId)
Start sending a Packet Down the Wire.
Callback< void, uint32_t, uint32_t, Address, Ptr< SatCrMessage > > CrReceiveCallback
Callback to receive capacity request (CR) messages.
SatGwMac::RemoveUtCallback m_removeUtCallback
Callback to indicate NCC a UT needs to be removed.
SatGwMac::ControlMessageReceivedCallback m_controlMessageReceivedCallback
Callback to indicate NCC a control burst has been received.
std::map< uint32_t, std::vector< Ptr< SatTbtpMessage > > > m_tbtps
List of TBTPs sent to UTs.
void Receive(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >)
Receive packet from lower layer.
void SetControlMessageReceivedCallback(SatGwMac::ControlMessageReceivedCallback cb)
Method to set callback for control burst reception.
Callback< void, Address, uint32_t, uint32_t, uint32_t, uint32_t > HandoverCallback
Callback to query/apply handover on the terrestrial network.
SatGwMac(const SatGwMac &)
bool m_useCmt
Use CMT control messages to correct time on the UTs.
uint32_t GetFeederSatId()
Get ID of satellite linked to this GW.
void RemoveTbtp(uint32_t superframeCounter)
Function used to clear old TBTP.
bool m_periodicTransmissionEnabled
Indicated if periodic transmission is enabled.
SatGwMac & operator=(const SatGwMac &)
Callback< void, uint32_t, uint32_t > PhyBeamCallback
Callback to change phy-layer beam ID.
void StartPeriodicTransmissions()
Starts periodical transmissions.
void SetBeamCallback(SatGwMac::PhyBeamCallback cb)
Method to set phy-layer beam handover callback.
virtual void StopPeriodicTransmissions()
Stop periodic transmission, until a pacquet in enqued.
std::set< Mac48Address > m_peers
List of UT MAC connected to this MAC.
void DisconnectUt(Mac48Address utAddress)
Disconnect a UT to this satellite.
Ptr< Node > m_node
Node containing this MAC.
Time m_ncrInterval
Interval between two broadcast of NCR dates.
Callback< void, Address, uint32_t, uint32_t > ControlMessageReceivedCallback
Callback to inform NCC a control burst has been received.
uint32_t m_feederSatId
ID of satellite linked to this GW.
TypeId GetInstanceTypeId(void) const
Derived from Object.
Time m_guardTime
Guard time for BB frames.
void SetClearQueuesCallback(SatGwMac::ClearQueuesCallback cb)
Method to set callback for LLC queues clearing.
Base MAC class for SatNetDevices.
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.