10#include "dawn/common/thread.hxx"
11#include "dawn/porting/config.hxx"
12#include "dawn/prog/common.hxx"
31 constexpr static uint32_t INTERVAL_DEFAULT = CONFIG_DAWN_PROG_SAMPLING_INTERVAL;
35 PROG_SAMPLING_CFG_FIRST = 0,
38 PROG_SAMPLING_CFG_LAST = 31
43 , interval(INTERVAL_DEFAULT)
47 ~CProgSampling()
override;
49#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
50 const char *getClassNameStr()
const override
95 class CIOCommon *target;
99 std::vector<SSamplingBind *> binds;
101 CThreadedObject threadCtl;
103 int configureDesc(
const CDescObject &desc);
Descriptor wrapper for individual object configuration.
Base class for all PROG (processing) objects.
@ PROG_CLASS_SAMPLING
Periodic data sampler.
Periodic data sampling and buffering Program.
int doStart()
Start implementation hook.
bool hasThread() const
Check if a background thread is active.
int configure()
Configure object from descriptor data.
int init()
One-time initialize object after bindings are resolved.
int doStop()
Stop implementation hook.
int deinit()
De-initialize object.
@ PROG_SAMPLING_CFG_INTERVAL
Sampling interval (microseconds).
@ PROG_SAMPLING_CFG_IOBIND
I/O binding configuration.
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.