Table of Contents

Class SerialWrite

Namespace
Bonsai.IO.Ports
Assembly
Bonsai.System.dll

Represents an operator that writes a sequence of bytes to a serial port.

public class SerialWrite : Sink<byte[]>
Inheritance
SerialWrite
Inherited Members

Properties

PortName

Gets or sets the name of the serial port.

[TypeConverter(typeof(PortNameConverter))]
public string PortName { get; set; }

Property Value

string

Methods

Process(IObservable<ArraySegment<byte>>)

Writes an observable sequence of byte array segments to a serial port.

public IObservable<ArraySegment<byte>> Process(IObservable<ArraySegment<byte>> source)

Parameters

source IObservable<ArraySegment<byte>>

A sequence of 8-bit unsigned integer array segments representing the binary data to write to the serial port.

Returns

IObservable<ArraySegment<byte>>

An observable sequence that is identical to the source sequence but where there is an additional side effect of writing the binary data in each array segment to the serial port.

Process(IObservable<byte[]>)

Writes an observable sequence of bytes to a serial port.

public override IObservable<byte[]> Process(IObservable<byte[]> source)

Parameters

source IObservable<byte[]>

A sequence of 8-bit unsigned integer arrays representing the binary data to write to the serial port.

Returns

IObservable<byte[]>

An observable sequence that is identical to the source sequence but where there is an additional side effect of writing the binary data to the serial port.