Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error: missing functions #1

Open
JacoTuks opened this issue Sep 30, 2021 · 4 comments
Open

Compile error: missing functions #1

JacoTuks opened this issue Sep 30, 2021 · 4 comments

Comments

@JacoTuks
Copy link

This module is really cool but I'm having an issue in getting it to compile:

../src/lorawan/model/capacitor-energy-source.cc: In member function ‘void ns3::CapacitorEnergySource::NotifyEnergyConstant()’:
../src/lorawan/model/capacitor-energy-source.cc:384:58: error: ‘class ns3::lorawan::LoraRadioEnergyModel’ has no member named ‘HandleEnergyConstant’
  384 |           loraradio->ns3::lorawan::LoraRadioEnergyModel::HandleEnergyConstant ();
      |                                                          ^~~~~~~~~~~~~~~~~~~~
../src/lorawan/model/capacitor-energy-source.cc: In member function ‘double ns3::CapacitorEnergySource::GetAveragePower(ns3::Time, double)’:
../src/lorawan/model/capacitor-energy-source.cc:614:31: error: ‘class ns3::VariableEnergyHarvester’ has no member named ‘GetAveragePower’
  614 |       avgPower = variableEH-> GetAveragePower (time, samples);

I had a look in the files, the functions don't seem to exist. What is the best way to fix this?

@MartCp
Copy link
Member

MartCp commented Oct 15, 2021

Hello Jaco, thank you for your feedback.
I have updated the files with a new commit. Please, let me know if everything is fine now.

@JacoTuks
Copy link
Author

Hi Martina,

I see you have changed it a bit, the repo went from 8 commits to 212! In the process, I think your intended readme got lost. The current one no longer talks about energy + links to your paper.

I'm guessing you would also want to remove the file ".#simple-network-example.cc" from examples.

I can run all 3 of the energy examples (thank you) but I can't run the non-energy examples without a segfault. A backtrace traced the problem back to EndDeviceLoraPhy::SetCheckForEnergyDepletion(). I believe you just need another if statement to see if !(nodeEnergySourceContainer == 0) as these sims don't have an EnergySourceContainer.

Regards,
Jaco

@MartCp
Copy link
Member

MartCp commented Oct 18, 2021

Hi Jaco,
I am still working on the code, and at the moment I have multiple versions of it, so the code is not stable by now.
I have created a new (temporary) branch called tmp-master with a more recent version of the code (many changes also include the EndDeviceLorawanMac class, and other). This is quite different from the previous, but also includes different solutions to some problems I met in these months, so it should be more reliable.
I'll probably release a new version in the next months, after I finish some works I am doing.

In the version in the tmp-master branch the examples are all compiling - I have tried to keep them similar to those of the previous version.
If you still have it, I'd be thankful if you could share the previous version of the readme, so I don't have to re-add things from scratch ;) and than the temporary branch tmp-master could become the new main one

@JacoTuks
Copy link
Author

Hi Martina,

No problem, here is a copy of the old one:

README.md

I will check out the updates, thanks for getting back to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants