lr-wpan: (fixes #1130) Delay channel creation and add methods to set propagation loss and delay models in LrWpanHelper

- Delay channel creation by moving it to Install()
- Add SetPropagationDelayModel() and AddPropagationLossModel() methods to allow setting propagation loss and delay models in LrWpanHelper
- Update all examples that use LrWpanHelper to reflect these changes
This commit is contained in:
Alessio Bugetti
2024-09-11 01:12:02 +02:00
parent 0d9698b8be
commit 3d4b05bef0
10 changed files with 151 additions and 108 deletions

View File

@@ -74,6 +74,8 @@ main(int argc, char** argv)
NS_LOG_INFO("Create channels.");
LrWpanHelper lrWpanHelper;
lrWpanHelper.SetPropagationDelayModel("ns3::ConstantSpeedPropagationDelayModel");
lrWpanHelper.AddPropagationLossModel("ns3::LogDistancePropagationLossModel");
// Add and install the LrWpanNetDevice for each node
// lrWpanHelper.EnableLogComponents();
NetDeviceContainer devContainer = lrWpanHelper.Install(nodes);