Files
ecmc_plugin_daq/src/ecmcDAQDataChannel.h
2024-03-04 21:30:23 +01:00

47 lines
1.1 KiB
C++

/*************************************************************************\
* Copyright (c) 2024 PSI
* ecmc is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*
* ecmcDAQDataChannel.h
*
* Created on: Mar 01, 2024
* Author: anders sandstrom
*
\*************************************************************************/
#ifndef ECMC_DAQ_DATA_CHANNEL_H_
#define ECMC_DAQ_DATA_CHANNEL_H_
#include <stdexcept>
#include <vector>
#include <string>
#include "ecmcDAQChannelItem.h"
/* Class for an data channel */
class ecmcDAQDataChannel {
public:
ecmcDAQDataChannel(int type);
~ecmcDAQDataChannel();
void connectToDataSources();
void addDataItem(const char* name, int format);
size_t getDataElementCount();
double getData(int first);
bool empty();
double getType();
int validate();
private:
std::vector<ecmcDAQChannelItem*> dataItems_;
double type_;
size_t itemCounter_;
size_t dataElementCount_;
size_t returnedDataCounter_;
size_t currItemIndex_;
int dataSourcesLinked_;
};
#endif /* ECMC_DAQ_DATA_CHANNEL_H_ */