Interface IOutputSegment
- Namespace
- Iot.Device.Multiplexing
- Assembly
- Iot.Device.Multiplexing.dll
Abstracts a segment of outputs from multiplexing sources (like a shift register).
public interface IOutputSegment
Properties
this[int]
Segment values.
PinValue this[int index] { get; set; }
Parameters
indexint
Property Value
Length
Length of segment (number of outputs)
int Length { get; }
Property Value
Methods
Display(CancellationToken)
Displays current state of segment. Segment is displayed at least until token receives a cancellation signal, possibly due to a specified duration expiring.
void Display(CancellationToken token)
Parameters
tokenCancellationToken
TurnOffAll()
Turns off all outputs.
void TurnOffAll()
Write(byte)
Writes discrete underlying bits to a virtual segment. Writes each bit, left to right. Least significant bit will written to index 0. Does not display output.
void Write(byte value)
Parameters
valuebyte
Write(int, PinValue)
Writes a PinValue to a virtual segment. Does not display output until calling Display() or Display(CancellationToken ct) methods.
void Write(int index, PinValue value)
Parameters
Write(SpanByte)
Writes discrete underlying bits to a virtual output. Writes each byte, left to right. Least significant bit will written to index 0. Does not display output.
void Write(SpanByte value)
Parameters
valueSpanByte