Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Public Types | Public Member Functions | List of all members
dawn::CStreamNotifier Class Reference

Stream-based I/O notifier with dedicated thread per I/O. More...

#include <stream_notifier.hxx>

Inheritance diagram for dawn::CStreamNotifier:
[legend]
Collaboration diagram for dawn::CStreamNotifier:
[legend]

Public Types

typedef int(* notifier_cb_t) (void *priv, io_ddata_t *data)
 Notifier callback function type.
 

Public Member Functions

virtual int notifyData (CIOCommon *io, io_ddata_t *data)
 Emit an immediate notification for already-available data.
 
int regNotifier (SIONotifier n)
 Register I/O notification callback.
 

Detailed Description

Stream-based I/O notifier with dedicated thread per I/O.

Provides a dedicated worker thread for a single I/O object, suitable for high-frequency data streaming where each I/O needs its own thread and priority level. Uses poll() on a single file descriptor with timeout for clean thread shutdown.

Unlike CIONotifier which multiplexes multiple I/Os per thread via poll(), CStreamNotifier assigns one thread per I/O for minimal contention and independent priority scheduling.

Definition at line 33 of file stream_notifier.hxx.

Member Typedef Documentation

◆ notifier_cb_t

typedef int(* dawn::IIONotifier::notifier_cb_t) (void *priv, io_ddata_t *data)
inherited

Notifier callback function type.

Callback signature for I/O notification events.

Parameters
privPrivate context pointer registered with callback.
dataDynamically allocated I/O data (io_ddata_t*).
Returns
Reserved for future use (currently unused).

Definition at line 37 of file inotifier.hxx.

Member Function Documentation

◆ notifyData()

virtual int dawn::IIONotifier::notifyData ( CIOCommon io,
io_ddata_t data 
)
inlinevirtualinherited

Emit an immediate notification for already-available data.

Poll-based notifiers still use regNotifier() for fd-driven updates; this hook covers synchronous writes where the payload is already available.

Parameters
ioI/O object that produced the data.
dataData payload to pass to callbacks.
Returns
OK on success, negative error code on failure.

Reimplemented in dawn::CIONotifier.

Definition at line 103 of file inotifier.hxx.

◆ regNotifier()

int CStreamNotifier::regNotifier ( SIONotifier  n)
virtual

Register I/O notification callback.

Implements IIONotifier interface.

Parameters
nSIONotifier structure containing callback configuration.
Returns
OK on success, negative error code on failure.

Implements dawn::IIONotifier.

Definition at line 124 of file stream_notifier.cxx.

References dawn::CIOCommon::ddata_alloc(), dawn::IIONotifier::SIONotifier::io, and dawn::CIOCommon::isNotify().

Here is the call graph for this function:

The documentation for this class was generated from the following files: