signetlabdei / lorawan

An ns-3 module for simulation of LoRaWAN networks
GNU General Public License v2.0
182 stars 130 forks source link

lorawan: Ongoing changes to the module #139

Open non-det-alle opened 10 months ago

non-det-alle commented 10 months ago

The lorawan module is going through a series of changes.

The present issue is raised to document and list future changes and changes done so far. The list is meant to break up a previous huge PR (#135) into more digestible pieces.

Feel free to open a discussion below on any of the proposed changes.

Table of contents:

Fixes and Changes

Code maintenance:

TODO:

Examples:

Helpers:

TODO:

MAC layer:

TODO:

[^1]: The busy state prevents the MAC layer from sending a new packet in-between a previous Tx and its reception windows. Effectively, the 'context' structure acts as a size-1 buffer in case the APP layer requests a new Tx while the Tx context is already busy (Tx + recv windows), or if we need to wait due to duty-cycle limitations or to re-transmit a same packet. The context is overwritable: a NEW Tx requested by the APP layer will take the place of re-transmissions scheduled for a previous packet (if any) or a packet Tx postponed by the duty-cycle (basically, only the packet will change because the MAC layer will still need to wait). This maintains the behaviour implemented before, but re-implements it in a tidier way. PS_1: another option would be to discard any new Tx requests by the APP layer if the MAC layer is not done with the current context. PS_2: technically, the APP layer should have the responsability to check with the MAC layer how much time remains to wait for a new Tx, and thus manage an eventual frame buffering (and maybe, in case of duty-cycle limitations, also having the option of sending anyway, increasing time-to-wait of future Txs). In addition, we probably shouldn't overwrite scheduled re-Txs, but just tell the APP layer that the MAC is still busy until the re-Tx process is complete. Unfortunately, this complicates implementing applications because there is no standard behaviour for this defined in the specs.

PHY layer:

TODO:

Other:

Additions:

TODO: