Class SerialRead
Represents an operator that reads a sequence of bytes from a serial port.
public class SerialRead : Source<byte[]>
- Inheritance
-
SerialRead
- Inherited Members
Properties
Count
Gets or sets the maximum number of bytes to read. Fewer bytes may be read if there are not enough bytes in the input buffer before the read timeout.
public int Count { get; set; }
Property Value
PortName
Gets or sets the name of the serial port.
[TypeConverter(typeof(PortNameConverter))]
public string PortName { get; set; }
Property Value
Methods
Generate()
Reads a single buffer of bytes from a serial port and surfaces the result through an observable sequence.
public override IObservable<byte[]> Generate()
Returns
- IObservable<byte[]>
A sequence containing a single array of 8-bit unsigned integers representing the binary data read from the serial port.
Generate<TSource>(IObservable<TSource>)
Reads a sequence of bytes from a serial port, where each new buffer is read only when an observable sequence emits a notification.
public IObservable<byte[]> Generate<TSource>(IObservable<TSource> source)
Parameters
source
IObservable<TSource>The sequence containing the notifications used for reading new buffers from the serial port.
Returns
- IObservable<byte[]>
A sequence of 8-bit unsigned integer arrays representing the binary data read from the serial port for each corresponding notification.
Type Parameters
TSource
The type of the elements in the
source
sequence.