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

I/O notification handler with poll-based event delivery. More...

#include <notifier.hxx>

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

Public Types

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

Public Member Functions

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

I/O notification handler with poll-based event delivery.

Implements asynchronous I/O notification using POSIX poll() system call.

Definition at line 30 of file 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()

int CIONotifier::notifyData ( CIOCommon io,
io_ddata_t data 
)
virtual

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 from dawn::IIONotifier.

Definition at line 306 of file notifier.cxx.

◆ regNotifier()

int CIONotifier::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 232 of file notifier.cxx.

References dawn::CIOCommon::ddata_alloc(), dawn::CObject::getIdV(), 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: