public ValueTask <uint> NextFcntDown(LoRaDevice loRaDevice, uint messageFcnt) { if (loRaDevice is null) { throw new ArgumentNullException(nameof(loRaDevice)); } return(new ValueTask <uint>(loRaDevice.IncrementFcntDown(1))); }
// Initializes a device instance created // For ABP increment down count by 10 to take into consideration failed save attempts void ILoRaDeviceInitializer.Initialize(LoRaDevice loRaDevice) { // In order to handle a scenario where the network server is restarted and the fcntDown was not yet saved (we save every 10) if (loRaDevice.IsABP) { loRaDevice.IncrementFcntDown(10); } }
// Initializes a device instance created // For ABP increment down count by 10 to take into consideration failed save attempts void ILoRaDeviceInitializer.Initialize(LoRaDevice loRaDevice) { // In order to handle a scenario where the network server is restarted and the fcntDown was not yet saved (we save every 10) if (loRaDevice.IsABP) { // Increment so that the next frame count down causes the count to be saved loRaDevice.IncrementFcntDown(Constants.MAX_FCNT_UNSAVED_DELTA - 1); } }
public ValueTask <uint> NextFcntDown(LoRaDevice loRaDevice, uint messageFcnt) { return(new ValueTask <uint>(loRaDevice.IncrementFcntDown(1))); }