This commit is contained in:
2024-03-01 21:38:47 +01:00
parent 02012d9841
commit 1238a40331
3 changed files with 26 additions and 44 deletions

View File

@@ -15,38 +15,7 @@
#include <stdexcept>
#include <vector>
#include <string>
#include "ecmcDAQDataArray.h"
#include "ecmcDataItem.h"
/* Class to store data channels */
class ecmcDAQDataChannel {
public:
ecmcDAQDataChannel(char* name, int formatAsTime) {
dataItem_ = NULL;
name_ = name;
timeFormat_ = formatAsTime;
}
void connectToSources() {
// Get data item for
dataItem_ = (ecmcDataItem*) getEcmcDataItem(name_.c_str());
if(!dataItem_) {
printf("ERROR: DataItem %s NULL.\n", name_.c_str());
throw std::runtime_error( "ERROR: DataItem NULL." );
}
dataItemInfo_ = dataItem_->getDataItemInfo();
if(!dataItemInfo_) {
printf("ERROR: DataItemInfo %s NULL.\n", name_.c_str());
throw std::runtime_error( "ERROR: DataItemInfo NULL." );
}
}
ecmcDataItem* dataItem_;
ecmcDataItemInfo* dataItemInfo_;
std::string name_;
int timeFormat_;
};
#include "ecmcDAQDataChannel.h"
/* Class to fromat an array of ecmcDAQDataChannels with headers and push over asyn to epics */
class ecmcDAQDataArray {