/*************************************************************************\ * 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 #include #include #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 dataItems_; double type_; size_t itemCounter_; size_t dataElementCount_; size_t returnedDataCounter_; size_t currItemIndex_; int dataSourcesLinked_; }; #endif /* ECMC_DAQ_DATA_CHANNEL_H_ */