// Find out the current cycle number and type
if(err = tmsProcess.getCycleInfo(cn, ct)){
return err.set(1, BString("Error: Getting Cycle Number: ") + err.getString());
}
printf("Getting data from all pick-ups for cycle: %u\n", cn);
// Setup dataInfo
dataInfo.cycleNumber = cn;
dataInfo.channel = 0;
dataInfo.cyclePeriod = CyclePeriodEvent0;
dataInfo.startTime = 0;
dataInfo.orbitNumber = 0;
dataInfo.bunchNumber = 1;
dataInfo.function = DataFunctionRaw;
dataInfo.argument = 0;
dataInfo.numValues = 1024;
dataInfo.beyondPeriod = 1;
if(err = tmsProcess.getData(dataInfo, data)){
printf("Error: Getting Data: %d %s\n", err.getErrorNo(), err.getString().retStr());
for(chan = 0; chan < data.errors.size(); chan++){
printf("Chan: %d ErrorNo: %d ErrorStr: %s\n", chan + 1, data.errors[chan].getErrorNo(), data.errors[chan].getString().retStr());
}
return err.set(1, BString("Error: Getting Data: ") + err.getString());
}
return err;
}
int main(int argc, char** argv){
BError err;
BString host = "localhost";
TmsProcess tmsProcess;
if(argc == 2)
host = argv[1];
// Connect to the Process service