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 // Digital potentiometer
199
201
202 // Battery (fuel gauge)
203
207
208 // Cellular modem
209
211
212 // Virtual IO
213
215
216 // User defined
217
220
222 } typedef EIOClass;
223
224 static_assert(IO_CLASS_LAST - 1 <= SObjectId::CLS_MAX);
225
234 enum
235 {
242 IO_CFG_LAST = 31
243 };
244
247 enum
248 {
251 } typedef EIONotifyType;
252
260 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
262 {
263 public:
272 constexpr static SObjectId::ObjectId create(bool ts, uint16_t inst)
273 {
274 uint8_t flags = 0;
275
276#ifdef CONFIG_DAWN_IO_TIMESTAMP
277 if (ts)
278 {
279 flags |= CIOCommon::IO_FLAGS_TS;
280 }
281#else
282 DAWNASSERT(ts == false, "ts not supported");
283#endif
284
285 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, DEFAULT_DTYPE, flags, inst);
286 }
287
298 bool ts,
299 uint16_t inst)
300 {
301 uint8_t flags = 0;
302
303#ifdef CONFIG_DAWN_IO_TIMESTAMP
304 if (ts)
305 {
306 flags |= CIOCommon::IO_FLAGS_TS;
307 }
308#else
309 DAWNASSERT(ts == false, "ts not supported");
310#endif
311
312 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, dtype, flags, inst);
313 }
314 };
315
327 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
329 {
330 public:
338 constexpr static SObjectId::ObjectId create(uint16_t inst)
339 {
341 }
342
351 constexpr static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
352 {
353 return IOObjectIdHelper<CLASS_ID, DEFAULT_DTYPE>::create(dtype, false, inst);
354 }
355 };
356
363 explicit CIOCommon(CDescObject &desc);
364
379 int getData(IODataCmn &data, size_t len, size_t offset = 0)
380 {
381 int ret;
382
383#ifdef CONFIG_DAWN_IO_SEEKABLE
384 ret = isSeekable() ? getDataAtImpl(data, len, offset)
385 : (offset == 0 ? getDataImpl(data, len) : -ENOTSUP);
386#else
387 ret = (offset == 0) ? getDataImpl(data, len) : -ENOTSUP;
388#endif
389#ifdef CONFIG_DAWN_IO_HAS_STATS
390 if (ret == OK)
391 {
392 if (offset == 0)
393 {
394 stats.read_count++;
395 }
396 }
397 else if (ret != -ENOTSUP)
398 {
399 stats.error_count++;
400 }
401#endif
402 return ret;
403 }
404
418 int setData(IODataCmn &data, size_t offset = 0)
419 {
420 int ret;
421
422#ifdef CONFIG_DAWN_IO_SEEKABLE
423 ret = isSeekable() ? setDataAtImpl(data, offset) : (offset == 0 ? setDataImpl(data) : -ENOTSUP);
424#else
425 ret = (offset == 0) ? setDataImpl(data) : -ENOTSUP;
426#endif
427#ifdef CONFIG_DAWN_IO_HAS_STATS
428 if (ret == OK)
429 {
430 if (offset == 0)
431 {
432 stats.write_count++;
433 }
434 }
435 else if (ret != -ENOTSUP)
436 {
437 stats.error_count++;
438 }
439#endif
440 return ret;
441 }
442
451 virtual int getFd() const
452 {
453 return -ENOTSUP;
454 };
455
464 virtual size_t getDataSize() const = 0;
465
475 virtual size_t getDataDim() const = 0;
476
483 virtual bool isRead() const = 0;
484
491 virtual bool isWrite() const = 0;
492
499 virtual bool isNotify() const = 0;
500
507 virtual bool isBatch() const = 0;
508
517 bool isTimestamp() const;
518
528 virtual bool isSeekable() const
529 {
530 return false;
531 }
532
533#ifdef CONFIG_DAWN_IO_NOTIFY
543 void bindNotifier(IIONotifier *n);
544
557 int setNotifier(IIONotifier::notifier_cb_t cb, int prio, void *priv);
558#endif
559
580 io_ddata_t *ddata_alloc(size_t batch, size_t chunk_size = 0);
581
593 int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
594 {
595 return this->getObjConfig(cfgid, data, len);
596 };
597
609 int setConfig(uint32_t cfgid, uint32_t *data, size_t len)
610 {
611 return this->setObjConfig(cfgid, data, len);
612 };
613
626 constexpr static SObjectCfg::ObjectCfgId cfgIdCmn(bool rw,
627 uint8_t dtype,
628 uint8_t size,
629 uint8_t id)
630 {
632 SObjectId::OBJTYPE_IO, CIOCommon::IO_CLASS_ANY, dtype, rw, size, id);
633 }
634
642 constexpr static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw = false)
643 {
645 }
646
655 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMin(uint8_t dtype, uint16_t size)
656 {
657 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MIN);
658 }
659
668 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMax(uint8_t dtype, uint16_t size)
669 {
670 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MAX);
671 }
672
681 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
682 {
683 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_STEP);
684 }
685
693 constexpr static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw = false)
694 {
696 }
697
698#ifdef CONFIG_DAWN_IO_NOTIFY
705 uint8_t getNotifyType() const
706 {
707 return notifyType;
708 }
709
716 int getNotifyPrio() const
717 {
718 return notifyPrio;
719 }
720
727 size_t getNotifyBatch() const
728 {
729 return notifyBatch;
730 }
731#endif
732
733protected:
734#ifdef CONFIG_DAWN_IO_NOTIFY
737 IIONotifier *notifier;
738
741 void setNotifyBatch(size_t batch)
742 {
743 notifyBatch = (batch == 0) ? 1 : batch;
744 }
745#endif
746
755 virtual int getDataImpl(IODataCmn &data, size_t len)
756 {
757 (void)data;
758 (void)len;
759 return -ENOTSUP;
760 }
761
769 virtual int setDataImpl(IODataCmn &data)
770 {
771 (void)data;
772 return -ENOTSUP;
773 }
774
788 virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
789 {
790 (void)data;
791 (void)len;
792 (void)offset;
793 return -ENOTSUP;
794 }
795
807 virtual int setDataAtImpl(IODataCmn &data, size_t offset)
808 {
809 (void)data;
810 (void)offset;
811 return -ENOTSUP;
812 }
813
814#ifdef CONFIG_DAWN_IO_NOTIFY
822 int notifyData(io_ddata_t *data);
823#endif
824
831 int getCmnDevno() const
832 {
833 return this->devno;
834 }
835
840 const uint32_t *getCmnLimitMin()
841 {
842 return this->limits.getMin();
843 }
844
849 const uint32_t *getCmnLimitMax()
850 {
851 return this->limits.getMax();
852 }
853
858 const uint32_t *getCmnLimitStep()
859 {
860 return this->limits.getStep();
861 }
862
868 {
869 return this->limits.getWords();
870 }
871
876 const CIOLimits &getCmnLimits() const
877 {
878 return this->limits;
879 }
880
888 size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg);
889
896 uint64_t getTimestamp();
897
898private:
899 int devno;
900 CIOLimits limits;
901#ifdef CONFIG_DAWN_IO_NOTIFY
902 uint8_t notifyType;
903 int notifyPrio;
904 size_t notifyBatch;
905#endif
906#ifdef CONFIG_DAWN_IO_HAS_STATS
907 IOStats stats;
908#endif
909
919 int configureDesc(const CDescObject &desc);
920};
921} // Namespace dawn
Descriptor wrapper for individual object configuration.
Template helper for creating ObjectIDs for I/O types without timestamp support.
Definition common.hxx:329
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
Create ObjectID with custom data type and no timestamp.
Definition common.hxx:351
static SObjectId::ObjectId create(uint16_t inst)
Create ObjectID with fixed data type and no timestamp.
Definition common.hxx:338
Template helper for creating ObjectIDs for I/O types.
Definition common.hxx:262
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Definition common.hxx:272
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, bool ts, uint16_t inst)
Create ObjectID with custom data type.
Definition common.hxx:297
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:668
int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
Get I/O configuration item.
Definition common.hxx:593
int setData(IODataCmn &data, size_t offset=0)
Set data for I/O (public interface with stats tracking).
Definition common.hxx:418
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:867
virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
Get data at byte offset (override in seekable IOs).
Definition common.hxx:788
int getData(IODataCmn &data, size_t len, size_t offset=0)
Get data from I/O (public interface with stats tracking).
Definition common.hxx:379
const CIOLimits & getCmnLimits() const
Get common IO limits container.
Definition common.hxx:876
static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
Create ConfigID for step I/O limits.
Definition common.hxx:681
const uint32_t * getCmnLimitMin()
Get minimum I/O limit words.
Definition common.hxx:840
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:626
@ IO_CFG_LIMIT_STEP
Step limit words.
Definition common.hxx:240
@ IO_CFG_NOTIFY
Notifier configuration (type + priority)
Definition common.hxx:241
@ IO_CFG_FIRST
First config ID.
Definition common.hxx:236
@ IO_CFG_LIMIT_MIN
Minimum limit words.
Definition common.hxx:238
@ IO_CFG_LAST
Last config ID.
Definition common.hxx:242
@ IO_CFG_LIMIT_MAX
Maximum limit words.
Definition common.hxx:239
@ IO_CFG_DEVNO
Device number configuration.
Definition common.hxx:237
const uint32_t * getCmnLimitMax()
Get maximum I/O limit words.
Definition common.hxx:849
static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw=false)
Create ConfigID for device number configuration.
Definition common.hxx:642
virtual bool isNotify() const =0
Check if IO supports notifications.
virtual int getFd() const
Get file descriptor for notifications.
Definition common.hxx:451
uint64_t getTimestamp()
Get current timestamp.
Definition common.cxx:194
virtual bool isSeekable() const
Check if IO supports partial (seekable) access.
Definition common.hxx:528
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:807
EIONotifyType
Notifier type enumeration.
Definition common.hxx:248
@ IO_NOTIFY_POLL
Poll-based notifier (default)
Definition common.hxx:249
@ IO_NOTIFY_STREAM
Stream notifier (blocking read, one per IO)
Definition common.hxx:250
int getCmnDevno() const
Get device number for this I/O.
Definition common.hxx:831
virtual int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
Definition common.hxx:769
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:755
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:609
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:214
@ IO_CLASS_SYSTEM_UPTIME
System uptime.
Definition common.hxx:161
@ IO_CLASS_BATTERY_VOLTAGE
Battery voltage (fuel gauge)
Definition common.hxx:204
@ IO_CLASS_SYSTEM_POWEROFF
Power off control.
Definition common.hxx:165
@ IO_CLASS_USER_START
User-defined types start here.
Definition common.hxx:218
@ IO_CLASS_BATTERY_STATE
Battery charge state.
Definition common.hxx:206
@ 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:221
@ 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:219
@ 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:205
@ 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:210
@ IO_CLASS_POT
Digital potentiometer wiper.
Definition common.hxx:200
@ 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:655
const uint32_t * getCmnLimitStep()
Get step I/O limit words.
Definition common.hxx:858
static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw=false)
Create ConfigID for notifier configuration.
Definition common.hxx:693
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