Table of Contents

Struct LorawanHeader

Namespace
Pamoja.Lorawan
Assembly
Pamoja.Lorawan.dll

What a frame says about itself before any key is involved.

public readonly record struct LorawanHeader : IEquatable<LorawanHeader>
Implements
Inherited Members

Remarks

Nothing here is authenticated, since checking the MIC needs the session key. Treat it as a routing hint until Decode(ReadOnlySpan<byte>, uint) has verified the frame.

Constructors

LorawanHeader(LorawanMessageType, bool, uint?, ushort?, byte?, bool, bool, bool, bool, int, int)

What a frame says about itself before any key is involved.

public LorawanHeader(LorawanMessageType MessageType, bool IsData, uint? DevAddr, ushort? Fcnt, byte? Fport, bool Confirmed, bool Adr, bool Ack, bool FPending, int FoptsLength, int PayloadLength)

Parameters

MessageType LorawanMessageType

What kind of message the frame is.

IsData bool

Whether this is a data frame rather than a join frame.

DevAddr uint?

The device address, or null for a join frame.

Fcnt ushort?

The low 16 bits of the counter, or null for a join frame.

Fport byte?

The port, or null when the frame carries only options.

Confirmed bool

Whether the frame asks to be acknowledged.

Adr bool

Whether the frame takes part in adaptive data rate.

Ack bool

Whether the frame acknowledges the last confirmed one.

FPending bool

Whether the network has more downlink data waiting.

FoptsLength int

How many bytes of frame options the header carries.

PayloadLength int

The length of the still-encrypted payload.

Remarks

Nothing here is authenticated, since checking the MIC needs the session key. Treat it as a routing hint until Decode(ReadOnlySpan<byte>, uint) has verified the frame.

Properties

Ack

Whether the frame acknowledges the last confirmed one.

public bool Ack { get; init; }

Property Value

bool

Adr

Whether the frame takes part in adaptive data rate.

public bool Adr { get; init; }

Property Value

bool

Confirmed

Whether the frame asks to be acknowledged.

public bool Confirmed { get; init; }

Property Value

bool

DevAddr

The device address, or null for a join frame.

public uint? DevAddr { get; init; }

Property Value

uint?

FPending

Whether the network has more downlink data waiting.

public bool FPending { get; init; }

Property Value

bool

Fcnt

The low 16 bits of the counter, or null for a join frame.

public ushort? Fcnt { get; init; }

Property Value

ushort?

FoptsLength

How many bytes of frame options the header carries.

public int FoptsLength { get; init; }

Property Value

int

Fport

The port, or null when the frame carries only options.

public byte? Fport { get; init; }

Property Value

byte?

IsData

Whether this is a data frame rather than a join frame.

public bool IsData { get; init; }

Property Value

bool

MessageType

What kind of message the frame is.

public LorawanMessageType MessageType { get; init; }

Property Value

LorawanMessageType

PayloadLength

The length of the still-encrypted payload.

public int PayloadLength { get; init; }

Property Value

int