6#include "dawn/io/lte_signal.hxx"
12#include "dawn/porting/lte.hxx"
22#ifdef CONFIG_DAWN_IO_NOTIFY
26 for (
size_t i = 0; i < desc.
getSize(); i++)
34 timfd_interval(item->
data[0]);
39 DAWNERR(
"unsupported lte_signal cfg 0x%08" PRIx32
"\n", item->
cfgid.
v);
51#ifdef CONFIG_DAWN_IO_NOTIFY
54 DAWNERR(
"lte_signal requires interval > 0\n");
82 struct SLteCellinfo cell;
89 ret = lte_port_get_quality(&q);
108 ret = lte_port_get_cellinfo(&cell);
111 for (i = 0; i < len; i++)
113 std::memcpy(data.
getDataPtr(i), vec,
sizeof(vec));
135#ifdef CONFIG_DAWN_IO_NOTIFY
Descriptor wrapper for individual object configuration.
size_t getSize() const
Get number of configuration items for this object.
SObjectCfg::SObjectCfgItem * objectCfgItemAtOffset(size_t offset) const
Get configuration item at specified offset.
virtual int getFd() const
Get file descriptor for notifications.
uint64_t getTimestamp()
Get current timestamp.
bool isTimestamp() const
Check if I/O supports timestamp.
size_t cfgCmnOffset(const SObjectCfg::SObjectCfgItem *cfg)
Get offset of configuration item in descriptor.
@ IO_CLASS_ANY
Any I/O class.
@ IO_CLASS_LTE_SIGNAL
LTE signal quality (RSRP/RSRQ/SINR/RSSI)
size_t getDataDim() const
Get data vector dimension.
int getDataImpl(IODataCmn &data, size_t len)
Get data implementation (override in derived classes).
size_t getDataSize() const
Get data size in bytes.
@ LTE_SIGNAL_CFG_INTERVAL
Poll interval, microseconds (DTYPE_UINT32)
int configure()
Configure object from descriptor data.
int doStop()
Stop implementation hook.
int doStart()
Start implementation hook.
int deinit()
De-initialize object.
int init()
One-time initialize object after bindings are resolved.
CDescObject & getDesc()
Get descriptor object for this object.
Out-of-tree user-extension hooks for Dawn.
@ DAWN_LTE_SIGNAL_DIM
Number of metrics in the vector.
@ DAWN_LTE_SIGNAL_RSRP
Reference Signal Received Power (dBm)
@ DAWN_LTE_SIGNAL_SINR
Signal to Interference + Noise Ratio (dB)
@ DAWN_LTE_SIGNAL_RSRQ
Reference Signal Received Quality (dB)
@ DAWN_LTE_SIGNAL_BAND
Serving E-UTRA band number.
Base interface for I/O data buffers (static and dynamic).
virtual void * getDataPtr(size_t batch=0)=0
Get pointer to data only (skips timestamp if present).
virtual uint64_t & getTs(size_t batch=0)=0
Get timestamp reference for batch.
Parameters used to bring up an LTE data connection.
bool valid
Values are meaningful only when true (RF on, camped).
int16_t rsrp
Reference Signal Received Power, dBm (-140..0).
int16_t sinr
Signal to Interference + Noise Ratio, dB (-128..40).
int16_t rsrq
Reference Signal Received Quality, dB (-60..0).
Single configuration item within object.
ObjectCfgData_t data[]
Configuration data array (flexible, size from cfgid.s.size).
UObjectCfgId cfgid
Configuration ID header (type, class, id, size, rw, dtype).
ObjectCfgId v
Raw 32-bit ConfigID value (for storage, comparison).
uint32_t cls
Object class (bits 21-29, max 511).
uint32_t id
Configuration identifier (bits 0-4, max 31).
struct dawn::SObjectCfg::UObjectCfgId::@10 s
Bit-field structure for named member access.