Skip to content

Commit

Permalink
comments: remove useless TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dpugliese6 authored and GiovanniGrieco committed Jan 9, 2025
1 parent 527d153 commit 0034151
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 22 deletions.
5 changes: 0 additions & 5 deletions src/application/nat-application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ NatApplication::RecvPktFromExtNetDev(Ptr<NetDevice> netdev,
const Address& sender)
{
NS_LOG_FUNCTION(this << netdev << pkt << protocol << sender);
// TODO: This is a fake address. How can we easily retrieve the receiver IP Address from the
// packet?
auto receiver = Ipv4Address::GetZero();

return RecvPktFromNetDev(netdev,
Expand Down Expand Up @@ -154,7 +152,6 @@ NatApplication::RecvPktFromNetDev(Ptr<NetDevice> netdev,
toBeSent->RemoveHeader(ipHdr);
ipv4Protocol = ipHdr.GetProtocol();

// TODO: if (ipv4Protocol == 6 /* TCP */)
if (ipv4Protocol == 17 /* UDP */)
{
toBeSent->RemoveHeader(udpHdr);
Expand All @@ -166,7 +163,6 @@ NatApplication::RecvPktFromNetDev(Ptr<NetDevice> netdev,
auto outPort = m_natTable[entry];
if (!outPort)
{
// TODO: TCP could break!
if (m_curNatPort <= 0 || m_curNatPort >= UINT16_MAX)
m_curNatPort = 1;

Expand Down Expand Up @@ -204,7 +200,6 @@ NatApplication::RecvPktFromNetDev(Ptr<NetDevice> netdev,
toBeSent->RemoveHeader(ipHdr);
ipv4Protocol = ipHdr.GetProtocol();

// TODO: if (ipv4Protocol == 6 /* TCP */)
if (ipv4Protocol == 17 /* UDP */)
{
toBeSent->RemoveHeader(udpHdr);
Expand Down
3 changes: 1 addition & 2 deletions src/application/tcp-stub-client-application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ TcpStubClientApplication::StartApplication()
NS_LOG_FUNCTION(this);
TcpClientServerApplication::StartApplication();

Simulator::ScheduleNow(&TcpStubClientApplication::Connect,
this); // TODO: parametrize Seconds (0.5)
Simulator::ScheduleNow(&TcpStubClientApplication::Connect, this);
// Simulator::Schedule (m_txInterval, &TcpStubClientApplication::SendPacket, this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ NullNtnDemoMacLayerSimulationHelper::ComputeSnr(ComputeSnrParams& params) const
else
{
// fallback to Topocentric
// TODO: need a threshold to understand if we can simplify to
// Topocentric, or it is better to use a projection
return mm->GetPosition(PositionType::TOPOCENTRIC);
}
};
Expand Down
3 changes: 1 addition & 2 deletions src/irs/irs-assisted-spectrum-channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ IrsAssistedSpectrumChannel::StartTx(Ptr<SpectrumSignalParameters> txParams)
{
NS_LOG_LOGIC("converting txPowerSpectrum SpectrumModelUids "
<< txSpectrumModelUid << " --> " << rxSpectrumModelUid);
auto rxConverterIt = txInfoIt->second.m_spectrumConverterMap.find(
rxSpectrumModelUid); // TODO: const ref?
auto rxConverterIt = txInfoIt->second.m_spectrumConverterMap.find(rxSpectrumModelUid);
if (rxConverterIt == txInfoIt->second.m_spectrumConverterMap.end())
{
// No converter means TX SpectrumModel is orthogonal to RX SpectrumModel
Expand Down
3 changes: 0 additions & 3 deletions src/irs/serving-configurator/defined-serving-configurator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ DefinedServingConfigurator::ScheduleUpdates()
{
if (periodend <= periodstart + nextupdate)
{
// TODO: schedule patch and serving configurator destruction?
// Simulator::Schedule (Seconds (periodstart + nextupdate),
// &DefinedServingConfigurator::DoDispose, this);
break; // we have reached the end of the period, no need to continue
}
if (nextupdate > 0)
Expand Down
3 changes: 0 additions & 3 deletions src/irs/serving-configurator/periodic-serving-configurator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ PeriodicServingConfigurator::ScheduleUpdates()
{
if (periodend <= periodstart + nextupdate)
{
// TODO: schedule patch and serving configurator destruction?
// Simulator::Schedule (Seconds (nextupdate), &PeriodicServingConfigurator::DoDispose,
// this);
break; // we have reached the end of the period, no need to continue
}
if (nextupdate > 0)
Expand Down
3 changes: 0 additions & 3 deletions src/irs/serving-configurator/random-serving-configurator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ RandomServingConfigurator::ScheduleUpdates()
{
if (periodend <= periodstart + nextupdate)
{
// TODO: schedule patch and serving configurator destruction?
// Simulator::Schedule (Seconds (nextupdate), &PeriodicServingConfigurator::DoDispose,
// this);
break; // we have reached the end of the period, no need to continue
}
if (nextupdate > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class ParametricSpeedDroneMobilityModel : public GeocentricMobilityModel

ParametricSpeedDroneMobilityModel();

// TODO: Put into generic Utility object
static FlightPlan ProjectedToGeographicCoordinates(
const FlightPlan& flightPlan,
GeographicPositions::EarthSpheroidType earthType);
Expand Down
2 changes: 1 addition & 1 deletion src/report/wifi-phy-layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ WifiPhyLayer::DoInitialize()
{
NS_LOG_FUNCTION_NOARGS();

m_address = GetDeviceAddress(); // TODO: it would be usedul to report it in the XML file.
m_address = GetDeviceAddress();
DoInitializeRssiMonitor();

ProtocolLayer::DoInitialize();
Expand Down

0 comments on commit 0034151

Please sign in to comment.