140 NS_LOG_FUNCTION(
this);
142 bool hasScheduledTimeSlots =
false;
149 for (TbtpMap_t::const_reverse_iterator it =
m_tbtps.rbegin(); it !=
m_tbtps.rend(); ++it)
151 info = it->second->GetDaTimeslots(
m_address);
154 if (!info.second.empty())
156 Time superframeStartTime = it->first;
159 if (superframeStartTime >= Simulator::Now())
161 NS_LOG_INFO(
"Superframe counter: " << it->second->GetSuperframeCounter()
163 << superframeStartTime.GetSeconds());
165 hasScheduledTimeSlots =
true;
175 std::sort(info.second.begin(), info.second.end(),
SortTimeSlots());
178 Time startTimeOffsetForLastSlot = (*(info.second.rbegin()))->GetStartTime();
184 Ptr<SatSuperframeConf> superframeConf =
186 uint8_t frameId = info.first;
187 Ptr<SatFrameConf> frameConf = superframeConf->GetFrameConf(frameId);
188 uint32_t wfId = (*(info.second.rbegin()))->GetWaveFormId();
189 Ptr<SatWaveform> wf =
m_superframeSeq->GetWaveformConf()->GetWaveform(wfId);
190 Time lastSlotDuration =
191 wf->GetBurstDuration(frameConf->GetBtuConf()->GetSymbolRateInBauds());
194 "Superframe counter: "
195 << it->second->GetSuperframeCounter() <<
", start time: "
196 << superframeStartTime.GetSeconds() <<
", last allocated slot start time: "
197 << (superframeStartTime + startTimeOffsetForLastSlot).GetSeconds()
198 <<
", last allocated slot end time: "
199 << (superframeStartTime + startTimeOffsetForLastSlot + lastSlotDuration)
208 if ((superframeStartTime + startTimeOffsetForLastSlot + lastSlotDuration) >
211 hasScheduledTimeSlots =
true;
219 return hasScheduledTimeSlots;