This commit is contained in:
2024-03-01 21:47:02 +01:00
parent 1238a40331
commit 2fc7122b71
3 changed files with 95 additions and 0 deletions

View File

@@ -69,6 +69,11 @@ void ecmcDAQDataArray::connectToDataSources() {
void ecmcDAQDataArray::buildArrayHeader(){
// 4 elements plus first timestamp to first data element
size_t dataStartOffset = channelCounter_* 4 + 1;
if( nelm_ < dataStartOffset) {
throw std::runtime_error( "Array to small, header will not fit (array size must be bigger than total data size plus 4*data_channel_count+1)..");
}
size_t index = 0;
buffer_[index] = 0; // Timestamp, will be set in each loop in execute
index++;