Table of Contents

Class SerialStep

Namespace
Pamoja.Hal
Assembly
Pamoja.Hal.dll

One step of a scripted port: Write(ReadOnlySpan<byte>) for a write the program is expected to make, and Read(ReadOnlySpan<byte>) for bytes the far end sends.

public sealed class SerialStep
Inheritance
SerialStep
Inherited Members

Properties

Bytes

The bytes of the step.

public IReadOnlyList<byte> Bytes { get; }

Property Value

IReadOnlyList<byte>

Written

Whether the program is expected to write the bytes, rather than read them.

public bool Written { get; }

Property Value

bool

Methods

Read(ReadOnlySpan<byte>)

Bytes the far end sends, readable once every step before them has happened.

public static SerialStep Read(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

What arrives.

Returns

SerialStep

The step.

Write(ReadOnlySpan<byte>)

A write the program is expected to make, in one call.

public static SerialStep Write(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

The bytes of the write.

Returns

SerialStep

The step.