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
32 virtual size_t getDataSize() = 0;
33
45 virtual void *getPtr(size_t batch = 0) = 0;
46
54 virtual void *getDataPtr(size_t batch = 0) = 0;
55
62 virtual bool hasTimestamp() = 0;
63
75 virtual uint64_t &getTs(size_t batch = 0) = 0;
76
79 virtual ~io_data_cmn_t() {};
80} typedef IODataCmn;
81
82} // 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 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:79
virtual size_t getDataSize()=0
Get data size in bytes.