10#include "dawn/common/object.hxx"
11#include "dawn/io/common.hxx"
12#include "dawn/porting/config.hxx"
23 IO_CONTROL_CFG_FIRST = 0,
24 IO_CONTROL_CFG_ALLOCOBJ = 1,
25 IO_CONTROL_CFG_ALLOWED = 2,
26 IO_CONTROL_CFG_LAST = 31
41 ~CIOControl()
override;
43#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
44 const char *getClassNameStr()
const override
52 int getDataImpl(IODataCmn &data,
size_t len)
override;
79 std::vector<SObjectId::ObjectId>
ids;
90 return CIOControl::cfgId(
false,
static_cast<uint8_t
>(n), IO_CONTROL_CFG_ALLOCOBJ);
95 return CIOControl::cfgId(
false, 1, IO_CONTROL_CFG_ALLOWED);
105 std::vector<CObject *> targets;
108 int configureDesc(
const CDescObject &desc);
Descriptor wrapper for individual object configuration.
Template helper for creating ObjectIDs for I/O types without timestamp support.
static SObjectId::ObjectId create(uint16_t inst)
Create ObjectID with fixed data type and no timestamp.
Base class for all I/O objects.
@ IO_CLASS_CONTROL
Control I/O.
Control I/O for lifecycle management of bound objects.
size_t getDataDim() const
Get data vector dimension.
bool isBatch() const
Check if IO supports batch operations.
int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
bool isWrite() const
Check if IO supports write operations.
int configure()
Configure object from descriptor data.
@ CTRL_ALLOW_STOP
Allow stop command.
@ CTRL_ALLOW_START
Allow start command.
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
bool isRead() const
Check if IO supports read operations.
std::vector< SObjectId::ObjectId > ids
Object IDs to resolve; populated during configure().
bool isNotify() const
Check if IO supports notifications.
size_t getDataSize() const
Get data size in bytes.
int deinit()
De-initialize object.
Base class for all Dawn objects (IOs, Programs, Protocols).
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.
Out-of-tree user-extension hooks for Dawn.
@ OBJTYPE_IO
Input/Output object type.
@ DTYPE_UINT8
Unsigned 8-bit integer (0 to 255).
uint32_t ObjectId
ObjectID type - single 32-bit value.