Struct LorawanHeader
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
MessageTypeLorawanMessageTypeWhat kind of message the frame is.
IsDataboolWhether this is a data frame rather than a join frame.
DevAddruint?The device address, or
nullfor a join frame.Fcntushort?The low 16 bits of the counter, or
nullfor a join frame.Fportbyte?The port, or
nullwhen the frame carries only options.ConfirmedboolWhether the frame asks to be acknowledged.
AdrboolWhether the frame takes part in adaptive data rate.
AckboolWhether the frame acknowledges the last confirmed one.
FPendingboolWhether the network has more downlink data waiting.
FoptsLengthintHow many bytes of frame options the header carries.
PayloadLengthintThe 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
Adr
Whether the frame takes part in adaptive data rate.
public bool Adr { get; init; }
Property Value
Confirmed
Whether the frame asks to be acknowledged.
public bool Confirmed { get; init; }
Property Value
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
Fcnt
The low 16 bits of the counter, or null for a join frame.
public ushort? Fcnt { get; init; }
Property Value
FoptsLength
How many bytes of frame options the header carries.
public int FoptsLength { get; init; }
Property Value
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
MessageType
What kind of message the frame is.
public LorawanMessageType MessageType { get; init; }
Property Value
PayloadLength
The length of the still-encrypted payload.
public int PayloadLength { get; init; }