lorawan icon indicating copy to clipboard operation
lorawan copied to clipboard

Expose p2p connection of gateways and server (#150)

Open non-det-alle opened this issue 4 months ago • 1 comments

This pull request is meant to fix the problem brought up in issue #150

NetworkServerHelper::Install used to implicitly create a point-to-point connection between gateways and the network server. Specifically, this function would install a PointToPointNetDevice on gateways, then required by the ForwarderHelper application installer on gateways. Thus, if ForwarderHelper::Install was called before NetworkServerHelper::Install in a custom simulation, it would generate a zero pointer runtime error with a non-descriptive message. This can be especially difficult to debug for a new user (happened to me as well in the past).

Given that NetDevice installation is usually meant to happen in the main ns-3 simulation file, I propose to move it there. The idea is to make it explicit such that new users avoid committing the error described above. I also added clearer error messages via assertions requiring a PointToPointNetDevice to be present when calling ForwarderHelper::Install. Currently, the module only supports a p2p connection, later on we could extend this to support any type of connection between gateways and the network server.

non-det-alle avatar Feb 12 '24 18:02 non-det-alle