10#include "dawn/io/virt.hxx"
11#include "dawn/porting/config.hxx"
12#include "dawn/prog/common.hxx"
34 PROG_GATEWAY_CFG_FIRST = 0,
35 PROG_GATEWAY_CFG_IOBIND = 1,
36 PROG_GATEWAY_CFG_LAST = 31
68#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
69 const char *getClassNameStr()
const override
95 return CProgGateway::cfgId(
false, size, PROG_GATEWAY_CFG_IOBIND);
101 SProgGatewayIOBind cfg;
107 std::vector<SGatewayBind *> binds;
109 int configureDesc(
const CDescObject &desc);
110 int allocObject(
const SProgGatewayIOBind *cfg);
112 static void io1SetCb(CIOVirt *io,
void *priv);
113 static void io2SetCb(CIOVirt *io,
void *priv);
114 static void io1GetCb(CIOVirt *io,
void *priv);
115 static void io2GetCb(CIOVirt *io,
void *priv);
Descriptor wrapper for individual object configuration.
Base class for all PROG (processing) objects.
@ PROG_CLASS_GATEWAY
Protocol-to-protocol IO gateway.
Protocol-to-protocol IO gateway Program.
int init()
One-time initialize object after bindings are resolved.
int configure()
Configure object from descriptor data.
int deinit()
De-initialize object.
@ FLAG_IO1_WRITE
io1 set callback: propagates to io2.
@ FLAG_IO2_WRITE
io2 set callback: propagates to io1.
@ FLAG_IO2_READ
io2 get callback: fetches from io1.
@ FLAG_IO1_READ
io1 get callback: fetches from io2.
int doStart()
Start implementation hook.
int doStop()
Stop implementation hook.
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.
Descriptor payload for one binding (4 uint32_t words).
SObjectId::UObjectId io1
First Virtual IO object ID.
SObjectId::UObjectId io2
Second Virtual IO object ID.
uint32_t flags
EProgGatewayFlags bitmask.
uint32_t dim
VirtIO data dimension (number of elements).
@ 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.
32-bit encoded object identifier (union with bit field).