WIP
This commit is contained in:
@@ -43,7 +43,7 @@ void ecmcDAQDataChannel::connectToDataSources() {
|
||||
|
||||
for(std::vector<ecmcDAQChannelItem*>::iterator pDataItem = dataItems_.begin(); pDataItem != dataItems_.end(); ++pDataItem) {
|
||||
if(!(*pDataItem)) {
|
||||
throw std::runtime_error( "Channel empty..");
|
||||
throw std::runtime_error( "Data item empty..");
|
||||
}
|
||||
(*pDataItem)->connectToSource();
|
||||
dataElementCount_ = dataElementCount_ + (*pDataItem)->getDataElementCount();
|
||||
@@ -93,3 +93,20 @@ double ecmcDAQDataChannel::getData(int first){
|
||||
bool ecmcDAQDataChannel::empty(){
|
||||
return returnedDataCounter_>=dataElementCount_;
|
||||
}
|
||||
|
||||
int ecmcDAQDataChannel::validate() {
|
||||
if(dataElementCount_==0) {
|
||||
throw std::runtime_error("Error: DAQ-Channel element count 0");
|
||||
}
|
||||
if(itemCounter_==0) {
|
||||
throw std::runtime_error("Error: DAQ-Channel data item count 0");
|
||||
}
|
||||
for(std::vector<ecmcDAQChannelItem*>::iterator pDataItem = dataItems_.begin(); pDataItem != dataItems_.end(); ++pDataItem) {
|
||||
if(!(*pDataItem)) {
|
||||
throw std::runtime_error( "Data item empty..");
|
||||
}
|
||||
(*pDataItem)->validate();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user