Dawn Framework 1.0
Universal data acquisition framework for embedded systems
common.hxx
1// dawn/include/dawn/io/common.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include <cstdlib>
9
10#include "dawn/common/object.hxx"
11#include "dawn/debug.hxx"
12#include "dawn/io/ddata.hxx"
13#include "dawn/io/inotifier.hxx"
14#include "dawn/io/limits.hxx"
15#include "dawn/porting/config.hxx"
16
17namespace dawn
18{
26class CIOCommon : public CObject
27{
28public:
29#ifdef CONFIG_DAWN_IO_HAS_STATS
36 struct SIOStats
37 {
38 uint32_t read_count;
39 uint32_t write_count;
40 uint32_t error_count;
41 } typedef IOStats;
42
49 const IOStats &getStats() const
50 {
51 return stats;
52 }
53
58 void resetStats()
59 {
60 stats.read_count = 0;
61 stats.write_count = 0;
62 stats.error_count = 0;
63 }
64#endif // CONFIG_DAWN_IO_HAS_STATS
65
73 enum
74 {
76 IO_FLAGS_TS = (1 << 0),
77
80 } typedef EIOFlags;
81
84 enum
85 {
87
88 // Special purpose IOs
89
96
97 // Dummy
98
100
101 // Number generators
102
106
107 // File I/O
108
110
111 // Sensors
112
128
129 // Sensor producers
130
146
147 // GNSS sensor (uORB sensor_gnss). Read-only, so it has no producer
148 // counterpart and lives outside the aligned sensor/producer ranges above.
149
154
155 // there is 59 sensor types in Nuttx now, most likely it grows later
156 // we still have many free slots, but in the future, it there are no free IO slots
157 // we can thing about combining sensor and sensor producer
158
159 // System information
160
169
170 // Slots 52-59 reserved for future system classes (serial number,
171 // firmware version, firmware update, etc.).
172
173 // GPIO
174
180
181 // PWM / pulse output
182
185
186 // ADC/DAC
187
192
193 // Ecnoder input
194
197
198 // Battery (fuel gauge)
199
203
204 // Cellular modem
205
207
208 // Virtual IO
209
211
212 // User defined
213
216
218 } typedef EIOClass;
219
220 static_assert(IO_CLASS_LAST - 1 <= SObjectId::CLS_MAX);
221
230 enum
231 {
238 IO_CFG_LAST = 31
239 };
240
243 enum
244 {
247 } typedef EIONotifyType;
248
256 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
258 {
259 public:
268 constexpr static SObjectId::ObjectId create(bool ts, uint16_t inst)
269 {
270 uint8_t flags = 0;
271
272#ifdef CONFIG_DAWN_IO_TIMESTAMP
273 if (ts)
274 {
275 flags |= CIOCommon::IO_FLAGS_TS;
276 }
277#else
278 DAWNASSERT(ts == false, "ts not supported");
279#endif
280
281 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, DEFAULT_DTYPE, flags, inst);
282 }
283
294 bool ts,
295 uint16_t inst)
296 {
297 uint8_t flags = 0;
298
299#ifdef CONFIG_DAWN_IO_TIMESTAMP
300 if (ts)
301 {
302 flags |= CIOCommon::IO_FLAGS_TS;
303 }
304#else
305 DAWNASSERT(ts == false, "ts not supported");
306#endif
307
308 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, dtype, flags, inst);
309 }
310 };
311
323 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
325 {
326 public:
334 constexpr static SObjectId::ObjectId create(uint16_t inst)
335 {
337 }
338
347 constexpr static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
348 {
349 return IOObjectIdHelper<CLASS_ID, DEFAULT_DTYPE>::create(dtype, false, inst);
350 }
351 };
352
359 explicit CIOCommon(CDescObject &desc);
360
375 int getData(IODataCmn &data, size_t len, size_t offset = 0)
376 {
377 int ret;
378
379#ifdef CONFIG_DAWN_IO_SEEKABLE
380 ret = isSeekable() ? getDataAtImpl(data, len, offset)
381 : (offset == 0 ? getDataImpl(data, len) : -ENOTSUP);
382#else
383 ret = (offset == 0) ? getDataImpl(data, len) : -ENOTSUP;
384#endif
385#ifdef CONFIG_DAWN_IO_HAS_STATS
386 if (ret == OK)
387 {
388 if (offset == 0)
389 {
390 stats.read_count++;
391 }
392 }
393 else if (ret != -ENOTSUP)
394 {
395 stats.error_count++;
396 }
397#endif
398 return ret;
399 }
400
414 int setData(IODataCmn &data, size_t offset = 0)
415 {
416 int ret;
417
418#ifdef CONFIG_DAWN_IO_SEEKABLE
419 ret = isSeekable() ? setDataAtImpl(data, offset) : (offset == 0 ? setDataImpl(data) : -ENOTSUP);
420#else
421 ret = (offset == 0) ? setDataImpl(data) : -ENOTSUP;
422#endif
423#ifdef CONFIG_DAWN_IO_HAS_STATS
424 if (ret == OK)
425 {
426 if (offset == 0)
427 {
428 stats.write_count++;
429 }
430 }
431 else if (ret != -ENOTSUP)
432 {
433 stats.error_count++;
434 }
435#endif
436 return ret;
437 }
438
447 virtual int getFd() const
448 {
449 return -ENOTSUP;
450 };
451
460 virtual size_t getDataSize() const = 0;
461
471 virtual size_t getDataDim() const = 0;
472
479 virtual bool isRead() const = 0;
480
487 virtual bool isWrite() const = 0;
488
495 virtual bool isNotify() const = 0;
496
503 virtual bool isBatch() const = 0;
504
513 bool isTimestamp() const;
514
524 virtual bool isSeekable() const
525 {
526 return false;
527 }
528
529#ifdef CONFIG_DAWN_IO_NOTIFY
539 void bindNotifier(IIONotifier *n);
540
553 int setNotifier(IIONotifier::notifier_cb_t cb, int prio, void *priv);
554#endif
555
576 io_ddata_t *ddata_alloc(size_t batch, size_t chunk_size = 0);
577
589 int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
590 {
591 return this->getObjConfig(cfgid, data, len);
592 };
593
605 int setConfig(uint32_t cfgid, uint32_t *data, size_t len)
606 {
607 return this->setObjConfig(cfgid, data, len);
608 };
609
622 constexpr static SObjectCfg::ObjectCfgId cfgIdCmn(bool rw,
623 uint8_t dtype,
624 uint8_t size,
625 uint8_t id)
626 {
628 SObjectId::OBJTYPE_IO, CIOCommon::IO_CLASS_ANY, dtype, rw, size, id);
629 }
630
638 constexpr static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw = false)
639 {
641 }
642
651 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMin(uint8_t dtype, uint16_t size)
652 {
653 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MIN);
654 }
655
664 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMax(uint8_t dtype, uint16_t size)
665 {
666 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MAX);
667 }
668
677 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
678 {
679 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_STEP);
680 }
681
689 constexpr static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw = false)
690 {
692 }
693
694#ifdef CONFIG_DAWN_IO_NOTIFY
701 uint8_t getNotifyType() const
702 {
703 return notifyType;
704 }
705
712 int getNotifyPrio() const
713 {
714 return notifyPrio;
715 }
716
723 size_t getNotifyBatch() const
724 {
725 return notifyBatch;
726 }
727#endif
728
729protected:
730#ifdef CONFIG_DAWN_IO_NOTIFY
733 IIONotifier *notifier;
734#endif
735
744 virtual int getDataImpl(IODataCmn &data, size_t len)
745 {
746 (void)data;
747 (void)len;
748 return -ENOTSUP;
749 }
750
758 virtual int setDataImpl(IODataCmn &data)
759 {
760 (void)data;
761 return -ENOTSUP;
762 }
763
777 virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
778 {
779 (void)data;
780 (void)len;
781 (void)offset;
782 return -ENOTSUP;
783 }
784
796 virtual int setDataAtImpl(IODataCmn &data, size_t offset)
797 {
798 (void)data;
799 (void)offset;
800 return -ENOTSUP;
801 }
802
803#ifdef CONFIG_DAWN_IO_NOTIFY
811 int notifyData(io_ddata_t *data);
812#endif
813
820 int getCmnDevno() const
821 {
822 return this->devno;
823 }
824
829 const uint32_t *getCmnLimitMin()
830 {
831 return this->limits.getMin();
832 }
833
838 const uint32_t *getCmnLimitMax()
839 {
840 return this->limits.getMax();
841 }
842
847 const uint32_t *getCmnLimitStep()
848 {
849 return this->limits.getStep();
850 }
851
857 {
858 return this->limits.getWords();
859 }
860
865 const CIOLimits &getCmnLimits() const
866 {
867 return this->limits;
868 }
869
877 size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg);
878
885 uint64_t getTimestamp();
886
887private:
888 int devno;
889 CIOLimits limits;
890#ifdef CONFIG_DAWN_IO_NOTIFY
891 uint8_t notifyType;
892 int notifyPrio;
893 size_t notifyBatch;
894#endif
895#ifdef CONFIG_DAWN_IO_HAS_STATS
896 IOStats stats;
897#endif
898
908 int configureDesc(const CDescObject &desc);
909};
910} // Namespace dawn
Descriptor wrapper for individual object configuration.
Template helper for creating ObjectIDs for I/O types without timestamp support.
Definition common.hxx:325
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
Create ObjectID with custom data type and no timestamp.
Definition common.hxx:347
static SObjectId::ObjectId create(uint16_t inst)
Create ObjectID with fixed data type and no timestamp.
Definition common.hxx:334
Template helper for creating ObjectIDs for I/O types.
Definition common.hxx:258
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Definition common.hxx:268
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, bool ts, uint16_t inst)
Create ObjectID with custom data type.
Definition common.hxx:293
Base class for all I/O objects.
Definition common.hxx:27
virtual bool isWrite() const =0
Check if IO supports write operations.
static SObjectCfg::ObjectCfgId cfgIdLimitMax(uint8_t dtype, uint16_t size)
Create ConfigID for maximum I/O limits.
Definition common.hxx:664
int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
Get I/O configuration item.
Definition common.hxx:589
int setData(IODataCmn &data, size_t offset=0)
Set data for I/O (public interface with stats tracking).
Definition common.hxx:414
virtual bool isBatch() const =0
Check if IO supports batch operations.
size_t getCmnLimitWords()
Get number of 32-bit words in I/O limit arrays.
Definition common.hxx:856
virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
Get data at byte offset (override in seekable IOs).
Definition common.hxx:777
int getData(IODataCmn &data, size_t len, size_t offset=0)
Get data from I/O (public interface with stats tracking).
Definition common.hxx:375
const CIOLimits & getCmnLimits() const
Get common IO limits container.
Definition common.hxx:865
static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
Create ConfigID for step I/O limits.
Definition common.hxx:677
const uint32_t * getCmnLimitMin()
Get minimum I/O limit words.
Definition common.hxx:829
static SObjectCfg::ObjectCfgId cfgIdCmn(bool rw, uint8_t dtype, uint8_t size, uint8_t id)
Create ConfigID for I/O common configuration.
Definition common.hxx:622
@ IO_CFG_LIMIT_STEP
Step limit words.
Definition common.hxx:236
@ IO_CFG_NOTIFY
Notifier configuration (type + priority)
Definition common.hxx:237
@ IO_CFG_FIRST
First config ID.
Definition common.hxx:232
@ IO_CFG_LIMIT_MIN
Minimum limit words.
Definition common.hxx:234
@ IO_CFG_LAST
Last config ID.
Definition common.hxx:238
@ IO_CFG_LIMIT_MAX
Maximum limit words.
Definition common.hxx:235
@ IO_CFG_DEVNO
Device number configuration.
Definition common.hxx:233
const uint32_t * getCmnLimitMax()
Get maximum I/O limit words.
Definition common.hxx:838
static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw=false)
Create ConfigID for device number configuration.
Definition common.hxx:638
virtual bool isNotify() const =0
Check if IO supports notifications.
virtual int getFd() const
Get file descriptor for notifications.
Definition common.hxx:447
uint64_t getTimestamp()
Get current timestamp.
Definition common.cxx:194
virtual bool isSeekable() const
Check if IO supports partial (seekable) access.
Definition common.hxx:524
bool isTimestamp() const
Check if I/O supports timestamp.
Definition common.cxx:189
virtual int setDataAtImpl(IODataCmn &data, size_t offset)
Set data at byte offset (override in seekable IOs).
Definition common.hxx:796
EIONotifyType
Notifier type enumeration.
Definition common.hxx:244
@ IO_NOTIFY_POLL
Poll-based notifier (default)
Definition common.hxx:245
@ IO_NOTIFY_STREAM
Stream notifier (blocking read, one per IO)
Definition common.hxx:246
int getCmnDevno() const
Get device number for this I/O.
Definition common.hxx:820
virtual int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
Definition common.hxx:758
virtual size_t getDataDim() const =0
Get data vector dimension.
io_ddata_t * ddata_alloc(size_t batch, size_t chunk_size=0)
Allocate data buffer for this I/O.
Definition common.cxx:247
virtual size_t getDataSize() const =0
Get data size in bytes.
EIOFlags
I/O common flags.
Definition common.hxx:74
@ IO_FLAGS_TS
Timestamp support flag.
Definition common.hxx:76
@ IO_FLAGS_NONE
No flags.
Definition common.hxx:75
virtual int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Definition common.hxx:744
virtual bool isRead() const =0
Check if IO supports read operations.
int setConfig(uint32_t cfgid, uint32_t *data, size_t len)
Set I/O configuration item.
Definition common.hxx:605
size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg)
Get offset of configuration item in descriptor.
Definition common.cxx:144
EIOClass
I/O object class types.
Definition common.hxx:85
@ IO_CLASS_SENSOR_PRODUCER_MAGNETICFIELD
Magnetic field publisher.
Definition common.hxx:132
@ IO_CLASS_SENSOR_MAGNETICFIELD
Magnetic field sensor.
Definition common.hxx:114
@ IO_CLASS_SENSOR_PRODUCER_ACCELEROMETER
Accelerometer publisher.
Definition common.hxx:131
@ IO_CLASS_DAC
Digital-to-analog converter.
Definition common.hxx:188
@ IO_CLASS_TRIGGER
Trigger I/O.
Definition common.hxx:91
@ IO_CLASS_PWM
PWM output.
Definition common.hxx:183
@ IO_CLASS_SYSTEM_RESETCAUSE
Reset cause.
Definition common.hxx:164
@ IO_CLASS_ADC_STREAM
ADC stream (batch/high-throughput)
Definition common.hxx:191
@ IO_CLASS_VIRT
Virtual I/O.
Definition common.hxx:210
@ IO_CLASS_SYSTEM_UPTIME
System uptime.
Definition common.hxx:161
@ IO_CLASS_BATTERY_VOLTAGE
Battery voltage (fuel gauge)
Definition common.hxx:200
@ IO_CLASS_SYSTEM_POWEROFF
Power off control.
Definition common.hxx:165
@ IO_CLASS_USER_START
User-defined types start here.
Definition common.hxx:214
@ IO_CLASS_BATTERY_STATE
Battery charge state.
Definition common.hxx:202
@ IO_CLASS_GPI_SINGLE
Single GPIO input.
Definition common.hxx:175
@ IO_CLASS_SENSOR_PRODUCER_LIGHT
Light publisher.
Definition common.hxx:134
@ IO_CLASS_SENSOR_PRODUCER_ATEMPERATURE
Ambient temperature publisher.
Definition common.hxx:139
@ IO_CLASS_ANY
Any I/O class.
Definition common.hxx:86
@ IO_CLASS_SYSTEM_SYSTEMTIME
System time.
Definition common.hxx:168
@ IO_CLASS_SENSOR_PRODUCER_HUMIDITY
Humidity publisher.
Definition common.hxx:137
@ IO_CLASS_ENCODER_INDEX
Quadrature encoder (position+index)
Definition common.hxx:196
@ IO_CLASS_SENSOR_PRODUCER_IR
Infrared publisher.
Definition common.hxx:141
@ IO_CLASS_ADC_FETCH
ADC fetch (on-demand)
Definition common.hxx:189
@ IO_CLASS_CAPABILITIES
Capabilities bitmask I/O.
Definition common.hxx:94
@ IO_CLASS_PULSECOUNT
Finite pulse-train output.
Definition common.hxx:184
@ IO_CLASS_SENSOR_LIGHT
Light sensor.
Definition common.hxx:116
@ IO_CLASS_SENSOR_CO2
CO2 concentration sensor.
Definition common.hxx:126
@ IO_CLASS_SENSOR_BAROMETER
Barometer sensor.
Definition common.hxx:117
@ IO_CLASS_SENSOR_PRODUCER_UV
Ultraviolet publisher.
Definition common.hxx:142
@ IO_CLASS_SENSOR_HUMIDITY
Humidity sensor.
Definition common.hxx:119
@ IO_CLASS_SENSOR_PROXIMITY
Proximity sensor.
Definition common.hxx:118
@ IO_CLASS_SENSOR_GNSS_TIME
GNSS UTC time (seconds since epoch)
Definition common.hxx:151
@ IO_CLASS_SENSOR_PRODUCER_GAS
Gas publisher.
Definition common.hxx:143
@ IO_CLASS_SENSOR_TEMPERATURE
Temperature sensor.
Definition common.hxx:120
@ IO_CLASS_LAST
Last I/O class marker.
Definition common.hxx:217
@ IO_CLASS_FILE
File system I/O.
Definition common.hxx:109
@ IO_CLASS_SENSOR_PRODUCER_GYROSCOPE
Gyroscope publisher.
Definition common.hxx:133
@ IO_CLASS_SENSOR_PRODUCER_CO2
CO2 concentration publisher.
Definition common.hxx:144
@ IO_CLASS_CONTROL
Control I/O.
Definition common.hxx:93
@ IO_CLASS_BUTTONS
Button input.
Definition common.hxx:177
@ IO_CLASS_SYSTEM_HOSTNAME
System hostname.
Definition common.hxx:166
@ IO_CLASS_SENSOR_GNSS_INFO
GNSS accuracy + DOP (eph/epv/hdop/pdop/vdop)
Definition common.hxx:152
@ IO_CLASS_SENSOR_PRODUCER_RGB
RGB color publisher.
Definition common.hxx:140
@ IO_CLASS_SENSOR_PRODUCER_TEMPERATURE
Temperature publisher.
Definition common.hxx:138
@ IO_CLASS_SENSOR_UV
Ultraviolet sensor.
Definition common.hxx:124
@ IO_CLASS_CONFIG
Configuration I/O.
Definition common.hxx:90
@ IO_CLASS_DESC_SELECTOR
Descriptor slot selector I/O.
Definition common.hxx:95
@ IO_CLASS_SENSOR_GNSS
GNSS position+velocity (lat/lon/alt/speed/course)
Definition common.hxx:150
@ IO_CLASS_DUMMY
Dummy I/O (for testing)
Definition common.hxx:99
@ IO_CLASS_SENSOR_ACCELEROMETER
Accelerometer sensor.
Definition common.hxx:113
@ IO_CLASS_SENSOR_RGB
RGB color sensor.
Definition common.hxx:122
@ IO_CLASS_USER
User-defined I/O.
Definition common.hxx:215
@ IO_CLASS_TIMESTAMP
Timestamp generator.
Definition common.hxx:103
@ IO_CLASS_SENSOR_GYROSCOPE
Gyroscope sensor.
Definition common.hxx:115
@ IO_CLASS_SYSTEM_UUID
UUID.
Definition common.hxx:167
@ IO_CLASS_SENSOR_PRODUCER_TVOC
TVOC concentration publisher.
Definition common.hxx:145
@ IO_CLASS_SENSOR_GNSS_SATELLITES
GNSS satellites used in fix.
Definition common.hxx:153
@ IO_CLASS_ADC_SYNC
ADC sync (HW-triggered control loop)
Definition common.hxx:190
@ IO_CLASS_ENCODER
Quadrature encoder (position)
Definition common.hxx:195
@ IO_CLASS_GPO_SINGLE
Single GPIO output.
Definition common.hxx:176
@ IO_CLASS_SENSOR_IR
Infrared sensor.
Definition common.hxx:123
@ IO_CLASS_SYSTEM_CPULOAD
CPU load.
Definition common.hxx:162
@ IO_CLASS_SENSOR_PRODUCER_PROXIMITY
Proximity publisher.
Definition common.hxx:136
@ IO_CLASS_SENSOR_ATEMPERATURE
Ambient temperature sensor.
Definition common.hxx:121
@ IO_CLASS_BATTERY_SOC
Battery state of charge (%)
Definition common.hxx:201
@ IO_CLASS_DUMMY_NOTIFY
Timer-driven dummy IO.
Definition common.hxx:105
@ IO_CLASS_LEDS
LED output.
Definition common.hxx:178
@ IO_CLASS_RGBLED
RGB LED output.
Definition common.hxx:179
@ IO_CLASS_RAND
Random number generator.
Definition common.hxx:104
@ IO_CLASS_SENSOR_TVOC
TVOC concentration sensor.
Definition common.hxx:127
@ IO_CLASS_SENSOR_GAS
Gas sensor.
Definition common.hxx:125
@ IO_CLASS_LTE_SIGNAL
LTE signal quality (RSRP/RSRQ/SINR/RSSI)
Definition common.hxx:206
@ IO_CLASS_SENSOR_PRODUCER_BAROMETER
Barometer publisher.
Definition common.hxx:135
@ IO_CLASS_DESCRIPTOR
Descriptor I/O.
Definition common.hxx:92
@ IO_CLASS_SYSTEM_RESET
System reset control.
Definition common.hxx:163
static SObjectCfg::ObjectCfgId cfgIdLimitMin(uint8_t dtype, uint16_t size)
Create ConfigID for minimum I/O limits.
Definition common.hxx:651
const uint32_t * getCmnLimitStep()
Get step I/O limit words.
Definition common.hxx:847
static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw=false)
Create ConfigID for notifier configuration.
Definition common.hxx:689
Common IO runtime limits container and validator.
Definition limits.hxx:24
size_t getWords() const
Get configured limit array size in words.
Definition limits.hxx:140
const uint32_t * getMax() const
Get maximum limit words pointer.
Definition limits.hxx:114
const uint32_t * getStep() const
Get step limit words pointer.
Definition limits.hxx:127
const uint32_t * getMin() const
Get minimum limit words pointer.
Definition limits.hxx:101
Base class for all Dawn objects (IOs, Programs, Protocols).
Definition object.hxx:28
int getObjConfig(SObjectCfg::ObjectCfgId objcfg, uint32_t *data, size_t len)
Get object configuration item.
Definition object.cxx:240
int setObjConfig(SObjectCfg::ObjectCfgId objcfg, uint32_t *data, size_t len)
Set object configuration item.
Definition object.cxx:200
Abstract interface for registering asynchronous I/O notification.
Definition inotifier.hxx:25
int(* notifier_cb_t)(void *priv, io_ddata_t *data)
Notifier callback function type.
Definition inotifier.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
Base interface for I/O data buffers (static and dynamic).
Definition idata.hxx:21
Single configuration item within object.
@ OBJTYPE_IO
Input/Output object type.
Definition objectid.hxx:184
EObjectDataType
Data types supported by Dawn framework.
Definition objectid.hxx:61
@ DTYPE_UINT32
Unsigned 32-bit integer (0 to 4294967295).
Definition objectid.hxx:96
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
Heap-allocated dynamic I/O data buffer.
Definition ddata.hxx:21