Class SerialStep
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
Written
Whether the program is expected to write the bytes, rather than read them.
public bool Written { get; }
Property Value
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
bytesReadOnlySpan<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
bytesReadOnlySpan<byte>The bytes of the write.
Returns
- SerialStep
The step.