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

Abstract interface for registering asynchronous I/O notification. More...

#include <inotifier.hxx>

Inheritance diagram for dawn::IIONotifier:
[legend]

Classes

struct  SIONotifier
 Notifier registration structure. More...
 

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.
 
virtual int regNotifier (SIONotifier n)=0
 Register I/O notification callback.
 

Detailed Description

Abstract interface for registering asynchronous I/O notification.

Enables event-driven architecture where I/O data arrival triggers callback execution from a dedicated worker thread.

Definition at line 24 of file inotifier.hxx.

Member Typedef Documentation

◆ notifier_cb_t

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

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 
)
inlinevirtual

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()

virtual int dawn::IIONotifier::regNotifier ( SIONotifier  n)
pure virtual

Register I/O notification callback.

Implements IIONotifier interface.

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

Implemented in dawn::CIONotifier, dawn::CStreamNotifier, and dawn::CIOVirt.


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