Table of Contents

Struct LorawanBattery

Namespace
Pamoja.Lorawan
Assembly
Pamoja.Lorawan.dll

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

Code byte

The byte DevStatusAns carries: 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

byte

External

Running from an external supply.

public static LorawanBattery External { get; }

Property Value

LorawanBattery

Unknown

The device cannot measure it.

public static LorawanBattery Unknown { get; }

Property Value

LorawanBattery

Methods

Level(byte)

A level from 1, empty, to 254, full.

public static LorawanBattery Level(byte level)

Parameters

level byte

The level, clamped into that range.

Returns

LorawanBattery

The battery.