RTI Connext C# API
7.1.0
|
A SampleProcessor automatically takes the data from the attached readers and provides each data sample to a user-defined handler function. The SampleProcessor uses a configurable thread pool to wait for the data and call the handlers. More...
Inherits IDisposable.
Public Member Functions | |
SampleProcessor () | |
Creates a new SampleProcessor with default configuration. More... | |
SampleProcessor (AsyncWaitSetProperty property) | |
Creates a new SampleProcessor with the specified configuration. More... | |
void | AttachDataReader< T > (DataReader< T > reader, Action< LoanedSample< T >> handler) |
Adds a handler to be called for each data sample received by a DataReader<T> . More... | |
void | DetachDataReader (AnyDataReader reader) |
Detaches a reader. The SampleProcessor stops taking data from this reader. More... | |
void | Dispose () |
Releases the native resources used by this object. A finalizer is also provided, so it is not necessary to call Dispose. More... | |
A SampleProcessor automatically takes the data from the attached readers and provides each data sample to a user-defined handler function. The SampleProcessor uses a configurable thread pool to wait for the data and call the handlers.
Readers cannot be disposed while they're attached to a SampleProcessor.
SampleProcessor | ( | ) |
Creates a new SampleProcessor with default configuration.
SampleProcessor | ( | AsyncWaitSetProperty | property | ) |
Creates a new SampleProcessor with the specified configuration.
void AttachDataReader< T > | ( | DataReader< T > | reader, |
Action< LoanedSample< T >> | handler | ||
) |
Adds a handler to be called for each data sample received by a DataReader<T> .
reader | The reader to read from. Important: the reader must not be Disposed while attached. |
handler | A function that receives a LoanedSample<T>. Important: the sample is only valid inside the handler. It cannot be used after the handler returns. |
T | The reader's topic-type |
void DetachDataReader | ( | AnyDataReader | reader | ) |
Detaches a reader. The SampleProcessor stops taking data from this reader.
reader | The reader to detach. |
void Dispose | ( | ) |
Releases the native resources used by this object. A finalizer is also provided, so it is not necessary to call Dispose.