Table of Contents

Struct PamojaJ1939Signals

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

The eight data bytes of a J1939 frame, carried inline by value.

public struct PamojaJ1939Signals
Inherited Members

Remarks

The C ABI declares a payload 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 a J1939 payload, in bytes.

public const int Length = 8

Field Value

int

Methods

From(ReadOnlySpan<byte>, string)

Reads a payload from exactly eight bytes.

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

Parameters

bytes ReadOnlySpan<byte>

The frame's payload.

name string

What the bytes are, for the exception message.

Returns

PamojaJ1939Signals

The payload.

Exceptions

ArgumentException

bytes is not Length bytes.

ToArray()

Copies the payload out as an array.

public readonly byte[] ToArray()

Returns

byte[]

The eight bytes, in wire order.