Struct LorawanBattery
How a device reports its battery when a network asks.
public readonly record struct LorawanBattery : IEquatable<LorawanBattery>
- Implements
- Inherited Members
Constructors
LorawanBattery(byte)
How a device reports its battery when a network asks.
public LorawanBattery(byte Code)
Parameters
CodebyteThe byte
DevStatusAnscarries: 0 external, 1 to 254 a level, 255 unknown.
Properties
Code
The byte DevStatusAns carries: 0 external, 1 to 254 a level, 255 unknown.
public byte Code { get; init; }
Property Value
External
Running from an external supply.
public static LorawanBattery External { get; }
Property Value
Unknown
The device cannot measure it.
public static LorawanBattery Unknown { get; }
Property Value
Methods
Level(byte)
A level from 1, empty, to 254, full.
public static LorawanBattery Level(byte level)
Parameters
levelbyteThe level, clamped into that range.
Returns
- LorawanBattery
The battery.