Table of Contents

Class LorawanBlockMic

Namespace
Pamoja.Lorawan
Assembly
Pamoja.Lorawan.dll

The code taken over a data block as it arrives, TS004-2.0.0 section 3.3.

public sealed class LorawanBlockMic : IDisposable
Inheritance
LorawanBlockMic
Implements
Inherited Members

Constructors

LorawanBlockMic(ReadOnlySpan<byte>, ushort, byte, ReadOnlySpan<byte>, uint)

Starts a code over one session's block.

public LorawanBlockMic(ReadOnlySpan<byte> dataBlockIntKey, ushort sessionCnt, byte fragIndex, ReadOnlySpan<byte> descriptor, uint blockLen)

Parameters

dataBlockIntKey ReadOnlySpan<byte>

What DataBlockIntKey(ReadOnlySpan<byte>) derived.

sessionCnt ushort

The session counter the setup carried.

fragIndex byte

Which session.

descriptor ReadOnlySpan<byte>

The four bytes the server described the block with.

blockLen uint

The block's length in bytes, padding excluded.

Exceptions

ArgumentException

The key or the descriptor was the wrong length.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Finish()

Finishes the code, returning the four bytes a session setup carries.

public byte[] Finish()

Returns

byte[]

The code.

Exceptions

PamojaException

The code was already finished.

Update(ReadOnlySpan<byte>)

Adds a piece of the block, in order, without any padding.

public void Update(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The piece.

Exceptions

PamojaException

The code was already finished.