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. More... | |
typedef Callback< void, Mac48Address > | GatewayUpdateCallback |
Callback to update gateway address after handover. More... | |
typedef Callback< void, uint32_t, uint32_t > | HandoverCallback |
Callback to reconfigure physical layer during handover. More... | |
typedef Callback< void > | SendLogonCallback |
Callback to send a logon message to the gateway. More... | |
typedef Callback< void, uint8_t > | SliceSubscriptionCallback |
Callback to check if TX is operational. More... | |
typedef void(* | TbtpResourcesTraceCallback) (uint32_t size) |
Callback signature for DaResourcesTrace trace source. More... | |
typedef Callback< Time > | TimingAdvanceCallback |
typedef Callback< bool > | TxCheckCallback |
Callback to check if TX is operational. More... | |
typedef Callback< void, Ptr< Node > > | UpdateAddressAndIdentifierCallback |
Callback to update addresses in statistics helpers. More... | |
typedef Callback< void, Mac48Address > | UpdateGwAddressCallback |
Callback to update GW address to SatRequestManager. More... | |
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. More... | |
typedef Callback< void, Ptr< const Packet > > | LoraReceiveCallback |
Callback to receive packet by upper layer. More... | |
typedef Callback< Ptr< SatControlMessage >, uint32_t > | ReadCtrlMsgCallback |
Callback to read control messages from container storing control messages. More... | |
typedef Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > | ReceiveCallback |
Callback to receive packet by upper layer. More... | |
typedef Callback< uint32_t, Ptr< SatControlMessage > > | ReserveCtrlMsgCallback |
Callback to reserve an id and initially store the control message. More... | |
typedef Callback< void, Address, Address > | RoutingUpdateCallback |
Callback to update routing and ARP tables after handover. More... | |
typedef Callback< uint32_t, uint32_t > | SendCtrlMsgCallback |
Callback to send a control message and allocate a recv ID for it. More... | |
typedef Callback< void, SatPhy::PacketContainer_t, uint32_t, Time, SatSignalParameters::txInfo_s > | TransmitCallback |
Callback to send packet to lower layer. More... | |
typedef Callback< void > | UpdateIslCallback |
Callback to update ISL routes when handovers are performed. More... | |
Public Member Functions | |
SatUtMac () | |
Default constructor, which is not used. More... | |
SatUtMac (Ptr< Node > node, uint32_t satId, uint32_t beamId, Ptr< SatSuperframeSeq > seq, bool crdsaOnlyForControl) | |
Construct a SatUtMac. More... | |
~SatUtMac () | |
Destroy a SatUtMac. More... | |
bool | ControlMsgTransmissionPossible () const |
Method to check whether a transmission of a control msg is somewhat possible. More... | |
uint32_t | GetBeamId () const |
Get beam ID of the object. More... | |
Mac48Address | GetGwAddress () |
Get address of the GW (or its MAC) serving this UT. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Derived from Object. More... | |
Time | GetNextSuperFrameTxTime (uint8_t superFrameSeqId) const |
Get Tx time for the next possible superframe. More... | |
uint32_t | GetRaChannel () const |
Get RA channel assigned for this UT. More... | |
SatUtMacState::RcstState_t | GetRcstState () const |
uint32_t | GetSatId () const |
Get sat ID of the object. More... | |
void | LogOff () |
bool | LogonMsgTransmissionPossible () const |
Method to check whether a transmission of a logon msg is somewhat possible. More... | |
virtual void | Receive (SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >) |
Receive packet from lower layer. More... | |
virtual void | ReceiveQueueEvent (SatQueue::QueueEvent_t event, uint8_t rcIndex) |
Receive a queue event: More... | |
virtual void | ReceiveQueueEventEssa (SatQueue::QueueEvent_t event, uint8_t rcIndex) |
Receive a queue event: More... | |
void | SendLogon (Ptr< Packet > packet) |
Receive a logon message to transmit /param packet The logon packet to send. More... | |
void | SetAssignedDaResourcesCallback (SatUtMac::AssignedDaResourcesCallback cb) |
Set the assigned DA resources callback. More... | |
void | SetGatewayUpdateCallback (SatUtMac::GatewayUpdateCallback cb) |
Method to set the gateway address update callback. More... | |
void | SetGwAddress (Mac48Address gwAddress) |
Set address of the GW (or its MAC) serving this UT. More... | |
void | SetHandoverCallback (SatUtMac::HandoverCallback cb) |
Method to set handover callback. More... | |
void | SetLogonChannel (uint32_t channelId) |
virtual void | SetNodeInfo (Ptr< SatNodeInfo > nodeInfo) |
Set the node info. More... | |
void | SetRaChannel (uint32_t raChannel) |
Set RA channel assigned for this UT. More... | |
void | SetRandomAccess (Ptr< SatRandomAccess > randomAccess) |
Set the random access module. More... | |
virtual void | SetSatelliteAddress (Address satelliteAddress) |
Set the satellite MAC address on the other side of this link (if regenerative satellite). More... | |
void | SetSendLogonCallback (SatUtMac::SendLogonCallback cb) |
Set the logon callback. More... | |
void | SetSliceSubscriptionCallback (SatUtMac::SliceSubscriptionCallback cb) |
Get sliec subscription info from MAC layer. More... | |
void | SetTimingAdvanceCallback (SatUtMac::TimingAdvanceCallback cb) |
Set the timing advance callback. More... | |
void | SetTxCheckCallback (SatUtMac::TxCheckCallback cb) |
Set the TX check callback. More... | |
void | SetUpdateAddressAndIdentifierCallback (SatUtMac::UpdateAddressAndIdentifierCallback cb) |
Set the callback to update addresses in statistics helpers. More... | |
void | SetUpdateGwAddressCallback (SatUtMac::UpdateGwAddressCallback cb) |
Set the gw update callback. More... | |
Public Member Functions inherited from ns3::SatMac | |
SatMac () | |
Construct a SatMac. More... | |
SatMac (uint32_t satId, uint32_t beamId) | |
Construct a SatMac. More... | |
~SatMac () | |
Destroy a SatMac. More... | |
virtual void | Disable () |
Disable the MAC layer, i.e. More... | |
virtual void | Enable () |
Enable the MAC layer, i.e. More... | |
Address | GetAddress () const |
Get MAC address. More... | |
uint32_t | GetBeamId () const |
Get beam ID of the object. More... | |
uint32_t | GetSatId () const |
Get sat ID of the object. More... | |
uint32_t | ReserveIdAndStoreCtrlMsgToContainer (Ptr< SatControlMessage > msg) |
Reserve id and store the control message. More... | |
uint32_t | SendCtrlMsgFromContainer (uint32_t sendId) |
Send the control message from the container. More... | |
void | SetBeamId (uint32_t beamId) |
Set beam ID of the object. More... | |
void | SetBeamSchedulerCallback (SatMac::BeamSchedulerCallback cb) |
Set the beam scheduler callback. More... | |
void | SetHandoverModule (Ptr< SatHandoverModule > handoverModule) |
Set the handover module. More... | |
void | SetLoraReceiveCallback (SatMac::LoraReceiveCallback cb) |
Method to set receive callback. More... | |
void | SetReadCtrlCallback (SatMac::ReadCtrlMsgCallback cb) |
Method to set read control message callback. More... | |
void | SetReceiveCallback (SatMac::ReceiveCallback cb) |
Method to set receive callback. More... | |
void | SetReserveCtrlCallback (SatMac::ReserveCtrlMsgCallback cb) |
Method to set reserve control message id callback. More... | |
void | SetRoutingUpdateCallback (SatMac::RoutingUpdateCallback cb) |
Method to set the routing update callback. More... | |
void | SetSatId (uint32_t satId) |
Set sat ID of the object. More... | |
void | SetSendCtrlCallback (SatMac::SendCtrlMsgCallback cb) |
Method to set send control message callback. More... | |
void | SetTransmitCallback (SatMac::TransmitCallback cb) |
Method to set transmit callback. More... | |
void | SetUpdateIslCallback (SatMac::UpdateIslCallback cb) |
Method to set update ISL callback. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Derived from Object. More... | |
Static Public Member Functions inherited from ns3::SatMac | |
static TypeId | GetTypeId (void) |
Derived from Object. More... | |
Protected Member Functions | |
void | DoDispose (void) |
Dispose of SatUtMac. More... | |
Protected Member Functions inherited from ns3::SatMac | |
void | DoDispose (void) |
Dispose of SatMac. More... | |
void | RxTraces (SatPhy::PacketContainer_t packets) |
Invoke the Rx trace source for each received packet. More... | |
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. More... | |
void | SetTimeTag (SatPhy::PacketContainer_t packets) |
Set SatMacTimeTag of packets. More... | |
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. More... | |
void | DoFrameStart () |
Function which is executed at every frame start. More... | |
void | DoRandomAccess (SatEnums::RandomAccessTriggerType_t randomAccessTriggerType) |
Do random access evaluation for Tx opportunities. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
uint32_t | GetNextRandomAccessAllocationChannel () |
Function for selecting the allocation channel for the current RA evaluation. More... | |
Time | GetRealSendingTime (Time t) |
Compute real sending time of UT based on last NCR reception date and clock drift. More... | |
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. More... | |
void | RemovePastRandomAccessSlots (uint32_t superFrameId) |
Function for removing the past used RA slots. More... | |
void | ScheduleCrdsaTransmission (uint32_t allocationChannel, SatRandomAccess::RandomAccessTxOpportunities_s txOpportunities) |
Function for scheduling the CRDSA transmissions. More... | |
void | ScheduleDaTxOpportunity (Time transmitDelay, Time duration, Ptr< SatWaveform > wf, Ptr< SatTimeSlotConf > tsConf, uint32_t carrierId) |
Schdules one Tx opportunity, i.e. More... | |
void | ScheduleEssaTransmission (uint32_t allocationChannel) |
Function for scheduling the ESSA transmissions. More... | |
void | ScheduleSlottedAlohaTransmission (uint32_t allocationChannel) |
Function for scheduling the Slotted ALOHA transmissions. More... | |
void | ScheduleTimeSlots (Ptr< SatTbtpMessage > tbtp) |
Schedules time slots according to received TBTP message. More... | |
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. More... | |
Private Attributes | |
AssignedDaResourcesCallback | m_assignedDaResourcesCallback |
Callback for informing the assigned TBTP resources. More... | |
uint32_t | m_beamId |
ID of beam for UT. More... | |
int32_t | m_clockDrift |
Clock drift (number of ticks per second) More... | |
bool | m_crdsaOnlyForControl |
Planned CRDSA usage: More... | |
uint32_t | m_crdsaUniquePacketId |
CRDSA packet ID (per frame) More... | |
int64_t | m_deltaNcr |
Correction to apply to NCR dates. More... | |
uint32_t | m_firstTransmittableSuperframeId |
SatUtMac::GatewayUpdateCallback | m_gatewayUpdateCallback |
Gateway address update callback. More... | |
Time | m_guardTime |
Guard time for time slots. More... | |
Mac48Address | m_gwAddress |
SatUtMac::HandoverCallback | m_handoverCallback |
The physical layer handover callback. More... | |
uint32_t | m_handoverMessagesCount |
HandoverState_t | m_handoverState |
bool | m_isRandomAccessScheduled |
Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access. More... | |
Time | m_lastNcrDateReceived |
Reception date of last NCR control message. More... | |
bool | m_loggedOn |
UT is logged on. More... | |
uint32_t | m_logonChannel |
RA channel dedicated to logon messages. More... | |
uint32_t | m_maxHandoverMessagesSent |
Time | m_maxWaitingTimeLogonResponse |
Timeout for waiting for a response for a logon message. More... | |
uint64_t | m_ncr |
NCR value of last NCR control message. More... | |
Time | m_nextLogonTransmissionPossible |
Instant when a logon message can be transmitted. More... | |
Time | m_nextPacketTime |
Next time when a next ESSA packet can be safely sent. More... | |
Ptr< Node > | m_node |
Node containing this MAC. More... | |
uint32_t | m_raChannel |
RA channel assigned to the UT. More... | |
Ptr< SatRandomAccess > | m_randomAccess |
RA main module. More... | |
SatUtMacState | m_rcstState |
std::queue< Time > | m_receptionDates |
Store last 3 packets reception date, to be associated to NCR dates. More... | |
uint32_t | m_satId |
ID of sat for UT. More... | |
SatUtMac::SendLogonCallback | m_sendLogonCallback |
Callback for sending a logon message. More... | |
uint32_t | m_sendLogonTries |
Number of times a logon message has been sent without response. More... | |
SatUtMac::SliceSubscriptionCallback | m_sliceSubscriptionCallback |
Tx checking callback. More... | |
Ptr< SatSuperframeSeq > | m_superframeSeq |
Used superframe sequence for the return link. More... | |
Ptr< SatTbtpContainer > | m_tbtpContainer |
Container for storing all the TBTP information related to this UT. More... | |
TracedCallback< uint32_t > | m_tbtpResourcesTrace |
Assigned TBTP resources in superframe for this UT (in bytes). More... | |
TimingAdvanceCallback | m_timingAdvanceCb |
Callback for getting the timing advance information. More... | |
Ptr< SatTimuInfo > | m_timuInfo |
SatUtMac::TxCheckCallback | m_txCheckCallback |
Tx checking callback. More... | |
Ptr< UniformRandomVariable > | m_uniformRandomVariable |
Uniform random variable distribution generator. More... | |
SatUtMac::UpdateAddressAndIdentifierCallback | m_updateAddressAndIdentifierCallback |
Callback to update addresses in statistics helpers. More... | |
SatUtMac::UpdateGwAddressCallback | m_updateGwAddressCallback |
Callback for sending a logon message. More... | |
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. More... | |
bool | m_useLogon |
Should logon be simulated? More... | |
Ptr< SatUtScheduler > | m_utScheduler |
UT scheduler. More... | |
Ptr< UniformRandomVariable > | m_waitingTimeLogonRng |
The random generator for waiting transmission time. More... | |
Time | m_windowInitLogon |
The initial max time to wait when sending a logon message. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ns3::SatMac | |
Time | m_beamEnabledTime |
Time of the last beam enable event. More... | |
uint32_t | m_beamId |
The ID of the beam where mac belongs. More... | |
SatMac::BeamSchedulerCallback | m_beamSchedulerCallback |
Callback to get the SatBeamScheduler linked to a beam ID. More... | |
TracedCallback< Time > | m_beamServiceTrace |
Traced callback for beam being disabled and including service time. More... | |
SatEnums::RegenerationMode_t | m_forwardLinkRegenerationMode |
Regeneration mode on forward link. More... | |
Ptr< SatHandoverModule > | m_handoverModule |
Module used to perform handovers. More... | |
bool | m_isRegenerative |
Indicate if satellite is regeneration (at least LINK level) for TX. More... | |
bool | m_isStatisticsTagsEnabled |
EnableStatisticsTags attribute. More... | |
Time | m_lastDelay |
Last delay measurement. More... | |
Time | m_lastLinkDelay |
Last delay measurement for link. More... | |
std::queue< Time > | m_lastSOF |
Store last 3 SOF date for Forward messages, to insert in NCR packets. More... | |
std::queue< Ptr< SatNcrMessage > > | m_ncrMessagesToSend |
List of NCR control messages created but not sent yet. More... | |
bool | m_ncrV2 |
Use of version 2 of NCR dates. More... | |
Ptr< SatNodeInfo > | m_nodeInfo |
Node info containing node related information, such as node type, node id and MAC address (of the SatNetDevice) More... | |
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. More... | |
SatMac::ReadCtrlMsgCallback | m_readCtrlCallback |
The read control message callback. More... | |
SatMac::ReserveCtrlMsgCallback | m_reserveCtrlCallback |
The reserve control message id callback. More... | |
SatEnums::RegenerationMode_t | m_returnLinkRegenerationMode |
Regeneration mode on return link. More... | |
SatMac::RoutingUpdateCallback | m_routingUpdateCallback |
Callback to update routing and ARP tables after a beam handover. More... | |
SatMac::ReceiveCallback | m_rxCallback |
The upper layer package receive callback. More... | |
TracedCallback< const Time &, const Address & > | m_rxDelayTrace |
Traced callback for all received packets, including delay information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxJitterTrace |
Traced callback for all received packets, including jitter information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxLinkDelayTrace |
Traced callback for all received packets, including link delay information and the address of the senders. More... | |
TracedCallback< const Time &, const Address & > | m_rxLinkJitterTrace |
Traced callback for all received packets, including link jitter information and the address of the senders. More... | |
SatMac::LoraReceiveCallback | m_rxLoraCallback |
The upper layer package receive callback. More... | |
TracedCallback< Ptr< const Packet >, const Address & > | m_rxTrace |
Traced callback for all received packets, including the address of the senders. More... | |
Address | m_satelliteAddress |
MAC address of satellite on other side of the link. More... | |
uint32_t | m_satId |
The ID of the sat where mac belongs. More... | |
SatMac::SendCtrlMsgCallback | m_sendCtrlCallback |
The send control message callback. More... | |
SatMac::TransmitCallback | m_txCallback |
The lower layer packet transmit callback. More... | |
bool | m_txEnabled |
Flag indicating whether the MAC is enabled, i.e. More... | |
SatMac::UpdateIslCallback | m_updateIslCallback |
The update ISL routes callback. More... | |
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 157 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 324 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 312 of file satellite-ut-mac.h.
typedef Callback<void> ns3::SatUtMac::SendLogonCallback |
Callback to send a logon message to the gateway.
Definition at line 190 of file satellite-ut-mac.h.
typedef Callback<void, uint8_t> ns3::SatUtMac::SliceSubscriptionCallback |
Callback to check if TX is operational.
Definition at line 179 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 306 of file satellite-ut-mac.h.
typedef Callback<Time> ns3::SatUtMac::TimingAdvanceCallback |
Definition at line 143 of file satellite-ut-mac.h.
typedef Callback<bool> ns3::SatUtMac::TxCheckCallback |
Callback to check if TX is operational.
Definition at line 168 of file satellite-ut-mac.h.
typedef Callback<void, Ptr<Node> > ns3::SatUtMac::UpdateAddressAndIdentifierCallback |
Callback to update addresses in statistics helpers.
Definition at line 335 of file satellite-ut-mac.h.
typedef Callback<void, Mac48Address> ns3::SatUtMac::UpdateGwAddressCallback |
Callback to update GW address to SatRequestManager.
Definition at line 201 of file satellite-ut-mac.h.
|
private |
Enumerator | |
---|---|
NO_HANDOVER | |
HANDOVER_RECOMMENDATION_SENT | |
WAITING_FOR_TBTP |
Definition at line 780 of file satellite-ut-mac.h.
ns3::SatUtMac::SatUtMac | ( | ) |
Default constructor, which is not used.
Definition at line 122 of file satellite-ut-mac.cc.
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 166 of file satellite-ut-mac.cc.
References m_superframeSeq, m_tbtpContainer, and m_uniformRandomVariable.
ns3::SatUtMac::~SatUtMac | ( | ) |
Destroy a SatUtMac.
This is the destructor for the SatUtMac.
Definition at line 214 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 373 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 1681 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 224 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 746 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 1951 of file satellite-ut-mac.cc.
References DoRandomAccess(), GetNextSuperFrameTxTime(), GetRealSendingTime(), ns3::SatUtMacState::GetState(), HANDOVER_RECOMMENDATION_SENT, 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, ns3::SatUtMacState::SwitchToHoldStandby(), ns3::SatUtMacState::SwitchToOffStandby(), ns3::SatUtMacState::SwitchToReadyForLogon(), and WAITING_FOR_TBTP.
Referenced by 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 1313 of file satellite-ut-mac.cc.
References GetNextRandomAccessAllocationChannel(), GetRealSendingTime(), ns3::SatUtMacState::GetState(), 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, 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 682 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 601 of file satellite-ut-mac.cc.
References ns3::SatSignalParameters::txInfo_s::fecBlockSizeInBytes, FetchPackets(), ns3::SatSignalParameters::txInfo_s::frameType, ns3::SatEncapPduStatusTag::FULL_PDU, ns3::SatUtMacState::GetState(), 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::SwitchToHoldStandby(), 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 2196 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 823 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 1534 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 128 of file satellite-ut-mac.h.
References m_beamId.
|
private |
Definition at line 448 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 437 of file satellite-ut-mac.cc.
References m_timingAdvanceCb.
Referenced by ScheduleCrdsaTransmission(), and ScheduleSlottedAlohaTransmission().
Mac48Address ns3::SatUtMac::GetGwAddress | ( | void | ) |
Get address of the GW (or its MAC) serving this UT.
Definition at line 303 of file satellite-ut-mac.cc.
References m_gwAddress.
|
virtual |
Derived from Object.
Definition at line 115 of file satellite-ut-mac.cc.
References GetTypeId().
|
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 1391 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 426 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 355 of file satellite-ut-mac.cc.
References m_raChannel.
SatUtMacState::RcstState_t ns3::SatUtMac::GetRcstState | ( | ) | const |
Definition at line 2189 of file satellite-ut-mac.cc.
References ns3::SatUtMacState::GetState(), and 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 2134 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 119 of file satellite-ut-mac.h.
References m_satId.
|
static |
Derived from Object.
Definition at line 65 of file satellite-ut-mac.cc.
References m_clockDrift, m_guardTime, m_maxHandoverMessagesSent, m_maxWaitingTimeLogonResponse, m_superframeSeq, m_tbtpResourcesTrace, m_utScheduler, and m_windowInitLogon.
Referenced by GetInstanceTypeId().
|
private |
superFrameId | |
allocationChannelId | |
slotId |
void ns3::SatUtMac::LogOff | ( | ) |
Definition at line 330 of file satellite-ut-mac.cc.
References m_loggedOn, m_logonChannel, m_raChannel, m_rcstState, and ns3::SatUtMacState::SwitchToOffStandby().
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 387 of file satellite-ut-mac.cc.
References ns3::SatUtMacState::GetState(), ns3::SatUtMacState::IsNcrTimeout(), m_rcstState, and m_useLogon.
Referenced by ns3::SatUtHelperDvb::Install().
|
private |
Definition at line 1933 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 1005 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 905 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 929 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 1088 of file satellite-ut-mac.cc.
References ControlMsgTransmissionPossible(), ns3::SatMacTag::GetDestAddress(), ns3::SatAddressE2ETag::GetE2ESourceAddress(), ns3::SatControlMsgTag::GetMsgId(), ns3::SatControlMsgTag::GetMsgType(), ns3::SatUtMacState::GetState(), 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::NcrControlMessageReceived(), 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(), ns3::SatUtMacState::SetLogOffCallback(), ns3::SatUtMacState::SwitchToReadyForLogon(), ns3::SatUtMacState::SwitchToReadyForTdmaSync(), and WAITING_FOR_TBTP.
Referenced by Receive().
|
private |
Function for removing the past used RA slots.
superFrameId | super frame ID |
Definition at line 1911 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 1631 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 571 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 1578 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 1402 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 457 of file satellite-ut-mac.cc.
References ns3::SatSuperframeConf::CONFIG_TYPE_4, ns3::SatUtMacState::GetState(), m_assignedDaResourcesCallback, ns3::SatMac::m_nodeInfo, m_rcstState, m_superframeSeq, m_tbtpContainer, m_tbtpResourcesTrace, m_timingAdvanceCb, m_useLogon, ns3::SatEnums::NUM_FIDS, ScheduleDaTxOpportunity(), ns3::SatTimeSlotConf::SLOT_TYPE_C, and ns3::SatConstVariables::SUPERFRAME_SEQUENCE.
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 1505 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 956 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 418 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 250 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 311 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 243 of file satellite-ut-mac.cc.
References m_handoverCallback.
void ns3::SatUtMac::SetLogonChannel | ( | uint32_t | channelId | ) |
Definition at line 339 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 320 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 347 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 363 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 296 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 280 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 272 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 398 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 264 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 257 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 288 of file satellite-ut-mac.cc.
References m_updateGwAddressCallback.
|
private |
packets | |
duration | |
carrierId | |
txInfo |
Definition at line 870 of file satellite-ut-mac.cc.
References ns3::SatUtMacState::GetState(), m_guardTime, ns3::SatMac::m_nodeInfo, m_rcstState, ns3::SatMac::SendPacket(), ns3::SatUtMacState::SwitchToOffStandby(), and ns3::SatUtMacState::SwitchToTdmaSync().
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 1856 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 624 of file satellite-ut-mac.h.
Referenced by ScheduleTimeSlots(), and SetAssignedDaResourcesCallback().
|
private |
ID of beam for UT.
Definition at line 609 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), GetBeamId(), ns3::SatUtMac::SatTimuInfo::GetBeamId(), and ReceiveSignalingPacket().
|
private |
Clock drift (number of ticks per second)
Definition at line 773 of file satellite-ut-mac.h.
Referenced by GetRealSendingTime(), GetTypeId(), and ReceiveSignalingPacket().
|
private |
Planned CRDSA usage:
Definition at line 716 of file satellite-ut-mac.h.
Referenced by CreateCrdsaPacketInstances().
|
private |
CRDSA packet ID (per frame)
Definition at line 709 of file satellite-ut-mac.h.
Referenced by CreateCrdsaPacketInstances(), DoEssaTransmit(), DoFrameStart(), and ScheduleCrdsaTransmission().
|
private |
Correction to apply to NCR dates.
Definition at line 768 of file satellite-ut-mac.h.
Referenced by GetRealSendingTime(), and ReceiveSignalingPacket().
|
private |
Definition at line 792 of file satellite-ut-mac.h.
Referenced by ExtractPacketsToSchedule(), and ReceiveSignalingPacket().
|
private |
Gateway address update callback.
Definition at line 802 of file satellite-ut-mac.h.
Referenced by 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 635 of file satellite-ut-mac.h.
Referenced by GetTypeId(), and TransmitPackets().
|
private |
Definition at line 751 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), DoTransmit(), GetGwAddress(), ns3::SatUtMac::SatTimuInfo::GetGwAddress(), and SetGwAddress().
|
private |
The physical layer handover callback.
Definition at line 797 of file satellite-ut-mac.h.
Referenced by DoDispose(), DoFrameStart(), and SetHandoverCallback().
|
private |
Definition at line 789 of file satellite-ut-mac.h.
Referenced by DoFrameStart().
|
private |
Definition at line 787 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), ExtractPacketsToSchedule(), and ReceiveSignalingPacket().
|
private |
Flag that indicates if a method DoRandomAccess is scheduled for asynchronous access.
Definition at line 727 of file satellite-ut-mac.h.
Referenced by DoEssaTransmit(), DoRandomAccess(), and ReceiveQueueEventEssa().
|
private |
Reception date of last NCR control message.
Definition at line 758 of file satellite-ut-mac.h.
Referenced by ReceiveSignalingPacket().
|
private |
UT is logged on.
Definition at line 665 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), LogOff(), and ReceiveSignalingPacket().
|
private |
RA channel dedicated to logon messages.
Definition at line 660 of file satellite-ut-mac.h.
Referenced by ControlMsgTransmissionPossible(), DoRandomAccess(), LogOff(), SendLogon(), and SetLogonChannel().
|
private |
Definition at line 790 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), and GetTypeId().
|
private |
Timeout for waiting for a response for a logon message.
Definition at line 685 of file satellite-ut-mac.h.
Referenced by GetTypeId(), and SendLogon().
|
private |
NCR value of last NCR control message.
Definition at line 763 of file satellite-ut-mac.h.
Referenced by ReceiveSignalingPacket().
|
private |
Instant when a logon message can be transmitted.
Definition at line 694 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), and SendLogon().
|
private |
Next time when a next ESSA packet can be safely sent.
Definition at line 721 of file satellite-ut-mac.h.
Referenced by DoEssaTransmit(), and ScheduleEssaTransmission().
|
private |
Node containing this MAC.
Definition at line 599 of file satellite-ut-mac.h.
Referenced by DoFrameStart().
|
private |
RA channel assigned to the UT.
Definition at line 655 of file satellite-ut-mac.h.
Referenced by ControlMsgTransmissionPossible(), GetNextRandomAccessAllocationChannel(), GetRaChannel(), LogOff(), ReceiveSignalingPacket(), and SetRaChannel().
|
private |
RA main module.
Definition at line 629 of file satellite-ut-mac.h.
Referenced by ~SatUtMac(), ControlMsgTransmissionPossible(), CreateCrdsaPacketInstances(), DoFrameStart(), DoRandomAccess(), DoSlottedAlohaTransmit(), ReceiveQueueEvent(), ReceiveQueueEventEssa(), ReceiveSignalingPacket(), and SetRandomAccess().
|
private |
Definition at line 753 of file satellite-ut-mac.h.
Referenced by 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 778 of file satellite-ut-mac.h.
Referenced by Receive(), and ReceiveSignalingPacket().
|
private |
ID of sat for UT.
Definition at line 604 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), GetSatId(), and ns3::SatUtMac::SatTimuInfo::GetSatId().
|
private |
Callback for sending a logon message.
Definition at line 817 of file satellite-ut-mac.h.
Referenced by DoDispose(), DoFrameStart(), and SetSendLogonCallback().
|
private |
Number of times a logon message has been sent without response.
Definition at line 675 of file satellite-ut-mac.h.
Referenced by ReceiveSignalingPacket(), and SendLogon().
|
private |
Tx checking callback.
Definition at line 812 of file satellite-ut-mac.h.
Referenced by DoDispose(), ReceiveSignalingPacket(), and SetSliceSubscriptionCallback().
|
private |
Used superframe sequence for the return link.
Definition at line 614 of file satellite-ut-mac.h.
Referenced by 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 640 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 704 of file satellite-ut-mac.h.
Referenced by GetTypeId(), and ScheduleTimeSlots().
|
private |
Callback for getting the timing advance information.
Definition at line 619 of file satellite-ut-mac.h.
Referenced by DoDispose(), GetCurrentSuperFrameId(), GetCurrentSuperFrameStartTime(), GetNextSuperFrameTxTime(), ScheduleTimeSlots(), and SetTimingAdvanceCallback().
|
private |
Definition at line 749 of file satellite-ut-mac.h.
Referenced by ~SatUtMac(), DoFrameStart(), and ReceiveSignalingPacket().
|
private |
Tx checking callback.
Definition at line 807 of file satellite-ut-mac.h.
Referenced by DoDispose(), DoFrameStart(), DoTransmit(), and SetTxCheckCallback().
|
private |
Uniform random variable distribution generator.
Definition at line 645 of file satellite-ut-mac.h.
Referenced by SatUtMac().
|
private |
Callback to update addresses in statistics helpers.
Definition at line 827 of file satellite-ut-mac.h.
Referenced by DoFrameStart(), and SetUpdateAddressAndIdentifierCallback().
|
private |
Callback for sending a logon message.
Definition at line 822 of file satellite-ut-mac.h.
Referenced by DoDispose(), DoFrameStart(), and SetUpdateGwAddressCallback().
|
private |
A container for storing the used RA slots in each frame and allocation channel.
Definition at line 650 of file satellite-ut-mac.h.
Referenced by PrintUsedRandomAccessSlots(), RemovePastRandomAccessSlots(), and UpdateUsedRandomAccessSlots().
|
private |
Should logon be simulated?
Definition at line 670 of file satellite-ut-mac.h.
Referenced by ControlMsgTransmissionPossible(), DoFrameStart(), DoRandomAccess(), DoTransmit(), LogonMsgTransmissionPossible(), ScheduleTimeSlots(), and SetLogonChannel().
|
private |
UT scheduler.
Definition at line 699 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 689 of file satellite-ut-mac.h.
Referenced by SendLogon().
|
private |
The initial max time to wait when sending a logon message.
Definition at line 680 of file satellite-ut-mac.h.
Referenced by GetTypeId(), and SendLogon().