12#include "dawn/io/ddata.hxx"
13#include "dawn/porting/config.hxx"
14#include "dawn/prog/common.hxx"
35 PROG_SELECTOR_CFG_FIRST = 0,
36 PROG_SELECTOR_CFG_CONTROL = 1,
37 PROG_SELECTOR_CFG_DATA = 2,
38 PROG_SELECTOR_CFG_TARGET = 3,
39 PROG_SELECTOR_CFG_LAST = 31
46#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
47 const char *getClassNameStr()
const override
69 CProgCommon::PROG_CLASS_SELECTOR,
78 return CProgSelector::cfgId(
false, 1, PROG_SELECTOR_CFG_CONTROL);
83 return CProgSelector::cfgId(
false, size, PROG_SELECTOR_CFG_DATA);
88 return CProgSelector::cfgId(
false, 1, PROG_SELECTOR_CFG_TARGET);
93 return CProgSelector::cfgId(
false, 0, 0);
104 std::vector<CIOCommon *> dataIos;
105 std::vector<SDataBind> dataBinds;
106 std::vector<SObjectId::ObjectId> dataIds;
111 uint32_t currentIndex;
115 static int ctrlNotifierCb(
void *priv,
io_ddata_t *data);
116 static int dataNotifierCb(
void *priv,
io_ddata_t *data);
119 void applyRoute(uint32_t index);
Descriptor wrapper for individual object configuration.
Base class for all I/O objects.
Base class for all PROG (processing) objects.
Data selector: routes one of N data inputs to a target IO based on the value of a control input.
int init()
One-time initialize object after bindings are resolved.
int configure()
Configure object from descriptor data.
int deinit()
De-initialize object.
int doStop()
Stop implementation hook.
int doStart()
Start implementation hook.
bool hasThread() const
Check if a background thread is active.
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_PROG
Program/algorithm object type.
@ DTYPE_ANY
Wildcard data type (matches any actual type).
uint32_t ObjectId
ObjectID type - single 32-bit value.
static ObjectId objectId(uint8_t type, uint16_t cls, uint8_t dtype, uint8_t flags, uint16_t priv)
Construct 32-bit ObjectID from component fields.
Heap-allocated dynamic I/O data buffer.