UT specific Mac class for Sat Net Devices. More...
#include "satellite-ut-mac.h"
Classes | |
| class | SatTimuInfo |
Public Types | |
| typedef Callback< void, uint8_t, uint32_t > | AssignedDaResourcesCallback |
| Callback for informing the amount of dedicated access bytes received from TBTP. | |
| typedef Callback< void, Mac48Address > | GatewayUpdateCallback |
| Callback to update gateway address after handover. | |
| typedef Callback< void, uint32_t, uint32_t > | HandoverCallback |
| Callback to reconfigure physical layer during handover. | |
| typedef Callback< void > | SendLogonCallback |
| Callback to send a logon message to the gateway. | |
| typedef Callback< void, uint8_t > | SliceSubscriptionCallback |
| Callback to check if TX is operational. | |
| typedef void(* | TbtpResourcesTraceCallback) (uint32_t size) |
| Callback signature for DaResourcesTrace trace source. | |
| typedef Callback< Time > | TimingAdvanceCallback |
| typedef Callback< bool > | TxCheckCallback |
| Callback to check if TX is operational. | |
| typedef Callback< void, Ptr< Node > > | UpdateAddressAndIdentifierCallback |
| Callback to update addresses in statistics helpers. | |
| typedef Callback< void, Mac48Address > | UpdateGwAddressCallback |
| Callback to update GW address to SatRequestManager. | |
| Public Types inherited from ns3::SatMac | |
| typedef Callback< Ptr< SatBeamScheduler >, uint32_t, uint32_t > | BeamSchedulerCallback |
| Callback to get the SatBeamScheduler from the beam ID for handover. | |
| typedef Callback< void, Ptr< const Packet > > | LoraReceiveCallback |
| Callback to receive packet by upper layer. | |
| typedef Callback< Ptr< SatControlMessage >, uint32_t > | ReadCtrlMsgCallback |
| Callback to read control messages from container storing control messages. | |
| typedef Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > | ReceiveCallback |
| Callback to receive packet by upper layer. | |
| typedef Callback< uint32_t, Ptr< SatControlMessage > > | ReserveCtrlMsgCallback |
| Callback to reserve an id and initially store the control message. | |
| typedef Callback< void, Address, Address > | RoutingUpdateCallback |
| Callback to update routing and ARP tables after handover. | |
| typedef Callback< uint32_t, uint32_t > | SendCtrlMsgCallback |
| Callback to send a control message and allocate a recv ID for it. | |
| typedef Callback< void, SatPhy::PacketContainer_t, uint32_t, Time, SatSignalParameters::txInfo_s > | TransmitCallback |
| Callback to send packet to lower layer. | |
| typedef Callback< void > | UpdateIslCallback |
| Callback to update ISL routes when handovers are performed. | |
Public Member Functions | |
| SatUtMac () | |
| Default constructor, which is not used. | |
| SatUtMac (Ptr< Node > node, uint32_t satId, uint32_t beamId, Ptr< SatSuperframeSeq > seq, bool crdsaOnlyForControl) | |
| Construct a SatUtMac. | |
| ~SatUtMac () | |
| Destroy a SatUtMac. | |
| bool | ControlMsgTransmissionPossible () const |
| Method to check whether a transmission of a control msg is somewhat possible. | |
| uint32_t | GetBeamId () const |
| Get beam ID of the object. | |
| Mac48Address | GetGwAddress () |
| Get address of the GW (or its MAC) serving this UT. | |
| Time | GetNextSuperFrameTxTime (uint8_t superFrameSeqId) const |
| Get Tx time for the next possible superframe. | |
| uint32_t | GetRaChannel () const |
| Get RA channel assigned for this UT. | |
| SatUtMacState::RcstState_t | GetRcstState () const |
| uint32_t | GetSatId () const |
| Get sat ID of the object. | |
| void | LogOff () |
| bool | LogonMsgTransmissionPossible () const |
| Method to check whether a transmission of a logon msg is somewhat possible. | |
| virtual void | Receive (SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >) |
| Receive packet from lower layer. | |
| virtual void | ReceiveQueueEvent (SatQueue::QueueEvent_t event, uint8_t rcIndex) |
| Receive a queue event: | |
| virtual void | ReceiveQueueEventEssa (SatQueue::QueueEvent_t event, uint8_t rcIndex) |
| Receive a queue event: | |
| void | SendLogon (Ptr< Packet > packet) |
| Receive a logon message to transmit /param packet The logon packet to send. | |
| void | SetAssignedDaResourcesCallback (SatUtMac::AssignedDaResourcesCallback cb) |
| Set the assigned DA resources callback. | |
| void | SetGatewayUpdateCallback (SatUtMac::GatewayUpdateCallback cb) |
| Method to set the gateway address update callback. | |
| void | SetGwAddress (Mac48Address gwAddress) |
| Set address of the GW (or its MAC) serving this UT. | |
| void | SetHandoverCallback (SatUtMac::HandoverCallback cb) |
| Method to set handover callback. | |
| void | SetLogonChannel (uint32_t channelId) |
| virtual void | SetNodeInfo (Ptr< SatNodeInfo > nodeInfo) |
| Set the node info. | |
| void | SetRaChannel (uint32_t raChannel) |
| Set RA channel assigned for this UT. | |
| void | SetRandomAccess (Ptr< SatRandomAccess > randomAccess) |
| Set the random access module. | |
| virtual void | SetSatelliteAddress (Address satelliteAddress) |
| Set the satellite MAC address on the other side of this link (if regenerative satellite). | |
| void | SetSendLogonCallback (SatUtMac::SendLogonCallback cb) |
| Set the logon callback. | |
| void | SetSliceSubscriptionCallback (SatUtMac::SliceSubscriptionCallback cb) |
| Get sliec subscription info from MAC layer. | |
| void | SetTimingAdvanceCallback (SatUtMac::TimingAdvanceCallback cb) |
| Set the timing advance callback. | |
| void | SetTxCheckCallback (SatUtMac::TxCheckCallback cb) |
| Set the TX check callback. | |
| void | SetUpdateAddressAndIdentifierCallback (SatUtMac::UpdateAddressAndIdentifierCallback cb) |
| Set the callback to update addresses in statistics helpers. | |
| void | SetUpdateGwAddressCallback (SatUtMac::UpdateGwAddressCallback cb) |
| Set the gw update callback. | |
| Public Member Functions inherited from ns3::SatMac | |
| SatMac () | |
| Construct a SatMac. | |
| SatMac (uint32_t satId, uint32_t beamId) | |
| Construct a SatMac. | |
| ~SatMac () | |
| Destroy a SatMac. | |
| virtual void | Disable () |
| Disable the MAC layer, i.e. | |
| virtual void | Enable () |
| Enable the MAC layer, i.e. | |
| Address | GetAddress () const |
| Get MAC address. | |
| uint32_t | GetBeamId () const |
| Get beam ID of the object. | |
| uint32_t | GetSatId () const |
| Get sat ID of the object. | |
| uint32_t | ReserveIdAndStoreCtrlMsgToContainer (Ptr< SatControlMessage > msg) |
| Reserve id and store the control message. | |
| uint32_t | SendCtrlMsgFromContainer (uint32_t sendId) |
| Send the control message from the container. | |
| void | SetBeamId (uint32_t beamId) |
| Set beam ID of the object. | |
| void | SetBeamSchedulerCallback (SatMac::BeamSchedulerCallback cb) |
| Set the beam scheduler callback. | |
| void | SetHandoverModule (Ptr< SatHandoverModule > handoverModule) |
| Set the handover module. | |
| void | SetLoraReceiveCallback (SatMac::LoraReceiveCallback cb) |
| Method to set receive callback. | |
| void | SetReadCtrlCallback (SatMac::ReadCtrlMsgCallback cb) |
| Method to set read control message callback. | |
| void | SetReceiveCallback (SatMac::ReceiveCallback cb) |
| Method to set receive callback. | |
| void | SetReserveCtrlCallback (SatMac::ReserveCtrlMsgCallback cb) |
| Method to set reserve control message id callback. | |
| void | SetRoutingUpdateCallback (SatMac::RoutingUpdateCallback cb) |
| Method to set the routing update callback. | |
| void | SetSatId (uint32_t satId) |
| Set sat ID of the object. | |
| void | SetSendCtrlCallback (SatMac::SendCtrlMsgCallback cb) |
| Method to set send control message callback. | |
| void | SetTransmitCallback (SatMac::TransmitCallback cb) |
| Method to set transmit callback. | |
| void | SetUpdateIslCallback (SatMac::UpdateIslCallback cb) |
| Method to set update ISL callback. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Derived from Object. | |
| Static Public Member Functions inherited from ns3::SatMac | |
| static TypeId | GetTypeId (void) |
| Derived from Object. | |
Protected Member Functions | |
| void | DoDispose (void) |
| Dispose of SatUtMac. | |
| Protected Member Functions inherited from ns3::SatMac | |
| void | DoDispose (void) |
| Dispose of SatMac. | |
| void | RxTraces (SatPhy::PacketContainer_t packets) |
| Invoke the Rx trace source for each received packet. | |
| virtual void | SendPacket (SatPhy::PacketContainer_t packets, uint32_t carrierId, Time duration, SatSignalParameters::txInfo_s txInfo) |
| Send packets to lower layer by using a callback. | |
| void | SetTimeTag (SatPhy::PacketContainer_t packets) |
| Set SatMacTimeTag of packets. | |
Private Types | |
| enum | HandoverState_t { NO_HANDOVER , HANDOVER_RECOMMENDATION_SENT , WAITING_FOR_TBTP } |
Private Member Functions | |
| SatUtMac (const SatUtMac &) | |
| void | CreateCrdsaPacketInstances (uint32_t allocationChannel, std::set< uint32_t > slots) |
| void | DoEssaTransmit (Time duration, Ptr< SatWaveform > waveform, uint32_t carrierId, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE) |
| Notify the upper layer about the ESSA Tx opportunity. | |
| void | DoFrameStart () |
| Function which is executed at every frame start. | |
| void | DoRandomAccess (SatEnums::RandomAccessTriggerType_t randomAccessTriggerType) |
| Do random access evaluation for Tx opportunities. | |
| void | DoSlottedAlohaTransmit (Time duration, Ptr< SatWaveform > waveform, uint32_t carrierId, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE) |
| Notify the upper layer about the Slotted ALOHA Tx opportunity. | |
| void | DoTransmit (Time duration, uint32_t carrierId, Ptr< SatWaveform > wf, Ptr< SatTimeSlotConf > tsConf, SatUtScheduler::SatCompliancePolicy_t policy=SatUtScheduler::LOOSE) |
| Notify the upper layer about the Tx opportunity. | |
| void | ExtractPacketsToSchedule (SatPhy::PacketContainer_t &packets, uint32_t payloadBytes, SatTimeSlotConf::SatTimeSlotType_t type, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy, bool randomAccessChannel) |
| Extract packets from the underlying queue and put them in the provided container. | |
| SatPhy::PacketContainer_t | FetchPackets (uint32_t payloadBytes, SatTimeSlotConf::SatTimeSlotType_t type, uint8_t rcIndex, SatUtScheduler::SatCompliancePolicy_t policy) |
| std::pair< bool, uint32_t > | FindNextAvailableRandomAccessSlot (Time opportunityOffset, Ptr< SatFrameConf > frameConf, uint32_t timeSlotCount, uint32_t superFrameId, uint32_t allocationChannel) |
| uint32_t | GetCurrentSuperFrameId (uint8_t superFrameSeqId) const |
| Time | GetCurrentSuperFrameStartTime (uint8_t superFrameSeqId) const |
| Get start time for the current superframe. | |
| uint32_t | GetNextRandomAccessAllocationChannel () |
| Function for selecting the allocation channel for the current RA evaluation. | |
| Time | GetRealSendingTime (Time t) |
| Compute real sending time of UT based on last NCR reception date and clock drift. | |
| bool | IsRandomAccessSlotAvailable (uint32_t superFrameId, uint32_t allocationChannelId, uint32_t slotId) |
| SatUtMac & | operator= (const SatUtMac &) |
| void | PrintUsedRandomAccessSlots () |
| void | ReceiveSignalingPacket (Ptr< Packet > packet) |
| Signaling packet receiver, which handles all the signaling packet receptions. | |
| void | RemovePastRandomAccessSlots (uint32_t superFrameId) |
| Function for removing the past used RA slots. | |
| void | ScheduleCrdsaTransmission (uint32_t allocationChannel, SatRandomAccess::RandomAccessTxOpportunities_s txOpportunities) |
| Function for scheduling the CRDSA transmissions. | |
| void | ScheduleDaTxOpportunity (Time transmitDelay, Time duration, Ptr< SatWaveform > wf, Ptr< SatTimeSlotConf > tsConf, uint32_t carrierId) |
| Schdules one Tx opportunity, i.e. | |
| void | ScheduleEssaTransmission (uint32_t allocationChannel) |
| Function for scheduling the ESSA transmissions. | |
| void | ScheduleSlottedAlohaTransmission (uint32_t allocationChannel) |
| Function for scheduling the Slotted ALOHA transmissions. | |
| void | ScheduleTimeSlots (Ptr< SatTbtpMessage > tbtp) |
| Schedules time slots according to received TBTP message. | |
| std::pair< bool, uint32_t > | SearchFrameForAvailableSlot (Time superframeStartTime, Ptr< SatFrameConf > frameConf, uint32_t timeSlotCount, uint32_t superFrameId, uint32_t allocationChannel) |
| void | TransmitPackets (SatPhy::PacketContainer_t packets, Time duration, uint32_t carrierId, SatSignalParameters::txInfo_s txInfo) |
| bool | UpdateUsedRandomAccessSlots (uint32_t superFrameId, uint32_t allocationChannel, uint32_t slot) |
| Function for updating the used RA slots. | |
Private Attributes | |
| AssignedDaResourcesCallback | m_assignedDaResourcesCallback |
| Callback for informing the assigned TBTP resources. | |
| uint32_t | m_beamId |
| ID of beam for UT. | |
| int32_t | m_clockDrift |
| Clock drift (number of ticks per second). | |
| bool | m_crdsaOnlyForControl |
| Planned CRDSA usage: | |
| uint32_t | m_crdsaUniquePacketId |
| CRDSA packet ID (per frame). | |
| int64_t | m_deltaNcr |
| Correction to apply to NCR dates. | |
| uint32_t | m_firstTransmittableSuperframeId |
| SatUtMac::GatewayUpdateCallback | m_gatewayUpdateCallback |
| Gateway address update callback. | |
| Time | m_guardTime |
| Guard time for time slots. | |
| Mac48Address | m_gwAddress |
| SatUtMac::HandoverCallback | m_handoverCallback |
| The physical layer handover callback. | |
| uint32_t | m_handoverMessagesCount |
| HandoverState_t | m_handoverState |
| bool | m_isRandomAccessScheduled |
| Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access. | |
| Time | m_lastNcrDateReceived |
| Reception date of last NCR control message. | |
| bool | m_loggedOn |
| UT is logged on. | |
| uint32_t | m_logonChannel |
| RA channel dedicated to logon messages. | |
| uint32_t | m_maxHandoverMessagesSent |
| Time | m_maxWaitingTimeLogonResponse |
| Timeout for waiting for a response for a logon message. | |
| uint64_t | m_ncr |
| NCR value of last NCR control message. | |
| Time | m_nextLogonTransmissionPossible |
| Instant when a logon message can be transmitted. | |
| Time | m_nextPacketTime |
| Next time when a next ESSA packet can be safely sent. | |
| Ptr< Node > | m_node |
| Node containing this MAC. | |
| uint32_t | m_raChannel |
| RA channel assigned to the UT. | |
| Ptr< SatRandomAccess > | m_randomAccess |
| RA main module. | |
| SatUtMacState | m_rcstState |
| std::queue< Time > | m_receptionDates |
| Store last 3 packets reception date, to be associated to NCR dates. | |
| uint32_t | m_satId |
| ID of sat for UT. | |
| SatUtMac::SendLogonCallback | m_sendLogonCallback |
| Callback for sending a logon message. | |
| uint32_t | m_sendLogonTries |
| Number of times a logon message has been sent without response. | |
| SatUtMac::SliceSubscriptionCallback | m_sliceSubscriptionCallback |
| Tx checking callback. | |
| Ptr< SatSuperframeSeq > | m_superframeSeq |
| Used superframe sequence for the return link. | |
| Ptr< SatTbtpContainer > | m_tbtpContainer |
| Container for storing all the TBTP information related to this UT. | |
| TracedCallback< uint32_t > | m_tbtpResourcesTrace |
| Assigned TBTP resources in superframe for this UT (in bytes). | |
| TimingAdvanceCallback | m_timingAdvanceCb |
| Callback for getting the timing advance information. | |
| Ptr< SatTimuInfo > | m_timuInfo |
| SatUtMac::TxCheckCallback | m_txCheckCallback |
| Tx checking callback. | |
| Ptr< UniformRandomVariable > | m_uniformRandomVariable |
| Uniform random variable distribution generator. | |
| SatUtMac::UpdateAddressAndIdentifierCallback | m_updateAddressAndIdentifierCallback |
| Callback to update addresses in statistics helpers. | |
| SatUtMac::UpdateGwAddressCallback | m_updateGwAddressCallback |
| Callback for sending a logon message. | |
| std::map< std::pair< uint32_t, uint32_t >, std::set< uint32_t > > | m_usedRandomAccessSlots |
| A container for storing the used RA slots in each frame and allocation channel. | |
| bool | m_useLogon |
| Should logon be simulated? | |
| Ptr< SatUtScheduler > | m_utScheduler |
| UT scheduler. | |
| Ptr< UniformRandomVariable > | m_waitingTimeLogonRng |
| The random generator for waiting transmission time. | |
| Time | m_windowInitLogon |
| The initial max time to wait when sending a logon message. | |
Additional Inherited Members | |
| Protected Attributes inherited from ns3::SatMac | |
| Time | m_beamEnabledTime |
| Time of the last beam enable event. | |
| uint32_t | m_beamId |
| The ID of the beam where mac belongs. | |
| SatMac::BeamSchedulerCallback | m_beamSchedulerCallback |
| Callback to get the SatBeamScheduler linked to a beam ID. | |
| TracedCallback< Time > | m_beamServiceTrace |
| Traced callback for beam being disabled and including service time. | |
| SatEnums::RegenerationMode_t | m_forwardLinkRegenerationMode |
| Regeneration mode on forward link. | |
| Ptr< SatHandoverModule > | m_handoverModule |
| Module used to perform handovers. | |
| bool | m_isRegenerative |
| Indicate if satellite is regeneration (at least LINK level) for TX. | |
| bool | m_isStatisticsTagsEnabled |
| EnableStatisticsTags attribute. | |
| Time | m_lastDelay |
| Last delay measurement. | |
| Time | m_lastLinkDelay |
| Last delay measurement for link. | |
| std::queue< Time > | m_lastSOF |
| Store last 3 SOF date for Forward messages, to insert in NCR packets. | |
| std::queue< Ptr< SatNcrMessage > > | m_ncrMessagesToSend |
| List of NCR control messages created but not sent yet. | |
| bool | m_ncrV2 |
| Use of version 2 of NCR dates. | |
| Ptr< SatNodeInfo > | m_nodeInfo |
| Node info containing node related information, such as node type, node id and MAC address (of the SatNetDevice). | |
| TracedCallback< Time, SatEnums::SatPacketEvent_t, SatEnums::SatNodeType_t, uint32_t, Mac48Address, SatEnums::SatLogLevel_t, SatEnums::SatLinkDir_t, std::string > | m_packetTrace |
| Trace callback used for packet tracing. | |
| SatMac::ReadCtrlMsgCallback | m_readCtrlCallback |
| The read control message callback. | |
| SatMac::ReserveCtrlMsgCallback | m_reserveCtrlCallback |
| The reserve control message id callback. | |
| SatEnums::RegenerationMode_t | m_returnLinkRegenerationMode |
| Regeneration mode on return link. | |
| SatMac::RoutingUpdateCallback | m_routingUpdateCallback |
| Callback to update routing and ARP tables after a beam handover. | |
| SatMac::ReceiveCallback | m_rxCallback |
| The upper layer package receive callback. | |
| TracedCallback< const Time &, const Address & > | m_rxDelayTrace |
| Traced callback for all received packets, including delay information and the address of the senders. | |
| TracedCallback< const Time &, const Address & > | m_rxJitterTrace |
| Traced callback for all received packets, including jitter information and the address of the senders. | |
| TracedCallback< const Time &, const Address & > | m_rxLinkDelayTrace |
| Traced callback for all received packets, including link delay information and the address of the senders. | |
| TracedCallback< const Time &, const Address & > | m_rxLinkJitterTrace |
| Traced callback for all received packets, including link jitter information and the address of the senders. | |
| SatMac::LoraReceiveCallback | m_rxLoraCallback |
| The upper layer package receive callback. | |
| TracedCallback< Ptr< const Packet >, const Address & > | m_rxTrace |
| Traced callback for all received packets, including the address of the senders. | |
| Address | m_satelliteAddress |
| MAC address of satellite on other side of the link. | |
| uint32_t | m_satId |
| The ID of the sat where mac belongs. | |
| SatMac::SendCtrlMsgCallback | m_sendCtrlCallback |
| The send control message callback. | |
| SatMac::TransmitCallback | m_txCallback |
| The lower layer packet transmit callback. | |
| bool | m_txEnabled |
| Flag indicating whether the MAC is enabled, i.e. | |
| SatMac::UpdateIslCallback | m_updateIslCallback |
| The update ISL routes callback. | |
UT specific Mac class for Sat Net Devices.
This SatUtMac class specializes the MAC class with UT characteristics. UT MAC receives BB frames intended for it (including at least one packet intended for it) from the forward link and disassembles the GSE PDUs from the BB frame. BB frame may hold also TBTP messages from GW (forward link) including allocations for the UT. UT schedules the tx opportunities to LLC via UT scheduler. UT forwards a container of packets to the PHY layer. Packet container models the Frame PDU, including one or more RLE PDUs.
Definition at line 74 of file satellite-ut-mac.h.
| typedef Callback<void, uint8_t, uint32_t> ns3::SatUtMac::AssignedDaResourcesCallback |
Callback for informing the amount of dedicated access bytes received from TBTP.
| uint8_t | RC index |
| uint32_t | Sum of bytes in this superframe |
Definition at line 153 of file satellite-ut-mac.h.
| typedef Callback<void, Mac48Address> ns3::SatUtMac::GatewayUpdateCallback |
Callback to update gateway address after handover.
| Mac48Address | the address of the new gateway |
Definition at line 320 of file satellite-ut-mac.h.
| typedef Callback<void, uint32_t, uint32_t> ns3::SatUtMac::HandoverCallback |
Callback to reconfigure physical layer during handover.
| uint32_t | new beam Id |
Definition at line 308 of file satellite-ut-mac.h.
| typedef Callback<void> ns3::SatUtMac::SendLogonCallback |
Callback to send a logon message to the gateway.
Definition at line 186 of file satellite-ut-mac.h.
| typedef Callback<void, uint8_t> ns3::SatUtMac::SliceSubscriptionCallback |
Callback to check if TX is operational.
Definition at line 175 of file satellite-ut-mac.h.
| typedef void(* ns3::SatUtMac::TbtpResourcesTraceCallback) (uint32_t size) |
Callback signature for DaResourcesTrace trace source.
| size | the amount of assigned TBTP resources (in bytes) in the superframe for this UT |
Definition at line 302 of file satellite-ut-mac.h.
| typedef Callback<Time> ns3::SatUtMac::TimingAdvanceCallback |
Definition at line 139 of file satellite-ut-mac.h.
| typedef Callback<bool> ns3::SatUtMac::TxCheckCallback |
Callback to check if TX is operational.
Definition at line 164 of file satellite-ut-mac.h.
| typedef Callback<void, Ptr<Node> > ns3::SatUtMac::UpdateAddressAndIdentifierCallback |
Callback to update addresses in statistics helpers.
Definition at line 331 of file satellite-ut-mac.h.
| typedef Callback<void, Mac48Address> ns3::SatUtMac::UpdateGwAddressCallback |
Callback to update GW address to SatRequestManager.
Definition at line 197 of file satellite-ut-mac.h.
|
private |
| Enumerator | |
|---|---|
| NO_HANDOVER | |
| HANDOVER_RECOMMENDATION_SENT | |
| WAITING_FOR_TBTP | |
Definition at line 776 of file satellite-ut-mac.h.
| ns3::SatUtMac::SatUtMac | ( | ) |
Default constructor, which is not used.
Definition at line 114 of file satellite-ut-mac.cc.
References ns3::SatMac::SatMac(), m_beamId, m_clockDrift, m_crdsaOnlyForControl, m_crdsaUniquePacketId, m_deltaNcr, m_firstTransmittableSuperframeId, m_gatewayUpdateCallback, m_guardTime, m_handoverCallback, m_handoverMessagesCount, m_handoverState, m_isRandomAccessScheduled, m_lastNcrDateReceived, m_loggedOn, m_logonChannel, m_maxHandoverMessagesSent, m_maxWaitingTimeLogonResponse, m_ncr, m_nextLogonTransmissionPossible, m_nextPacketTime, m_raChannel, m_randomAccess, m_rcstState, m_satId, m_sendLogonCallback, m_sendLogonTries, m_sliceSubscriptionCallback, m_superframeSeq, m_timingAdvanceCb, m_timuInfo, m_txCheckCallback, m_updateGwAddressCallback, m_useLogon, m_waitingTimeLogonRng, m_windowInitLogon, and NO_HANDOVER.
Referenced by SatUtMac(), and operator=().
| ns3::SatUtMac::SatUtMac | ( | Ptr< Node > | node, |
| uint32_t | satId, | ||
| uint32_t | beamId, | ||
| Ptr< SatSuperframeSeq > | seq, | ||
| bool | crdsaOnlyForControl ) |
Construct a SatUtMac.
This is the constructor for the SatUtMac
| node | Node containing this MAC |
| satId | ID of sat for UT |
| beamId | ID of beam for UT |
| seq | Pointer to superframe sequence. |
| crdsaOnlyForControl | CRDSA buffer operation mode |
Definition at line 158 of file satellite-ut-mac.cc.
References ns3::SatMac::SatMac(), m_beamId, m_clockDrift, m_crdsaOnlyForControl, m_crdsaUniquePacketId, m_deltaNcr, m_firstTransmittableSuperframeId, m_gatewayUpdateCallback, m_guardTime, m_handoverCallback, m_handoverMessagesCount, m_handoverState, m_isRandomAccessScheduled, m_lastNcrDateReceived, m_loggedOn, m_logonChannel, m_maxHandoverMessagesSent, m_maxWaitingTimeLogonResponse, m_ncr, m_nextLogonTransmissionPossible, m_nextPacketTime, m_node, m_raChannel, m_rcstState, m_satId, m_sendLogonCallback, m_sendLogonTries, m_sliceSubscriptionCallback, m_superframeSeq, m_tbtpContainer, m_timingAdvanceCb, m_timuInfo, m_txCheckCallback, m_uniformRandomVariable, m_updateGwAddressCallback, m_useLogon, m_waitingTimeLogonRng, m_windowInitLogon, and NO_HANDOVER.
| ns3::SatUtMac::~SatUtMac | ( | ) |
Destroy a SatUtMac.
This is the destructor for the SatUtMac.
Definition at line 206 of file satellite-ut-mac.cc.
References m_randomAccess, m_tbtpContainer, and m_timuInfo.
|
private |
| bool ns3::SatUtMac::ControlMsgTransmissionPossible | ( | ) | const |
Method to check whether a transmission of a control msg is somewhat possible.
Transmission cannot be guaranteed, but at least the possibility to do so (e.g. random access / CRDSA enabled, TBTP with time slots received).
Definition at line 365 of file satellite-ut-mac.cc.
References m_logonChannel, m_raChannel, m_randomAccess, m_tbtpContainer, and m_useLogon.
Referenced by ns3::SatUtHelperDvb::Install(), and ReceiveSignalingPacket().
|
private |
CRDSA is evaluated only at the frame start TODO this has to be changed when a proper mobility model is implemented
get the slot payload
reduce the CRDSA signaling overhead from the payload
CRDSA can be utilized to transmit only control messages or both control and user data
get the next packet
create replicas
create replica slot ID tags
loop through the replicas
attach the replica tag
time slot configuration
start time
duration
carrier
create CRDSA Tx params
schedule transmission
Definition at line 1673 of file satellite-ut-mac.cc.
References ns3::SatCrdsaReplicaTag::AddSlotId(), ns3::SatEnums::CONTROL_FID, ns3::SatSignalParameters::txInfo_s::crdsaUniquePacketId, ExtractPacketsToSchedule(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, GetRealSendingTime(), ns3::SatUtScheduler::LOOSE, m_crdsaOnlyForControl, m_crdsaUniquePacketId, ns3::SatMac::m_nodeInfo, m_randomAccess, m_superframeSeq, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_TYPE_CRDSA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatSignalParameters::txInfo_s::sliceId, ns3::SatTimeSlotConf::SLOT_TYPE_TRC, ns3::SatUtScheduler::STRICT, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.
Referenced by ScheduleCrdsaTransmission().
|
protected |
Dispose of SatUtMac.
Definition at line 216 of file satellite-ut-mac.cc.
References ns3::SatMac::DoDispose(), m_gatewayUpdateCallback, m_handoverCallback, m_sendLogonCallback, m_sliceSubscriptionCallback, m_tbtpContainer, m_timingAdvanceCb, m_txCheckCallback, m_updateGwAddressCallback, and m_utScheduler.
|
private |
Notify the upper layer about the ESSA Tx opportunity.
If upper layer returns a PDU, send it to lower layer.
| duration | duration of the burst |
| waveform | waveform |
| carrierId | Carrier id used for the transmission |
| rcIndex | RC index |
get the slot payload
get the next packets
create ESSA Tx params
update m_nextPacketTime
schedule a DoRandomAccess then in case there still are packets to transmit ( schedule DoRandomAccess in case there is a back-off to compute )
Definition at line 738 of file satellite-ut-mac.cc.
References ns3::SatSignalParameters::txInfo_s::crdsaUniquePacketId, DoRandomAccess(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatUtils::GetPacketInfo(), GetRealSendingTime(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, m_crdsaUniquePacketId, m_isRandomAccessScheduled, m_nextPacketTime, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_utScheduler, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_SENT, ns3::SatEnums::PACKET_TYPE_ESSA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatEnums::RA_TRIGGER_TYPE_ESSA, ns3::SatTimeSlotConf::SLOT_TYPE_TRC, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.
Referenced by ScheduleEssaTransmission().
|
private |
Function which is executed at every frame start.
Definition at line 1943 of file satellite-ut-mac.cc.
References DoFrameStart(), DoRandomAccess(), GetNextSuperFrameTxTime(), GetRealSendingTime(), HANDOVER_RECOMMENDATION_SENT, ns3::SatUtMacState::HOLD_STANDBY, LogOff(), m_beamId, ns3::SatMac::m_beamSchedulerCallback, m_crdsaUniquePacketId, m_gwAddress, m_handoverCallback, m_handoverMessagesCount, ns3::SatMac::m_handoverModule, m_handoverState, m_loggedOn, m_maxHandoverMessagesSent, m_nextLogonTransmissionPossible, m_node, ns3::SatMac::m_nodeInfo, m_randomAccess, m_rcstState, ns3::SatMac::m_routingUpdateCallback, ns3::SatMac::m_satelliteAddress, m_satId, m_sendLogonCallback, m_superframeSeq, m_tbtpContainer, m_timuInfo, m_txCheckCallback, m_updateAddressAndIdentifierCallback, m_updateGwAddressCallback, ns3::SatMac::m_updateIslCallback, m_useLogon, NO_HANDOVER, ns3::SatEnums::RA_TRIGGER_TYPE_CRDSA, ns3::SatMac::SetBeamId(), SetGwAddress(), SetSatelliteAddress(), ns3::SatMac::SetSatId(), ns3::SatConstVariables::SUPERFRAME_SEQUENCE, and WAITING_FOR_TBTP.
Referenced by DoFrameStart(), and SetTimingAdvanceCallback().
|
private |
Do random access evaluation for Tx opportunities.
| randomAccessTriggerType |
reset the isRandomAccessScheduled flag. TODO: should be done only if randomAccessTriggerType is ESSA
select the RA allocation channel
run random access algorithm
process Slotted ALOHA Tx opportunities
schedule the check for next available RA slot
process CRDSA Tx opportunities
schedule CRDSA transmission
process ESSA opportunities
set the is RA scheduled TODO: if there are no Tx opportunities there'll be no scheduling until a new event arrives
schedule the transmission
Definition at line 1305 of file satellite-ut-mac.cc.
References GetNextRandomAccessAllocationChannel(), GetRealSendingTime(), m_isRandomAccessScheduled, m_logonChannel, ns3::SatMac::m_nodeInfo, m_randomAccess, m_rcstState, m_useLogon, ns3::SatEnums::RA_TX_OPPORTUNITY_CRDSA, ns3::SatEnums::RA_TX_OPPORTUNITY_ESSA, ns3::SatEnums::RA_TX_OPPORTUNITY_SLOTTED_ALOHA, ScheduleCrdsaTransmission(), ScheduleEssaTransmission(), ScheduleSlottedAlohaTransmission(), ns3::SatRandomAccess::RandomAccessTxOpportunities_s::slottedAlohaTxOpportunity, ns3::SatUtMacState::TDMA_SYNC, and ns3::SatRandomAccess::RandomAccessTxOpportunities_s::txOpportunityType.
Referenced by DoEssaTransmit(), DoFrameStart(), ReceiveQueueEvent(), and ReceiveQueueEventEssa().
|
private |
Notify the upper layer about the Slotted ALOHA Tx opportunity.
If upper layer returns a PDU, send it to lower layer.
| duration | duration of the burst |
| waveform | waveform |
| carrierId | Carrier id used for the transmission |
| rcIndex | RC index |
get the slot payload
reduce the SA signaling overhead from the payload
Definition at line 674 of file satellite-ut-mac.cc.
References ExtractPacketsToSchedule(), ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_randomAccess, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_SENT, ns3::SatEnums::PACKET_TYPE_SLOTTED_ALOHA, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatTimeSlotConf::SLOT_TYPE_C, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.
Referenced by ScheduleSlottedAlohaTransmission().
|
private |
Notify the upper layer about the Tx opportunity.
If upper layer returns a PDU, send it to lower layer.
| duration | duration of the burst |
| carrierId | Carrier id used for the transmission |
| wf | waveform |
| tsConf | Time slot conf |
| policy | UT scheduler policy |
Definition at line 593 of file satellite-ut-mac.cc.
References ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, FetchPackets(), ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatEncapPduStatusTag::FULL_PDU, m_gwAddress, ns3::SatMac::m_nodeInfo, m_rcstState, ns3::SatMac::m_returnLinkRegenerationMode, ns3::SatMac::m_satelliteAddress, m_superframeSeq, m_txCheckCallback, m_useLogon, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_TYPE_DEDICATED_ACCESS, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatEnums::REGENERATION_LINK, ns3::SatEnums::REGENERATION_NETWORK, ns3::SatMacTag::SetDestAddress(), ns3::SatAddressE2ETag::SetE2EDestAddress(), ns3::SatAddressE2ETag::SetE2ESourceAddress(), ns3::SatMacTag::SetSourceAddress(), ns3::SatEncapPduStatusTag::SetStatus(), ns3::SatTimeSlotConf::SLOT_TYPE_C, ns3::SatUtMacState::TDMA_SYNC, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.
Referenced by ScheduleDaTxOpportunity().
|
private |
Extract packets from the underlying queue and put them in the provided container.
| packets | Container for the packets to extract |
| payloadBytes | Tx opportunity payload |
| type | Time slot type |
| rcIndex | RC index |
| policy | Scheduler policy |
| randomAccessChannel | whether the packets are to be sent on RA or DA |
Definition at line 2188 of file satellite-ut-mac.cc.
References ns3::SatEnums::CONTROL_FID, GetCurrentSuperFrameId(), ns3::SatControlMsgTag::GetMsgType(), HANDOVER_RECOMMENDATION_SENT, m_firstTransmittableSuperframeId, m_handoverState, m_utScheduler, NO_HANDOVER, ns3::SatControlMsgTag::SAT_HR_CTRL_MSG, ns3::SatTimeSlotConf::SLOT_TYPE_C, ns3::SatUtScheduler::STRICT, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
Referenced by CreateCrdsaPacketInstances(), DoSlottedAlohaTransmit(), and FetchPackets().
|
private |
| payloadBytes | Tx opportunity payload |
| type | Time slot type |
| rcIndex | RC index |
| policy | Scheduler policy |
Instruct the UT scheduler to fill the packet container based on given input; e.g. payload, RC index. The packet container models the FPDU, which may contain several RLE PDUs
Definition at line 815 of file satellite-ut-mac.cc.
References ExtractPacketsToSchedule(), ns3::SatUtils::GetPacketInfo(), ns3::SatEnums::LD_RETURN, ns3::SatEnums::LL_MAC, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, and ns3::SatEnums::PACKET_SENT.
Referenced by DoTransmit().
|
private |
| opportunityOffset | |
| frameConf | |
| timeSlotCount | |
| superFrameId | |
| allocationChannel |
iterate through slots in this frame
if slot offset is equal or larger than Tx opportunity offset, i.e., the slot is in the future
if slot is available, set the slot as used and continue with the transmission
Definition at line 1526 of file satellite-ut-mac.cc.
References ns3::SatMac::m_nodeInfo, and UpdateUsedRandomAccessSlots().
Referenced by SearchFrameForAvailableSlot().
|
inline |
Get beam ID of the object.
Definition at line 124 of file satellite-ut-mac.h.
References m_beamId.
|
private |
Definition at line 440 of file satellite-ut-mac.cc.
References m_timingAdvanceCb.
Referenced by ExtractPacketsToSchedule(), ScheduleCrdsaTransmission(), and ScheduleSlottedAlohaTransmission().
|
private |
Get start time for the current superframe.
| superFrameSeqId | Superframe sequence id |
Definition at line 429 of file satellite-ut-mac.cc.
References m_timingAdvanceCb.
Referenced by ScheduleCrdsaTransmission(), and ScheduleSlottedAlohaTransmission().
| Mac48Address ns3::SatUtMac::GetGwAddress | ( | ) |
Get address of the GW (or its MAC) serving this UT.
Definition at line 295 of file satellite-ut-mac.cc.
References m_gwAddress.
|
private |
Function for selecting the allocation channel for the current RA evaluation.
TODO at the moment only one allocation channel is supported
Definition at line 1383 of file satellite-ut-mac.cc.
References ns3::SatMac::m_nodeInfo, and m_raChannel.
Referenced by DoRandomAccess().
| Time ns3::SatUtMac::GetNextSuperFrameTxTime | ( | uint8_t | superFrameSeqId | ) | const |
Get Tx time for the next possible superframe.
| superFrameSeqId | Superframe sequence id |
Definition at line 418 of file satellite-ut-mac.cc.
References m_timingAdvanceCb.
Referenced by DoFrameStart(), and SetTimingAdvanceCallback().
| uint32_t ns3::SatUtMac::GetRaChannel | ( | ) | const |
Get RA channel assigned for this UT.
Definition at line 347 of file satellite-ut-mac.cc.
References m_raChannel.
| SatUtMacState::RcstState_t ns3::SatUtMac::GetRcstState | ( | ) | const |
Definition at line 2181 of file satellite-ut-mac.cc.
References m_rcstState.
|
private |
Compute real sending time of UT based on last NCR reception date and clock drift.
| t | Sending time if clock is perfect (relative time from Simulator::Now ()) |
Definition at line 2126 of file satellite-ut-mac.cc.
References m_clockDrift, and m_deltaNcr.
Referenced by CreateCrdsaPacketInstances(), DoEssaTransmit(), DoFrameStart(), DoRandomAccess(), ScheduleDaTxOpportunity(), ScheduleEssaTransmission(), ScheduleSlottedAlohaTransmission(), SendLogon(), and SetTimingAdvanceCallback().
|
inline |
Get sat ID of the object.
Definition at line 115 of file satellite-ut-mac.h.
References m_satId.
|
static |
Derived from Object.
Definition at line 65 of file satellite-ut-mac.cc.
References ns3::SatMac::SatMac(), m_clockDrift, m_guardTime, m_maxHandoverMessagesSent, m_maxWaitingTimeLogonResponse, m_superframeSeq, m_tbtpResourcesTrace, m_utScheduler, and m_windowInitLogon.
|
private |
| void ns3::SatUtMac::LogOff | ( | ) |
Definition at line 322 of file satellite-ut-mac.cc.
References m_loggedOn, m_logonChannel, m_raChannel, and m_rcstState.
Referenced by DoFrameStart(), and ReceiveSignalingPacket().
| bool ns3::SatUtMac::LogonMsgTransmissionPossible | ( | ) | const |
Method to check whether a transmission of a logon msg is somewhat possible.
Definition at line 379 of file satellite-ut-mac.cc.
References m_rcstState, m_useLogon, and ns3::SatUtMacState::READY_FOR_LOGON.
Referenced by ns3::SatUtHelperDvb::Install().
|
private |
Definition at line 1925 of file satellite-ut-mac.cc.
References ns3::SatMac::m_nodeInfo, and m_usedRandomAccessSlots.
|
virtual |
Receive packet from lower layer.
| packets | Pointers to packets received. |
Definition at line 997 of file satellite-ut-mac.cc.
References ns3::SatMacTag::GetDestAddress(), ns3::SatAddressE2ETag::GetE2EDestAddress(), ns3::SatAddressE2ETag::GetE2ESourceAddress(), ns3::SatControlMsgTag::GetMsgType(), ns3::SatUtils::GetPacketInfo(), ns3::SatMacTag::GetSourceAddress(), ns3::SatEnums::LD_FORWARD, ns3::SatEnums::LL_MAC, ns3::SatMac::m_nodeInfo, ns3::SatMac::m_packetTrace, m_receptionDates, ns3::SatMac::m_rxCallback, ns3::SatEnums::PACKET_RECV, ReceiveSignalingPacket(), ns3::SatMac::RxTraces(), and ns3::SatControlMsgTag::SAT_NON_CTRL_MSG.
Referenced by ns3::SatUtHelperDvb::Install().
|
virtual |
Receive a queue event:
Reimplemented from ns3::SatMac.
Definition at line 897 of file satellite-ut-mac.cc.
References ns3::SatQueue::BUFFERED_PKT, ns3::SatEnums::CONTROL_FID, DoRandomAccess(), ns3::SatQueue::FIRST_BUFFERED_PKT, ns3::SatMac::m_nodeInfo, m_randomAccess, and ns3::SatEnums::RA_TRIGGER_TYPE_SLOTTED_ALOHA.
Referenced by ns3::SatUtHelperDvb::Install().
|
virtual |
Receive a queue event:
Definition at line 921 of file satellite-ut-mac.cc.
References ns3::SatQueue::BUFFERED_PKT, DoRandomAccess(), ns3::SatQueue::FIRST_BUFFERED_PKT, m_isRandomAccessScheduled, ns3::SatMac::m_nodeInfo, m_randomAccess, and ns3::SatEnums::RA_TRIGGER_TYPE_ESSA.
Referenced by ns3::SatUtHelperDvb::Install().
|
private |
Signaling packet receiver, which handles all the signaling packet receptions.
| packet | Received signaling packet |
Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.
Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.
Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.
Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.
Control message NOT found in container anymore! This means, that the SatBeamHelper::CtrlMsgStoreTimeInFwdLink attribute may be set to too short value or there are something wrong in the FWD link RRM.
Definition at line 1080 of file satellite-ut-mac.cc.
References ControlMsgTransmissionPossible(), ns3::SatMacTag::GetDestAddress(), ns3::SatAddressE2ETag::GetE2ESourceAddress(), ns3::SatControlMsgTag::GetMsgId(), ns3::SatControlMsgTag::GetMsgType(), ns3::SatLog::LOG_WARNING, LogOff(), m_beamId, m_clockDrift, m_deltaNcr, m_firstTransmittableSuperframeId, m_handoverState, m_lastNcrDateReceived, m_loggedOn, m_ncr, ns3::SatMac::m_ncrV2, ns3::SatMac::m_nodeInfo, m_raChannel, m_randomAccess, m_rcstState, ns3::SatMac::m_readCtrlCallback, m_receptionDates, ns3::SatMac::m_rxCallback, m_sendLogonTries, m_sliceSubscriptionCallback, m_timuInfo, ns3::SatUtMacState::NCR_RECOVERY, NO_HANDOVER, ns3::SatControlMsgTag::SAT_ARQ_ACK, ns3::SatControlMsgTag::SAT_CMT_CTRL_MSG, ns3::SatControlMsgTag::SAT_LOGOFF_CTRL_MSG, ns3::SatControlMsgTag::SAT_LOGON_RESPONSE_CTRL_MSG, ns3::SatControlMsgTag::SAT_NCR_CTRL_MSG, ns3::SatControlMsgTag::SAT_RA_CTRL_MSG, ns3::SatControlMsgTag::SAT_SLICE_CTRL_MSG, ns3::SatControlMsgTag::SAT_TBTP_CTRL_MSG, ns3::SatControlMsgTag::SAT_TIMU_CTRL_MSG, ScheduleTimeSlots(), and WAITING_FOR_TBTP.
Referenced by Receive().
|
private |
Function for removing the past used RA slots.
| superFrameId | super frame ID |
Definition at line 1903 of file satellite-ut-mac.cc.
References ns3::SatMac::m_nodeInfo, and m_usedRandomAccessSlots.
Referenced by UpdateUsedRandomAccessSlots().
|
private |
Function for scheduling the CRDSA transmissions.
| allocationChannel | RA allocation channel |
| txOpportunities | Tx opportunities |
loop through the unique packets
loop through the replicas
check and update used slots
TODO this needs to be handled when multiple allocation channels are implemented In that case a slot exclusion list should be used when randomizing the Tx slots
create replicas and schedule the packets
Definition at line 1623 of file satellite-ut-mac.cc.
References ns3::SatRandomAccess::RandomAccessTxOpportunities_s::crdsaTxOpportunities, CreateCrdsaPacketInstances(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), m_crdsaUniquePacketId, ns3::SatMac::m_nodeInfo, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, and UpdateUsedRandomAccessSlots().
Referenced by DoRandomAccess().
|
private |
Schdules one Tx opportunity, i.e.
time slot.
| transmitDelay | time when transmit possibility starts |
| duration | duration of the burst |
| wf | waveform |
| tsConf | Time slot conf |
| carrierId | Carrier id used for the transmission |
Definition at line 563 of file satellite-ut-mac.cc.
References DoTransmit(), GetRealSendingTime(), and ns3::SatUtScheduler::LOOSE.
Referenced by ScheduleTimeSlots().
|
private |
Function for scheduling the ESSA transmissions.
| allocationChannel | RA allocation channel |
start time
not transmiting at the moment, transmit now
duration
carrier
schedule transmission
Definition at line 1570 of file satellite-ut-mac.cc.
References ns3::SatEnums::CONTROL_FID, DoEssaTransmit(), GetRealSendingTime(), ns3::SatUtScheduler::LOOSE, m_nextPacketTime, ns3::SatMac::m_nodeInfo, m_superframeSeq, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
Referenced by DoRandomAccess().
|
private |
Function for scheduling the Slotted ALOHA transmissions.
| allocationChannel | allocation channel |
check if we have known DAMA allocations this functionality checks the current and all known future frames for DAMA allocation TODO it might be better to check only the current frame or a limited subset of frames
search for the next available slot if there is no free slots in the current frame, look for it in the following frames
time slot configuration
start time
duration
carrier
schedule transmission
Definition at line 1394 of file satellite-ut-mac.cc.
References ns3::SatEnums::CONTROL_FID, DoSlottedAlohaTransmit(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), GetRealSendingTime(), ns3::SatMac::m_nodeInfo, m_superframeSeq, m_tbtpContainer, SearchFrameForAvailableSlot(), ns3::SatUtScheduler::STRICT, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
Referenced by DoRandomAccess().
|
private |
Schedules time slots according to received TBTP message.
| tbtp | Pointer to TBTP message. |
Calculate the sending time of the time slots within this TBTP for this specific UT. UTs may be located at different distances from the satellite, thus they shall have to send the time slots at different times so that the transmissions are received at the GW at correct time.
If using asynchronous access (no timeslots), return TODO find better way of doing this
Definition at line 449 of file satellite-ut-mac.cc.
References ns3::SatSuperframeConf::CONFIG_TYPE_4, m_assignedDaResourcesCallback, ns3::SatMac::m_nodeInfo, m_rcstState, m_superframeSeq, m_tbtpContainer, m_tbtpResourcesTrace, m_timingAdvanceCb, m_useLogon, ns3::SatEnums::NUM_FIDS, ns3::SatUtMacState::READY_FOR_TDMA_SYNC, ScheduleDaTxOpportunity(), ns3::SatTimeSlotConf::SLOT_TYPE_C, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, and ns3::SatUtMacState::TDMA_SYNC.
Referenced by ReceiveSignalingPacket().
|
private |
| superframeStartTime | |
| frameConf | |
| timeSlotCount | |
| superFrameId | |
| allocationChannel |
if we can not use the current superframe, e.g., we are in the the middle of the last slot of the frame, we will use offset 0, e.g., the first slot of the next frame
Definition at line 1497 of file satellite-ut-mac.cc.
References FindNextAvailableRandomAccessSlot(), and ns3::SatMac::m_nodeInfo.
Referenced by ScheduleSlottedAlohaTransmission().
| void ns3::SatUtMac::SendLogon | ( | Ptr< Packet > | packet | ) |
Receive a logon message to transmit /param packet The logon packet to send.
Definition at line 948 of file satellite-ut-mac.cc.
References ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, ns3::SatSignalParameters::txInfo_s::frameType, GetRealSendingTime(), m_logonChannel, m_maxWaitingTimeLogonResponse, m_nextLogonTransmissionPossible, m_sendLogonTries, m_superframeSeq, m_waitingTimeLogonRng, m_windowInitLogon, ns3::SatSignalParameters::txInfo_s::modCod, ns3::SatEnums::PACKET_TYPE_LOGON, ns3::SatSignalParameters::txInfo_s::packetType, ns3::SatSignalParameters::txInfo_s::sliceId, ns3::SatConstVariables::SUPERFRAME_SEQUENCE, TransmitPackets(), ns3::SatEnums::UNDEFINED_FRAME, and ns3::SatSignalParameters::txInfo_s::waveformId.
Referenced by ns3::SatUtHelperDvb::Install().
| void ns3::SatUtMac::SetAssignedDaResourcesCallback | ( | SatUtMac::AssignedDaResourcesCallback | cb | ) |
Set the assigned DA resources callback.
| cb | callback to invoke whenever TBTP is received. |
Definition at line 410 of file satellite-ut-mac.cc.
References m_assignedDaResourcesCallback.
| void ns3::SatUtMac::SetGatewayUpdateCallback | ( | SatUtMac::GatewayUpdateCallback | cb | ) |
Method to set the gateway address update callback.
| cb | callback to invoke to update gateway address |
Definition at line 242 of file satellite-ut-mac.cc.
References m_gatewayUpdateCallback.
| void ns3::SatUtMac::SetGwAddress | ( | Mac48Address | gwAddress | ) |
Set address of the GW (or its MAC) serving this UT.
| gwAddress | Address of the GW. |
Definition at line 303 of file satellite-ut-mac.cc.
References m_gatewayUpdateCallback, and m_gwAddress.
Referenced by DoFrameStart().
| void ns3::SatUtMac::SetHandoverCallback | ( | SatUtMac::HandoverCallback | cb | ) |
Method to set handover callback.
| cb | callback to invoke whenever a TIM-U is received prompting us to switch beams |
Definition at line 235 of file satellite-ut-mac.cc.
References m_handoverCallback.
| void ns3::SatUtMac::SetLogonChannel | ( | uint32_t | channelId | ) |
Definition at line 331 of file satellite-ut-mac.cc.
References m_logonChannel, and m_useLogon.
|
virtual |
Set the node info.
| nodeInfo | containing node specific information |
Reimplemented from ns3::SatMac.
Definition at line 312 of file satellite-ut-mac.cc.
References m_tbtpContainer, m_utScheduler, and ns3::SatMac::SetNodeInfo().
| void ns3::SatUtMac::SetRaChannel | ( | uint32_t | raChannel | ) |
Set RA channel assigned for this UT.
| raChannel | RA channel assigned to this UT. |
Definition at line 339 of file satellite-ut-mac.cc.
References m_raChannel.
Referenced by ns3::SatUtHelperDvb::Install().
| void ns3::SatUtMac::SetRandomAccess | ( | Ptr< SatRandomAccess > | randomAccess | ) |
Set the random access module.
| randomAccess |
Definition at line 355 of file satellite-ut-mac.cc.
References ns3::SatTbtpContainer::HasScheduledTimeSlots(), m_randomAccess, and m_tbtpContainer.
|
virtual |
Set the satellite MAC address on the other side of this link (if regenerative satellite).
Reimplemented from ns3::SatMac.
Definition at line 288 of file satellite-ut-mac.cc.
References ns3::SatMac::m_isRegenerative, and ns3::SatMac::m_satelliteAddress.
Referenced by DoFrameStart().
| void ns3::SatUtMac::SetSendLogonCallback | ( | SatUtMac::SendLogonCallback | cb | ) |
Set the logon callback.
| cb | callback to invoke when sending a logon message |
Definition at line 272 of file satellite-ut-mac.cc.
References m_sendLogonCallback.
| void ns3::SatUtMac::SetSliceSubscriptionCallback | ( | SatUtMac::SliceSubscriptionCallback | cb | ) |
Get sliec subscription info from MAC layer.
| cb | callback to invoke slices subscription changes |
Definition at line 264 of file satellite-ut-mac.cc.
References m_sliceSubscriptionCallback.
| void ns3::SatUtMac::SetTimingAdvanceCallback | ( | SatUtMac::TimingAdvanceCallback | cb | ) |
Set the timing advance callback.
| cb | callback to invoke whenever a timing advance is needed by SatUtMac object. |
schedule the next frame start
Definition at line 390 of file satellite-ut-mac.cc.
References DoFrameStart(), GetNextSuperFrameTxTime(), GetRealSendingTime(), m_timingAdvanceCb, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
| void ns3::SatUtMac::SetTxCheckCallback | ( | SatUtMac::TxCheckCallback | cb | ) |
Set the TX check callback.
| cb | callback to invoke when checking if TX is enabled |
Definition at line 256 of file satellite-ut-mac.cc.
References m_txCheckCallback.
| void ns3::SatUtMac::SetUpdateAddressAndIdentifierCallback | ( | SatUtMac::UpdateAddressAndIdentifierCallback | cb | ) |
Set the callback to update addresses in statistics helpers.
| cb | Callback to update addresses in statistics helpers |
Definition at line 249 of file satellite-ut-mac.cc.
References m_updateAddressAndIdentifierCallback.
| void ns3::SatUtMac::SetUpdateGwAddressCallback | ( | SatUtMac::UpdateGwAddressCallback | cb | ) |
Set the gw update callback.
| cb | callback to update GW address to SatRequestManager |
Definition at line 280 of file satellite-ut-mac.cc.
References m_updateGwAddressCallback.
|
private |
| packets | |
| duration | |
| carrierId | |
| txInfo |
Definition at line 862 of file satellite-ut-mac.cc.
References ns3::SatUtMacState::HOLD_STANDBY, m_guardTime, ns3::SatMac::m_nodeInfo, m_rcstState, ns3::SatUtMacState::READY_FOR_TDMA_SYNC, and ns3::SatMac::SendPacket().
Referenced by CreateCrdsaPacketInstances(), DoEssaTransmit(), DoSlottedAlohaTransmit(), DoTransmit(), and SendLogon().
|
private |
Function for updating the used RA slots.
| superFrameId | super frame ID |
| allocationChannel | allocation channel |
| slot | RA slot |
remove past RA Tx opportunity information
Definition at line 1848 of file satellite-ut-mac.cc.
References ns3::SatMac::m_nodeInfo, m_usedRandomAccessSlots, and RemovePastRandomAccessSlots().
Referenced by FindNextAvailableRandomAccessSlot(), and ScheduleCrdsaTransmission().
|
private |
Callback for informing the assigned TBTP resources.
Definition at line 620 of file satellite-ut-mac.h.
Referenced by ScheduleTimeSlots(), and SetAssignedDaResourcesCallback().
|
private |
ID of beam for UT.
Definition at line 605 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), GetBeamId(), and ReceiveSignalingPacket().
|
private |
Clock drift (number of ticks per second).
Definition at line 769 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), GetRealSendingTime(), GetTypeId(), and ReceiveSignalingPacket().
|
private |
Planned CRDSA usage:
Definition at line 712 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), and CreateCrdsaPacketInstances().
|
private |
CRDSA packet ID (per frame).
Definition at line 705 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), CreateCrdsaPacketInstances(), DoEssaTransmit(), DoFrameStart(), and ScheduleCrdsaTransmission().
|
private |
Correction to apply to NCR dates.
Definition at line 764 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), GetRealSendingTime(), and ReceiveSignalingPacket().
|
private |
Definition at line 788 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ExtractPacketsToSchedule(), and ReceiveSignalingPacket().
|
private |
Gateway address update callback.
Definition at line 798 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), SetGatewayUpdateCallback(), and SetGwAddress().
|
private |
Guard time for time slots.
The guard time is modeled by shortening the duration of a time slot by a m_guardTime set by an attribute.
Definition at line 631 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and TransmitPackets().
|
private |
Definition at line 747 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), DoTransmit(), GetGwAddress(), and SetGwAddress().
|
private |
The physical layer handover callback.
Definition at line 793 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetHandoverCallback().
|
private |
Definition at line 785 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), and DoFrameStart().
|
private |
Definition at line 783 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), ExtractPacketsToSchedule(), and ReceiveSignalingPacket().
|
private |
Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access.
Definition at line 723 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoEssaTransmit(), DoRandomAccess(), and ReceiveQueueEventEssa().
|
private |
Reception date of last NCR control message.
Definition at line 754 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), and ReceiveSignalingPacket().
|
private |
UT is logged on.
Definition at line 661 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), LogOff(), and ReceiveSignalingPacket().
|
private |
RA channel dedicated to logon messages.
Definition at line 656 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ControlMsgTransmissionPossible(), DoRandomAccess(), LogOff(), SendLogon(), and SetLogonChannel().
|
private |
Definition at line 786 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and GetTypeId().
|
private |
Timeout for waiting for a response for a logon message.
Definition at line 681 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and SendLogon().
|
private |
NCR value of last NCR control message.
Definition at line 759 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), and ReceiveSignalingPacket().
|
private |
Instant when a logon message can be transmitted.
Definition at line 690 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and SendLogon().
|
private |
Next time when a next ESSA packet can be safely sent.
Definition at line 717 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoEssaTransmit(), and ScheduleEssaTransmission().
|
private |
Node containing this MAC.
Definition at line 595 of file satellite-ut-mac.h.
Referenced by SatUtMac(), and DoFrameStart().
|
private |
RA channel assigned to the UT.
Definition at line 651 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ControlMsgTransmissionPossible(), GetNextRandomAccessAllocationChannel(), GetRaChannel(), LogOff(), ReceiveSignalingPacket(), and SetRaChannel().
|
private |
RA main module.
Definition at line 625 of file satellite-ut-mac.h.
Referenced by SatUtMac(), ~SatUtMac(), ControlMsgTransmissionPossible(), CreateCrdsaPacketInstances(), DoFrameStart(), DoRandomAccess(), DoSlottedAlohaTransmit(), ReceiveQueueEvent(), ReceiveQueueEventEssa(), ReceiveSignalingPacket(), and SetRandomAccess().
|
private |
Definition at line 749 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), DoRandomAccess(), DoTransmit(), GetRcstState(), LogOff(), LogonMsgTransmissionPossible(), ReceiveSignalingPacket(), ScheduleTimeSlots(), and TransmitPackets().
|
private |
Store last 3 packets reception date, to be associated to NCR dates.
Definition at line 774 of file satellite-ut-mac.h.
Referenced by Receive(), and ReceiveSignalingPacket().
|
private |
ID of sat for UT.
Definition at line 600 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoFrameStart(), and GetSatId().
|
private |
Callback for sending a logon message.
Definition at line 813 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetSendLogonCallback().
|
private |
Number of times a logon message has been sent without response.
Definition at line 671 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ReceiveSignalingPacket(), and SendLogon().
|
private |
Tx checking callback.
Definition at line 808 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), ReceiveSignalingPacket(), and SetSliceSubscriptionCallback().
|
private |
Used superframe sequence for the return link.
Definition at line 610 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), CreateCrdsaPacketInstances(), DoFrameStart(), DoTransmit(), GetTypeId(), ScheduleEssaTransmission(), ScheduleSlottedAlohaTransmission(), ScheduleTimeSlots(), and SendLogon().
|
private |
Container for storing all the TBTP information related to this UT.
Definition at line 636 of file satellite-ut-mac.h.
Referenced by SatUtMac(), ~SatUtMac(), ControlMsgTransmissionPossible(), DoDispose(), DoFrameStart(), ScheduleSlottedAlohaTransmission(), ScheduleTimeSlots(), SetNodeInfo(), and SetRandomAccess().
|
private |
Assigned TBTP resources in superframe for this UT (in bytes).
Definition at line 700 of file satellite-ut-mac.h.
Referenced by GetTypeId(), and ScheduleTimeSlots().
|
private |
Callback for getting the timing advance information.
Definition at line 615 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), GetNextSuperFrameTxTime(), ScheduleTimeSlots(), and SetTimingAdvanceCallback().
|
private |
Definition at line 745 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ~SatUtMac(), DoFrameStart(), and ReceiveSignalingPacket().
|
private |
Tx checking callback.
Definition at line 803 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), DoTransmit(), and SetTxCheckCallback().
|
private |
Uniform random variable distribution generator.
Definition at line 641 of file satellite-ut-mac.h.
Referenced by SatUtMac().
|
private |
Callback to update addresses in statistics helpers.
Definition at line 823 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), and SetUpdateAddressAndIdentifierCallback().
|
private |
Callback for sending a logon message.
Definition at line 818 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), DoDispose(), DoFrameStart(), and SetUpdateGwAddressCallback().
|
private |
A container for storing the used RA slots in each frame and allocation channel.
Definition at line 646 of file satellite-ut-mac.h.
Referenced by PrintUsedRandomAccessSlots(), RemovePastRandomAccessSlots(), and UpdateUsedRandomAccessSlots().
|
private |
Should logon be simulated?
Definition at line 666 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), ControlMsgTransmissionPossible(), DoFrameStart(), DoRandomAccess(), DoTransmit(), LogonMsgTransmissionPossible(), ScheduleTimeSlots(), and SetLogonChannel().
|
private |
UT scheduler.
Definition at line 695 of file satellite-ut-mac.h.
Referenced by DoDispose(), DoEssaTransmit(), ExtractPacketsToSchedule(), GetTypeId(), and SetNodeInfo().
|
private |
The random generator for waiting transmission time.
Definition at line 685 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), and SendLogon().
|
private |
The initial max time to wait when sending a logon message.
Definition at line 676 of file satellite-ut-mac.h.
Referenced by SatUtMac(), SatUtMac(), GetTypeId(), and SendLogon().