I am trying to write a scenario for the NR-U module. First, I made a CMakeLists.txt for the example folder and managed to compile it.
Then the wifi-setup.cc has some codding issue for an unrecognised use of "AddDevice" which I fixed (or I think i fixed) by doing the following changes using "SpectrumWifiPhy" :
Ptr<SpectrumWifiPhy> wifiSpectrumPhy;
ObjectVectorValue WifiSpectrumPhys;
// wifiSpectrumPhy->SetAntenna (antennaArray);
for (uint32_t i = 0; i < m_gnbDev.GetN (); ++i)
{
Ptr<WifiNetDevice> netDevice = DynamicCast<WifiNetDevice> (m_gnbDev.Get (i));
wifiSpectrumPhy = WifiSpectrumPhys.Get (0)->GetObject <SpectrumWifiPhy> ();
wifiSpectrumPhy->SetAntenna (PointerValue (antennaArray));
}
// registering STAs devices to 3GPP model
for (uint32_t i = 0; i < m_ueDev.GetN (); ++i)
{
Ptr<WifiNetDevice> netDevice = DynamicCast<WifiNetDevice> (m_ueDev.Get (i));
wifiSpectrumPhy = WifiSpectrumPhys.Get (0)->GetObject <SpectrumWifiPhy> ();
wifiSpectrumPhy->SetAntenna ( PointerValue (antennaArray));
}
}
gmake[2]: *** [contrib/nr-u/CMakeFiles/libnr-u-obj.dir/build.make:580: contrib/nr-u/CMakeFiles/libnr-u-obj.dir/model/wifi-setup.cc.o] Error 1
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/nr-single-bwp-setup.cc: In member function ‘virtual ns3::Ipv4InterfaceContainer ns3::NrSingleBwpSetup::AssignIpv4ToUe(const std::unique_ptr<ns3::Ipv4AddressHelper>&) const’:
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/nr-single-bwp-setup.cc:218:3: error: ‘NS_UNUSED’ was not declared in this scope
218 | NS_UNUSED (address);
| ^~~~~~~~~
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/nr-single-bwp-setup.cc: In member function ‘virtual ns3::Ipv4InterfaceContainer ns3::NrSingleBwpSetup::AssignIpv4ToStations(const std::unique_ptr<ns3::Ipv4AddressHelper>&) const’:
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/nr-single-bwp-setup.cc:259:3: error: ‘NS_UNUSED’ was not declared in this scope
259 | NS_UNUSED (address);
| ^~~~~~~~~
gmake[2]: *** [contrib/nr-u/CMakeFiles/libnr-u-obj.dir/build.make:482: contrib/nr-u/CMakeFiles/libnr-u-obj.dir/model/nr-single-bwp-setup.cc.o] Error 1
SQLmanager error:
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/sqlite-output-manager.cc: In constructor ‘ns3::SqliteOutputManager::SqliteOutputManager(const string&, const string&, double, uint32_t, uint32_t)’:
/home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/sqlite-output-manager.cc:28:5: error: no matching function for call to ‘ns3::SQLiteOutput::SQLiteOutput(const string&, const string&)’
28 | : m_dbOutput (dbName, dbLockName),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/sqlite-output-manager.h:25,
from /home/gfran/repos/ns-3-allinone/ns-3.36.1/contrib/nr-u/model/sqlite-output-manager.cc:19:
/home/gfran/repos/ns-3-allinone/ns-3.36.1/build/include/ns3/sqlite-output.h:52:3: note: candidate: ‘ns3::SQLiteOutput::SQLiteOutput(const string&)’
52 | SQLiteOutput (const std::string &name);
| ^~~~~~~~~~~~
/home/gfran/repos/ns-3-allinone/ns-3.36.1/build/include/ns3/sqlite-output.h:52:3: note: candidate expects 1 argument, 2 provided
gmake[2]: *** [contrib/nr-u/CMakeFiles/libnr-u-obj.dir/build.make:552: contrib/nr-u/CMakeFiles/libnr-u-obj.dir/model/sqlite-output-manager.cc.o] Error 1
If anyone could give me some advice on how to solve this would be great, thank you!
George