Class LorawanFirmware
The firmware management package running on a device, TS006-1.0.0.
public sealed class LorawanFirmware : IDisposable
- Inheritance
-
LorawanFirmware
- Implements
- Inherited Members
Remarks
What the device is running, what upgrade image it holds and whether that image can be installed, and the single reboot it keeps, set either as a moment in time or as a countdown.
Constructors
LorawanFirmware(uint, uint)
Starts the package, reporting the versions the device was built with.
public LorawanFirmware(uint firmware, uint hardware)
Parameters
Properties
ImageStatus
What the device makes of the image it holds.
public LorawanImageStatus ImageStatus { get; }
Property Value
NextVersion
What the device would boot into, for an image it can install.
public uint? NextVersion { get; }
Property Value
- uint?
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Heard(ReadOnlySpan<byte>, uint?)
Reads a downlink on the firmware port and writes the answers it calls for.
public byte[] Heard(ReadOnlySpan<byte> payload, uint? nowS = null)
Parameters
payloadReadOnlySpan<byte>What arrived.
nowSuint?What the device believes the time is, in seconds since the GPS epoch. A device that does not know refuses a reboot set for a moment in time.
Returns
- byte[]
The answers to send back, which may be empty.
Exceptions
- PamojaException
The payload is not a firmware management command.
Reboot()
The one reboot the device keeps.
public LorawanReboot Reboot()
Returns
- LorawanReboot
When it reboots, and whether it was told to do so at once.
Rebooted()
Forgets the programmed reboot, for a device that has carried it out.
public void Rebooted()
SetImage(LorawanImageStatus, uint)
Says what firmware upgrade image the device is holding.
public void SetImage(LorawanImageStatus status, uint version = 0)
Parameters
statusLorawanImageStatusWhat the device makes of it.
versionuintWhat it would boot into, for an image it can install.