10#include "dawn/io/common.hxx"
30#ifdef CONFIG_DAWN_IO_NOTIFY
31 int getFd()
const override
68 int getFdInternal()
const
75 int batRead(
int cmd,
void *arg)
const;
78 char path[PATH_MAX] = {};
92#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
93 const char *getClassNameStr()
const override
95 return "battery_volt";
118#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
119 const char *getClassNameStr()
const override
121 return "battery_soc";
144#ifdef CONFIG_DAWN_OBJECT_HAS_NAME
145 const char *getClassNameStr()
const override
147 return "battery_state";
Descriptor wrapper for individual object configuration.
Battery state of charge in percent (DTYPE_UINT32).
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Battery charge state as a numeric code (BATTERY_*; DTYPE_UINT32).
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Battery voltage in mV (DTYPE_UINT32).
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
Shared base for the battery (fuel-gauge) IO family.
int configure()
Configure object from descriptor data.
bool isNotify() const
Check if IO supports notifications.
bool isWrite() const
Check if IO supports write operations.
size_t getDataDim() const
Get data vector dimension.
int batRead(int cmd, void *arg) const
ioctl read of a single battery value into *arg.
bool isRead() const
Check if IO supports read operations.
int deinit()
De-initialize object.
bool isBatch() const
Check if IO supports batch operations.
size_t getDataSize() const
Get data size in bytes.
static SObjectId::ObjectId create(bool ts, uint16_t inst)
Create ObjectID with default data type.
Base class for all I/O objects.
virtual int getFd() const
Get file descriptor for notifications.
size_t getDtypeSize() const
Get size of this object's data type.
Out-of-tree user-extension hooks for Dawn.
Base interface for I/O data buffers (static and dynamic).
uint32_t ObjectId
ObjectID type - single 32-bit value.