Table of Contents

Struct PamojaEui

Namespace
Pamoja.Native.Interop
Assembly
Pamoja.Native.dll

An 8-byte device or gateway identifier carried inline inside a blittable struct.

public struct PamojaEui
Inherited Members

Remarks

LoRaWAN names a device and a gateway with an EUI, and the C ABI declares one as a fixed array inside a struct that crosses by value, so the managed mirror needs a type of exactly that width rather than a reference to bytes held elsewhere.

Fields

Length

The width of an identifier, in bytes.

public const int Length = 8

Field Value

int

Methods

From(ReadOnlySpan<byte>, string)

Reads an identifier from exactly 8 bytes.

public static PamojaEui From(ReadOnlySpan<byte> bytes, string name)

Parameters

bytes ReadOnlySpan<byte>

The identifier.

name string

What the bytes are, for the exception message.

Returns

PamojaEui

The identifier.

Exceptions

ArgumentException

bytes is not Length bytes.

ToArray()

Copies an identifier out as an array.

public readonly byte[] ToArray()

Returns

byte[]

The 8 bytes.