SqliteOutputManager (code problem) and NS_UNUSED

64 views
Skip to first unread message

George

unread,
Aug 25, 2022, 8:13:11 AM8/25/22
to ns-3-users
Hello,

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));

}
}

I am not sure if the wifi-setup.cc issue is fixed this way, I am new to c++ programming and ns-3 so I just follow other examples that work)
Now I still have the following errors regarding SQLmanager and NS_UNUSED:
NS_UNUSED error:  
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

George

unread,
Aug 25, 2022, 8:33:27 AM8/25/22
to ns-3-users
Ok, I am not sure anymore if the NR-U module is usable at the moment because more and more errors from codes appear every time I fix the previous errors. Is anyone currently using the NR-U module?

George

unread,
Aug 25, 2022, 9:58:10 AM8/25/22
to ns-3-users

Most of the errors come now from libns3.36.1-nr-u-default.so, with a set of undefined references such as: undefined reference to `ns3::WifiTxVector::~WifiTxVector()'
Reply all
Reply to author
Forward
0 new messages