Dawn Framework 1.0
Universal data acquisition framework for embedded systems
dummy.hxx
1// dawn/include/dawn/proto/nxscope/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/proto/nxscope/nxscope.hxx"
10
11namespace dawn
12{
20{
21public:
22 enum
23 {
24 PROTO_NXSCOPE_DUMMY_CFG_FIRST = 0,
27 PROTO_NXSCOPE_DUMMY_CFG_LAST = 31
28 };
29
30 explicit CProtoNxscopeDummy(CDescObject &desc)
31 : CProtoNxscope(desc)
32 {
33 }
34
35 ~CProtoNxscopeDummy() override;
36
37#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
38 const char *getClassNameStr() const override
39 {
40 return "nxscope";
41 }
42#endif
43
44 int initPriv() override;
45 int deinitPriv() override;
46 int startPriv() override;
47 int stopPriv() override;
48
49 constexpr static SObjectId::ObjectId objectId(uint16_t id)
50 {
54 0,
55 id);
56 }
57
58 constexpr static SObjectCfg::ObjectCfgId cfgId(bool rw, uint8_t dtype, uint8_t size, uint8_t id)
59 {
62 }
63
64 constexpr static SObjectCfg::ObjectCfgId cfgIdIOBind(uint16_t size)
65 {
66 return CProtoNxscopeDummy::cfgId(
68 }
69
70 constexpr static SObjectCfg::ObjectCfgId cfgIdIOBind2(uint16_t count)
71 {
72 return CProtoNxscopeDummy::cfgId(false,
74 (count * (sizeof(CProtoNxscope::SProtoNxscopeIOBind2) / 4)),
76 }
77
78private:
79 struct nxscope_dummy_cfg_s nxsDummyCfg;
80
81 int configureDesc(const CDescObject &desc);
82 int confgureNxscopePriv();
83};
84} // namespace dawn
Descriptor wrapper for individual object configuration.
@ PROTO_CLASS_NXSCOPE_DUMMY
NxScope real-time visualization (dummy interface).
Definition common.hxx:39
NXScope no-op/dummy transport implementation.
Definition dummy.hxx:20
@ PROTO_NXSCOPE_DUMMY_CFG_IOBIND2
I/O bindings with names.
Definition dummy.hxx:26
@ PROTO_NXSCOPE_DUMMY_CFG_IOBIND
I/O bindings.
Definition dummy.hxx:25
Real-time data visualization protocol (base class).
Definition nxscope.hxx:37
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_PROTO
Protocol object type.
Definition objectid.hxx:193
@ 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