Table of Contents

Struct PamojaId

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

A 16-byte identifier carried inline inside a blittable struct.

public struct PamojaId
Inherited Members

Remarks

The C ABI declares vendor and device-class identifiers as fixed arrays 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 = 16

Field Value

int

Methods

From(ReadOnlySpan<byte>, string)

Reads an identifier from exactly 16 bytes.

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

Parameters

bytes ReadOnlySpan<byte>

The identifier.

name string

What the bytes are, for the exception message.

Returns

PamojaId

The identifier.

Exceptions

ArgumentException

bytes is not Length bytes.

ToArray()

Copies an identifier out as an array.

public readonly byte[] ToArray()

Returns

byte[]

The 16 bytes.