23 #include <ns3/assert.h>
25 #include <ns3/nstime.h>
29 NS_LOG_COMPONENT_DEFINE(
"SatRtnLinkTime");
37 NS_LOG_FUNCTION(
this);
47 NS_LOG_FUNCTION(
this);
54 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId);
62 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId);
64 return (uint32_t)(Simulator::Now().GetInteger() /
71 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId);
79 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId);
82 return Time(count *
m_superframeSeq->GetDuration(superFrameSeqId).GetInteger());
88 NS_LOG_FUNCTION(
this << superFrameSeqId);
91 return Time(count *
m_superframeSeq->GetDuration(superFrameSeqId).GetInteger());
96 uint32_t superFrameCount,
97 Time timingAdvance)
const
99 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId << superFrameCount
100 << timingAdvance.GetSeconds());
102 return (Time(superFrameCount *
m_superframeSeq->GetDuration(superFrameSeqId).GetInteger()) -
109 NS_LOG_FUNCTION(
this << superFrameSeqId << timingAdvance.GetSeconds());
111 Time earliestRxTime = Simulator::Now() + timingAdvance;
113 earliestRxTime.GetInteger() /
m_superframeSeq->GetDuration(superFrameSeqId).GetInteger();
121 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId << timingAdvance.GetSeconds());
131 NS_LOG_FUNCTION(
this << superFrameSeqId << timingAdvance.GetSeconds());
133 Time expectedSuperframeReceiveStartTime =
136 Time transmitStart = expectedSuperframeReceiveStartTime - timingAdvance;
138 return transmitStart;
144 NS_LOG_FUNCTION(
this << (uint32_t)superFrameSeqId << timingAdvance.GetSeconds());
146 Time expectedSuperframeReceiveStartTime =
149 Time transmitStart = expectedSuperframeReceiveStartTime - timingAdvance;
151 return transmitStart;
virtual ~SatRtnLinkTime()
Destructor for SatRtnLinkTime.
Time GetNextSuperFrameStartTime(uint8_t superFrameSeqId) const
Get next superframe start time.
uint32_t GetNextSuperFrameCount(uint8_t superFrameSeqId) const
Get next superframe count.
Time GetCurrentSuperFrameTxTime(uint8_t superFrameSeqId, Time timingAdvance) const
Get superframe transmission time for current superframe with a certain timing advance.
Time GetCurrentSuperFrameStartTime(uint8_t superFrameSeqId) const
Get currently running superframe start time.
uint32_t GetCurrentSuperFrameCount(uint8_t superFrameSeqId) const
Get currently running superframe count.
SatRtnLinkTime()
Default constructor.
Time GetNextSuperFrameTxTime(uint8_t superFrameSeqId, Time timingAdvance) const
Get superframe transmission time for next superframe with a certain timing advance.
Ptr< SatSuperframeSeq > m_superframeSeq
void Initialize(Ptr< SatSuperframeSeq > seq)
Initialize with the superframe sequence.
Time GetSuperFrameTxTime(uint8_t superFrameSeqId, uint32_t superFrameCount, Time timingAdvance) const
Get superframe transmission time for a UT with a certain timing advance.
Time GetSuperFrameDuration(uint8_t superFrameSeqId) const
Get superframe duration of a superframe sequence.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.