10#include "dawn/io/common.hxx"
11#include "dawn/io/timerfd.hxx"
12#include "dawn/porting/config.hxx"
31 IO_DUMMY_NOTIFY_CFG_FIRST = 0,
32 IO_DUMMY_NOTIFY_CFG_INITVAL = 1,
33 IO_DUMMY_NOTIFY_CFG_INTERVAL = 2,
34 IO_DUMMY_NOTIFY_CFG_DIM = 3,
35 IO_DUMMY_NOTIFY_CFG_NOTIFY_ON_WRITE = 4,
36 IO_DUMMY_NOTIFY_CFG_LAST = 31
46 , notifyOnWrite(
false)
50#ifdef CONFIG_DAWN_IO_TIMESTAMP
58#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
59 const char *getClassNameStr()
const override
61 return "dummy_notify";
73#ifdef CONFIG_DAWN_IO_NOTIFY
74 int getFd()
const override;
93#ifdef CONFIG_DAWN_IO_NOTIFY
105 using ObjectIdHelper =
130 IO_DUMMY_NOTIFY_CFG_INITVAL);
140 IO_DUMMY_NOTIFY_CFG_INTERVAL);
150 IO_DUMMY_NOTIFY_CFG_DIM);
160 IO_DUMMY_NOTIFY_CFG_NOTIFY_ON_WRITE);
164 const uint32_t *cfgval;
166 io_ddata_t *writeData;
173#ifdef CONFIG_DAWN_IO_TIMESTAMP
177 int configureDesc(
const CDescObject &desc);
178 int setVal(
const void *v,
size_t d);
Descriptor wrapper for individual object configuration.
Template helper for creating ObjectIDs for I/O types.
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Base class for all I/O objects.
virtual int getFd() const
Get file descriptor for notifications.
@ IO_CLASS_DUMMY_NOTIFY
Timer-driven dummy IO.
Timer-driven dummy I/O with notification support.
int init()
One-time initialize object after bindings are resolved.
bool isNotify() const
Check if IO supports notifications.
int deinit()
De-initialize object.
bool isWrite() const
Check if IO supports write operations.
int configure()
Configure object from descriptor data.
bool isBatch() const
Check if IO supports batch operations.
int doStart()
Start implementation hook.
size_t getDataSize() const
Get data size in bytes.
int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
bool isRead() const
Check if IO supports read operations.
int doStop()
Stop implementation hook.
size_t getDataDim() const
Get data vector dimension.
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Internal helper for timer-based I/O notifications.
size_t getDtypeSize() const
Get size of this object's data type.
static ObjectCfgId objectCfg(uint8_t type, uint16_t cls, uint8_t dtype, bool rw, uint16_t size, uint8_t id)
Construct 32-bit ConfigID from component fields.
uint32_t ObjectCfgId
ConfigID type - single 32-bit value.
static size_t ID_MAX
Configuration ID field constants and bit shift positions.
Out-of-tree user-extension hooks for Dawn.
Base interface for I/O data buffers (static and dynamic).
@ OBJTYPE_IO
Input/Output object type.
EObjectDataType
Data types supported by Dawn framework.
@ DTYPE_UINT64
Unsigned 64-bit integer.
@ DTYPE_DOUBLE
IEEE 754 double-precision floating point (64-bit).
@ DTYPE_INT64
Signed 64-bit integer.
@ DTYPE_UINT32
Unsigned 32-bit integer (0 to 4294967295).
uint32_t ObjectId
ObjectID type - single 32-bit value.