BString ct;
// 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 for cycles starting at cycle: %u\n", cn);
for(; ; cn++){
// Setup dataInfo
printf("GetData: Cycle Number: %u\n", cn);
dataInfo.cycleNumber = cn;
dataInfo.channel = 1;
dataInfo.cyclePeriod = CyclePeriodEvent0;
dataInfo.startTime = 0;
dataInfo.orbitNumber = 0;
dataInfo.bunchNumber = 0;
dataInfo.function = DataFunctionRaw;
dataInfo.argument = 0;
dataInfo.numValues = 1024;
dataInfo.beyondPeriod = 1;
if(err = tmsProcess.getData(dataInfo, data)){
return err.set(1, BString("Error: Getting Data: ") + err.getString());
}
printf("Data: NumValues: %d\n", data.numValues);
}
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