Dawn Framework 1.0
Universal data acquisition framework for embedded systems
idata.hxx
1// dawn/include/dawn/io/idata.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include <cstddef>
9
10#include "dawn/porting/config.hxx"
11
12namespace dawn
13{
16typedef uint64_t io_ts_t;
17
20struct io_data_cmn_t
21{
24 virtual size_t getItems() = 0;
25
28 virtual size_t getBatch() = 0;
29
36 virtual size_t getDataSize() = 0;
37
49 virtual void *getPtr(size_t batch = 0) = 0;
50
58 virtual void *getDataPtr(size_t batch = 0) = 0;
59
66 virtual bool hasTimestamp() = 0;
67
79 virtual uint64_t &getTs(size_t batch = 0) = 0;
80
83 virtual ~io_data_cmn_t() {};
84} typedef IODataCmn;
85
86} // Namespace dawn
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13
uint64_t io_ts_t
Timestamp data type (uint64_t, typically microseconds since boot).
Definition idata.hxx:16
virtual bool hasTimestamp()=0
Check if this data buffer has per-batch timestamp storage.
virtual void * getPtr(size_t batch=0)=0
Get pointer to batch.
virtual size_t getBatch()=0
Get number of batches.
virtual size_t getItems()=0
Get number of items per batch.
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.
virtual ~io_data_cmn_t()
Virtual destructor for polymorphic cleanup.
Definition idata.hxx:83
virtual size_t getDataSize()=0
Get data size in bytes.