Dawn Framework 1.0
Universal data acquisition framework for embedded systems
dummy.hxx
1// dawn/include/dawn/prog/dummy.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include "dawn/porting/config.hxx"
9#include "dawn/prog/common.hxx"
10
11namespace dawn
12{
20class CProgDummy : public CProgCommon
21{
22public:
23 enum
24 {
25 PROG_DUMMY_CFG_FIRST = 0,
27 PROG_DUMMY_CFG_LAST = 31
28 };
29
30 explicit CProgDummy(CDescObject &desc)
31 : CProgCommon(desc)
32 {
33 }
34
35#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
36 const char *getClassNameStr() const override
37 {
38 return "prog_dummy";
39 }
40#endif
41
42 constexpr static SObjectId::ObjectId objectId(uint16_t inst)
43 {
46 }
47
48 constexpr static SObjectCfg::ObjectCfgId cfgId(bool rw, uint8_t size, uint8_t id)
49 {
52 }
53
54 constexpr static SObjectCfg::ObjectCfgId cfgIdIOBind(uint16_t size = 0)
55 {
56 return CProgDummy::cfgId(false, size, PROG_DUMMY_CFG_IOBIND);
57 }
58
59 int configure() override;
60};
61} // Namespace dawn
Descriptor wrapper for individual object configuration.
Base class for all PROG (processing) objects.
Definition common.hxx:27
@ PROG_CLASS_DUMMY
Dummy program (test/helper).
Definition common.hxx:67
Dummy Program for tests and descriptor binding placeholders.
Definition dummy.hxx:21
@ PROG_DUMMY_CFG_IOBIND
I/O binding configuration.
Definition dummy.hxx:26
int configure()
Configure object from descriptor data.
Definition dummy.cxx:12
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.
Definition objectcfg.hxx:60
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13
@ OBJTYPE_PROG
Program/algorithm object type.
Definition objectid.hxx:202
@ DTYPE_ANY
Wildcard data type (matches any actual type).
Definition objectid.hxx:68
uint32_t ObjectId
ObjectID type - single 32-bit value.
Definition objectid.hxx:44
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.
Definition objectid.hxx:290