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{
19// Forward declaration
20class CDevDescriptor;
21
28
29class CIOCommon : public CObject
30{
31public:
32#ifdef CONFIG_DAWN_IO_HAS_STATS
38
39 struct SIOStats
40 {
41 uint32_t read_count;
42 uint32_t write_count;
43 uint32_t error_count;
44 } typedef IOStats;
45
51
52 const IOStats &getStats() const
53 {
54 return stats;
55 }
56
60
61 void resetStats()
62 {
63 stats.read_count = 0;
64 stats.write_count = 0;
65 stats.error_count = 0;
66 }
67#endif // CONFIG_DAWN_IO_HAS_STATS
68
75
76 enum
77 {
79 IO_FLAGS_TS = (1 << 0),
80
82
83 } typedef EIOFlags;
84
86
87 enum
88 {
90
91 // Special purpose IOs
92
99
100 // Dummy
101
103
104 // Number generators
105
109
110 // File I/O
111
113
114 // Sensors
115
131
132 // Sensor producers
133
149
150 // GNSS sensor (uORB sensor_gnss). Read-only, so it has no producer
151 // counterpart and lives outside the aligned sensor/producer ranges above.
152
157
158 // there is 59 sensor types in Nuttx now, most likely it grows later
159 // we still have many free slots, but in the future, it there are no free IO slots
160 // we can thing about combining sensor and sensor producer
161
162 // System information
163
172
173 // Slots 52-59 reserved for future system classes (serial number,
174 // firmware version, firmware update, etc.).
175
176 // GPIO
177
183
184 // PWM / pulse output
185
188
189 // ADC/DAC
190
195
196 // Ecnoder input
197
200
201 // Digital potentiometer
202
204
205 // Battery (fuel gauge)
206
210
211 // Cellular modem
212
214
215 // Virtual IO
216
218
219 // User defined
220
223
225 } typedef EIOClass;
226
227 static_assert(IO_CLASS_LAST - 1 <= SObjectId::CLS_MAX);
228
236
237 enum
238 {
246 };
247
249
250 enum
251 {
254 } typedef EIONotifyType;
255
262
263 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
265 {
266 public:
274
275 constexpr static SObjectId::ObjectId create(bool ts, uint16_t inst)
276 {
277 uint8_t flags = 0;
278
279#ifdef CONFIG_DAWN_IO_TIMESTAMP
280 if (ts)
281 {
282 flags |= CIOCommon::IO_FLAGS_TS;
283 }
284#else
285 DAWNASSERT(ts == false, "ts not supported");
286#endif
287
288 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, DEFAULT_DTYPE, flags, inst);
289 }
290
299
301 bool ts,
302 uint16_t inst)
303 {
304 uint8_t flags = 0;
305
306#ifdef CONFIG_DAWN_IO_TIMESTAMP
307 if (ts)
308 {
309 flags |= CIOCommon::IO_FLAGS_TS;
310 }
311#else
312 DAWNASSERT(ts == false, "ts not supported");
313#endif
314
315 return SObjectId::objectId(SObjectId::OBJTYPE_IO, CLASS_ID, dtype, flags, inst);
316 }
317 };
318
329
330 template<uint16_t CLASS_ID, uint8_t DEFAULT_DTYPE>
332 {
333 public:
340
341 constexpr static SObjectId::ObjectId create(uint16_t inst)
342 {
344 }
345
353
354 constexpr static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
355 {
356 return IOObjectIdHelper<CLASS_ID, DEFAULT_DTYPE>::create(dtype, false, inst);
357 }
358 };
359
365
366 explicit CIOCommon(CDescObject &desc);
367
381
382 int getData(IODataCmn &data, size_t len, size_t offset = 0)
383 {
384 int ret;
385
386#ifdef CONFIG_DAWN_IO_SEEKABLE
387 ret = isSeekable() ? getDataAtImpl(data, len, offset)
388 : (offset == 0 ? getDataImpl(data, len) : -ENOTSUP);
389#else
390 ret = (offset == 0) ? getDataImpl(data, len) : -ENOTSUP;
391#endif
392#ifdef CONFIG_DAWN_IO_HAS_STATS
393 if (ret == OK)
394 {
395 if (offset == 0)
396 {
397 stats.read_count++;
398 }
399 }
400 else if (ret != -ENOTSUP)
401 {
402 stats.error_count++;
403 }
404#endif
405 return ret;
406 }
407
420
421 int setData(IODataCmn &data, size_t offset = 0)
422 {
423 int ret;
424
425#ifdef CONFIG_DAWN_IO_SEEKABLE
426 ret = isSeekable() ? setDataAtImpl(data, offset) : (offset == 0 ? setDataImpl(data) : -ENOTSUP);
427#else
428 ret = (offset == 0) ? setDataImpl(data) : -ENOTSUP;
429#endif
430#ifdef CONFIG_DAWN_IO_HAS_STATS
431 if (ret == OK)
432 {
433 if (offset == 0)
434 {
435 stats.write_count++;
436 }
437 }
438 else if (ret != -ENOTSUP)
439 {
440 stats.error_count++;
441 }
442#endif
443 return ret;
444 }
445
453
454 virtual int getFd() const
455 {
456 return -ENOTSUP;
457 };
458
466
467 virtual size_t getDataSize() const = 0;
468
477
478 virtual size_t getDataDim() const = 0;
479
485
486 virtual bool isRead() const = 0;
487
493
494 virtual bool isWrite() const = 0;
495
501
502 virtual bool isNotify() const = 0;
503
509
510 virtual bool isBatch() const = 0;
511
519
520 bool isTimestamp() const;
521
530
531 virtual bool isSeekable() const
532 {
533 return false;
534 }
535
543
545 {
546 devDescriptor = d;
547 }
548
554
556 {
557 return devDescriptor;
558 }
559
560#ifdef CONFIG_DAWN_IO_NOTIFY
569
570 void bindNotifier(IIONotifier *n);
571
583
584 int setNotifier(IIONotifier::notifier_cb_t cb, int prio, void *priv);
585#endif
586
606
607 io_ddata_t *ddata_alloc(size_t batch, size_t chunk_size = 0);
608
619
620 int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
621 {
622 return this->getObjConfig(cfgid, data, len);
623 };
624
635
636 int setConfig(uint32_t cfgid, uint32_t *data, size_t len)
637 {
638 return this->setObjConfig(cfgid, data, len);
639 };
640
652
653 constexpr static SObjectCfg::ObjectCfgId cfgIdCmn(bool rw,
654 uint8_t dtype,
655 uint16_t size,
656 uint8_t id)
657 {
659 SObjectId::OBJTYPE_IO, CIOCommon::IO_CLASS_ANY, dtype, rw, size, id);
660 }
661
668
669 constexpr static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw = false)
670 {
672 }
673
681
682 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMin(uint8_t dtype, uint16_t size)
683 {
684 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MIN);
685 }
686
694
695 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitMax(uint8_t dtype, uint16_t size)
696 {
697 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_MAX);
698 }
699
707
708 constexpr static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
709 {
710 return CIOCommon::cfgIdCmn(false, dtype, size, IO_CFG_LIMIT_STEP);
711 }
712
719
720 constexpr static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw = false)
721 {
723 }
724
725#ifdef CONFIG_DAWN_IO_NOTIFY
731
732 uint8_t getNotifyType() const
733 {
734 return notifyType;
735 }
736
742
743 int getNotifyPrio() const
744 {
745 return notifyPrio;
746 }
747
753
754 size_t getNotifyBatch() const
755 {
756 return notifyBatch;
757 }
758#endif
759
760protected:
761#ifdef CONFIG_DAWN_IO_NOTIFY
763
764 IIONotifier *notifier;
765
767
768 void setNotifyBatch(size_t batch)
769 {
770 notifyBatch = (batch == 0) ? 1 : batch;
771 }
772#endif
773
781
782 virtual int getDataImpl(IODataCmn &data, size_t len)
783 {
784 (void)data;
785 (void)len;
786 return -ENOTSUP;
787 }
788
795
796 virtual int setDataImpl(IODataCmn &data)
797 {
798 (void)data;
799 return -ENOTSUP;
800 }
801
814
815 virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
816 {
817 (void)data;
818 (void)len;
819 (void)offset;
820 return -ENOTSUP;
821 }
822
833
834 virtual int setDataAtImpl(IODataCmn &data, size_t offset)
835 {
836 (void)data;
837 (void)offset;
838 return -ENOTSUP;
839 }
840
841#ifdef CONFIG_DAWN_IO_NOTIFY
848
849 int notifyData(io_ddata_t *data);
850#endif
851
857
858 int getCmnDevno() const
859 {
860 return this->devno;
861 }
862
866
867 const uint32_t *getCmnLimitMin()
868 {
869 return this->limits.getMin();
870 }
871
875
876 const uint32_t *getCmnLimitMax()
877 {
878 return this->limits.getMax();
879 }
880
884
885 const uint32_t *getCmnLimitStep()
886 {
887 return this->limits.getStep();
888 }
889
893
895 {
896 return this->limits.getWords();
897 }
898
902
903 const CIOLimits &getCmnLimits() const
904 {
905 return this->limits;
906 }
907
914
915 size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg);
916
922
923 uint64_t getTimestamp();
924
925private:
926 CDevDescriptor *devDescriptor;
927 int devno;
928 CIOLimits limits;
929#ifdef CONFIG_DAWN_IO_NOTIFY
930 uint8_t notifyType;
931 int notifyPrio;
932 size_t notifyBatch;
933#endif
934#ifdef CONFIG_DAWN_IO_HAS_STATS
935 IOStats stats;
936#endif
937
946
947 int configureDesc(const CDescObject &desc);
948};
949} // Namespace dawn
Descriptor wrapper for individual object configuration.
Descriptor interface available for IO.
Template helper for creating ObjectIDs for I/O types without timestamp support.
Definition common.hxx:332
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, uint16_t inst)
Create ObjectID with custom data type and no timestamp.
Definition common.hxx:354
static SObjectId::ObjectId create(uint16_t inst)
Create ObjectID with fixed data type and no timestamp.
Definition common.hxx:341
Template helper for creating ObjectIDs for I/O types.
Definition common.hxx:265
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Definition common.hxx:275
static SObjectId::ObjectId create(SObjectId::EObjectDataType dtype, bool ts, uint16_t inst)
Create ObjectID with custom data type.
Definition common.hxx:300
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:695
int getConfig(uint32_t cfgid, uint32_t *data, size_t len)
Get I/O configuration item.
Definition common.hxx:620
CDevDescriptor * getDevDescriptor() const
Get the device descriptor instance for this IO.
Definition common.hxx:555
int setData(IODataCmn &data, size_t offset=0)
Set data for I/O (public interface with stats tracking).
Definition common.hxx:421
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:894
virtual int getDataAtImpl(IODataCmn &data, size_t len, size_t offset)
Get data at byte offset (override in seekable IOs).
Definition common.hxx:815
int getData(IODataCmn &data, size_t len, size_t offset=0)
Get data from I/O (public interface with stats tracking).
Definition common.hxx:382
@ IO_CFG_LIMIT_STEP
Step limit words.
Definition common.hxx:243
@ IO_CFG_NOTIFY
Notifier configuration (type + priority).
Definition common.hxx:244
@ IO_CFG_FIRST
First config ID.
Definition common.hxx:239
@ IO_CFG_LIMIT_MIN
Minimum limit words.
Definition common.hxx:241
@ IO_CFG_LAST
Last config ID.
Definition common.hxx:245
@ IO_CFG_LIMIT_MAX
Maximum limit words.
Definition common.hxx:242
@ IO_CFG_DEVNO
Device number configuration.
Definition common.hxx:240
const CIOLimits & getCmnLimits() const
Get common IO limits container.
Definition common.hxx:903
static SObjectCfg::ObjectCfgId cfgIdLimitStep(uint8_t dtype, uint16_t size)
Create ConfigID for step I/O limits.
Definition common.hxx:708
CIOCommon(CDescObject &desc)
Construct CIOCommon from descriptor.
Definition common.cxx:110
const uint32_t * getCmnLimitMin()
Get minimum I/O limit words.
Definition common.hxx:867
void setDevDescriptor(CDevDescriptor *d)
Set the device descriptor instance for this IO.
Definition common.hxx:544
const uint32_t * getCmnLimitMax()
Get maximum I/O limit words.
Definition common.hxx:876
static SObjectCfg::ObjectCfgId cfgIdDevno(bool rw=false)
Create ConfigID for device number configuration.
Definition common.hxx:669
virtual bool isNotify() const =0
Check if IO supports notifications.
virtual int getFd() const
Get file descriptor for notifications.
Definition common.hxx:454
uint64_t getTimestamp()
Get current timestamp.
Definition common.cxx:196
static SObjectCfg::ObjectCfgId cfgIdCmn(bool rw, uint8_t dtype, uint16_t size, uint8_t id)
Create ConfigID for I/O common configuration.
Definition common.hxx:653
virtual bool isSeekable() const
Check if IO supports partial (seekable) access.
Definition common.hxx:531
bool isTimestamp() const
Check if I/O supports timestamp.
Definition common.cxx:191
virtual int setDataAtImpl(IODataCmn &data, size_t offset)
Set data at byte offset (override in seekable IOs).
Definition common.hxx:834
EIONotifyType
Notifier type enumeration.
Definition common.hxx:251
@ IO_NOTIFY_POLL
Poll-based notifier (default).
Definition common.hxx:252
@ IO_NOTIFY_STREAM
Stream notifier (blocking read, one per IO).
Definition common.hxx:253
int getCmnDevno() const
Get device number for this I/O.
Definition common.hxx:858
virtual int setDataImpl(IODataCmn &data)
Set data implementation (override in derived classes).
Definition common.hxx:796
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:249
virtual size_t getDataSize() const =0
Get data size in bytes.
EIOFlags
I/O common flags.
Definition common.hxx:77
@ IO_FLAGS_TS
Timestamp support flag.
Definition common.hxx:79
@ IO_FLAGS_NONE
No flags.
Definition common.hxx:78
virtual int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Definition common.hxx:782
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:636
size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg)
Get offset of configuration item in descriptor.
Definition common.cxx:146
EIOClass
I/O object class types.
Definition common.hxx:88
@ IO_CLASS_SENSOR_PRODUCER_MAGNETICFIELD
Magnetic field publisher.
Definition common.hxx:135
@ IO_CLASS_SENSOR_MAGNETICFIELD
Magnetic field sensor.
Definition common.hxx:117
@ IO_CLASS_SENSOR_PRODUCER_ACCELEROMETER
Accelerometer publisher.
Definition common.hxx:134
@ IO_CLASS_DAC
Digital-to-analog converter.
Definition common.hxx:191
@ IO_CLASS_TRIGGER
Trigger I/O.
Definition common.hxx:94
@ IO_CLASS_PWM
PWM output.
Definition common.hxx:186
@ IO_CLASS_SYSTEM_RESETCAUSE
Reset cause.
Definition common.hxx:167
@ IO_CLASS_ADC_STREAM
ADC stream (batch/high-throughput).
Definition common.hxx:194
@ IO_CLASS_VIRT
Virtual I/O.
Definition common.hxx:217
@ IO_CLASS_SYSTEM_UPTIME
System uptime.
Definition common.hxx:164
@ IO_CLASS_BATTERY_VOLTAGE
Battery voltage (fuel gauge).
Definition common.hxx:207
@ IO_CLASS_SYSTEM_POWEROFF
Power off control.
Definition common.hxx:168
@ IO_CLASS_USER_START
User-defined types start here.
Definition common.hxx:221
@ IO_CLASS_BATTERY_STATE
Battery charge state.
Definition common.hxx:209
@ IO_CLASS_GPI_SINGLE
Single GPIO input.
Definition common.hxx:178
@ IO_CLASS_SENSOR_PRODUCER_LIGHT
Light publisher.
Definition common.hxx:137
@ IO_CLASS_SENSOR_PRODUCER_ATEMPERATURE
Ambient temperature publisher.
Definition common.hxx:142
@ IO_CLASS_ANY
Any I/O class.
Definition common.hxx:89
@ IO_CLASS_SYSTEM_SYSTEMTIME
System time.
Definition common.hxx:171
@ IO_CLASS_SENSOR_PRODUCER_HUMIDITY
Humidity publisher.
Definition common.hxx:140
@ IO_CLASS_ENCODER_INDEX
Quadrature encoder (position+index).
Definition common.hxx:199
@ IO_CLASS_SENSOR_PRODUCER_IR
Infrared publisher.
Definition common.hxx:144
@ IO_CLASS_ADC_FETCH
ADC fetch (on-demand).
Definition common.hxx:192
@ IO_CLASS_CAPABILITIES
Capabilities bitmask I/O.
Definition common.hxx:97
@ IO_CLASS_PULSECOUNT
Finite pulse-train output.
Definition common.hxx:187
@ IO_CLASS_SENSOR_LIGHT
Light sensor.
Definition common.hxx:119
@ IO_CLASS_SENSOR_CO2
CO2 concentration sensor.
Definition common.hxx:129
@ IO_CLASS_SENSOR_BAROMETER
Barometer sensor.
Definition common.hxx:120
@ IO_CLASS_SENSOR_PRODUCER_UV
Ultraviolet publisher.
Definition common.hxx:145
@ IO_CLASS_SENSOR_HUMIDITY
Humidity sensor.
Definition common.hxx:122
@ IO_CLASS_SENSOR_PROXIMITY
Proximity sensor.
Definition common.hxx:121
@ IO_CLASS_SENSOR_GNSS_TIME
GNSS UTC time (seconds since epoch).
Definition common.hxx:154
@ IO_CLASS_SENSOR_PRODUCER_GAS
Gas publisher.
Definition common.hxx:146
@ IO_CLASS_SENSOR_TEMPERATURE
Temperature sensor.
Definition common.hxx:123
@ IO_CLASS_LAST
Last I/O class marker.
Definition common.hxx:224
@ IO_CLASS_FILE
File system I/O.
Definition common.hxx:112
@ IO_CLASS_SENSOR_PRODUCER_GYROSCOPE
Gyroscope publisher.
Definition common.hxx:136
@ IO_CLASS_SENSOR_PRODUCER_CO2
CO2 concentration publisher.
Definition common.hxx:147
@ IO_CLASS_CONTROL
Control I/O.
Definition common.hxx:96
@ IO_CLASS_BUTTONS
Button input.
Definition common.hxx:180
@ IO_CLASS_SYSTEM_HOSTNAME
System hostname.
Definition common.hxx:169
@ IO_CLASS_SENSOR_GNSS_INFO
GNSS accuracy + DOP (eph/epv/hdop/pdop/vdop).
Definition common.hxx:155
@ IO_CLASS_SENSOR_PRODUCER_RGB
RGB color publisher.
Definition common.hxx:143
@ IO_CLASS_SENSOR_PRODUCER_TEMPERATURE
Temperature publisher.
Definition common.hxx:141
@ IO_CLASS_SENSOR_UV
Ultraviolet sensor.
Definition common.hxx:127
@ IO_CLASS_CONFIG
Configuration I/O.
Definition common.hxx:93
@ IO_CLASS_DESC_SELECTOR
Descriptor slot selector I/O.
Definition common.hxx:98
@ IO_CLASS_SENSOR_GNSS
GNSS position+velocity (lat/lon/alt/speed/course).
Definition common.hxx:153
@ IO_CLASS_DUMMY
Dummy I/O (for testing).
Definition common.hxx:102
@ IO_CLASS_SENSOR_ACCELEROMETER
Accelerometer sensor.
Definition common.hxx:116
@ IO_CLASS_SENSOR_RGB
RGB color sensor.
Definition common.hxx:125
@ IO_CLASS_USER
User-defined I/O.
Definition common.hxx:222
@ IO_CLASS_TIMESTAMP
Timestamp generator.
Definition common.hxx:106
@ IO_CLASS_SENSOR_GYROSCOPE
Gyroscope sensor.
Definition common.hxx:118
@ IO_CLASS_SYSTEM_UUID
UUID.
Definition common.hxx:170
@ IO_CLASS_SENSOR_PRODUCER_TVOC
TVOC concentration publisher.
Definition common.hxx:148
@ IO_CLASS_SENSOR_GNSS_SATELLITES
GNSS satellites used in fix.
Definition common.hxx:156
@ IO_CLASS_ADC_SYNC
ADC sync (HW-triggered control loop).
Definition common.hxx:193
@ IO_CLASS_ENCODER
Quadrature encoder (position).
Definition common.hxx:198
@ IO_CLASS_GPO_SINGLE
Single GPIO output.
Definition common.hxx:179
@ IO_CLASS_SENSOR_IR
Infrared sensor.
Definition common.hxx:126
@ IO_CLASS_SYSTEM_CPULOAD
CPU load.
Definition common.hxx:165
@ IO_CLASS_SENSOR_PRODUCER_PROXIMITY
Proximity publisher.
Definition common.hxx:139
@ IO_CLASS_SENSOR_ATEMPERATURE
Ambient temperature sensor.
Definition common.hxx:124
@ IO_CLASS_BATTERY_SOC
Battery state of charge (%).
Definition common.hxx:208
@ IO_CLASS_DUMMY_NOTIFY
Timer-driven dummy IO.
Definition common.hxx:108
@ IO_CLASS_LEDS
LED output.
Definition common.hxx:181
@ IO_CLASS_RGBLED
RGB LED output.
Definition common.hxx:182
@ IO_CLASS_RAND
Random number generator.
Definition common.hxx:107
@ IO_CLASS_SENSOR_TVOC
TVOC concentration sensor.
Definition common.hxx:130
@ IO_CLASS_SENSOR_GAS
Gas sensor.
Definition common.hxx:128
@ IO_CLASS_LTE_SIGNAL
LTE signal quality (RSRP/RSRQ/SINR/RSSI).
Definition common.hxx:213
@ IO_CLASS_POT
Digital potentiometer wiper.
Definition common.hxx:203
@ IO_CLASS_SENSOR_PRODUCER_BAROMETER
Barometer publisher.
Definition common.hxx:138
@ IO_CLASS_DESCRIPTOR
Descriptor I/O.
Definition common.hxx:95
@ IO_CLASS_SYSTEM_RESET
System reset control.
Definition common.hxx:166
static SObjectCfg::ObjectCfgId cfgIdLimitMin(uint8_t dtype, uint16_t size)
Create ConfigID for minimum I/O limits.
Definition common.hxx:682
const uint32_t * getCmnLimitStep()
Get step I/O limit words.
Definition common.hxx:885
static SObjectCfg::ObjectCfgId cfgIdNotify(bool rw=false)
Create ConfigID for notifier configuration.
Definition common.hxx:720
Common IO runtime limits container and validator.
Definition limits.hxx:24
int getObjConfig(SObjectCfg::ObjectCfgId objcfg, uint32_t *data, size_t len)
Get object configuration item.
Definition object.cxx:240
CObject(CDescObject &desc)
Construct a CObject from a descriptor.
Definition object.hxx:54
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