Moved deprecated files/folders to temp-folder, FI-stuff removed, cleaned up aspect (file-)names and code (-> coding-style).

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1320 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-07 18:57:26 +00:00
parent b7d904140e
commit d474a5b952
119 changed files with 110 additions and 55385 deletions

View File

@ -0,0 +1,42 @@
#include <iostream>
#include "jobserver/JobClient.hpp"
#include "experiments/AnExperiment.hpp"
using namespace std;
using namespace fail;
int main(int argc, char** argv){
int portno;
JobClient* jc;
cout << "JobClient" << endl;
if(argc == 1){
jc = new JobClient();
}else if(argc == 3){
portno = atoi(argv[2]);
jc = new JobClient(argv[1], portno);
}else{
cerr << "usage: " << argv[0] << " hostname port" << endl;
return 1;
}
AnExperimentData exp;
while(1){
if(jc->getExperimentData(exp)){
/// Do some work.
cout << "Got data: " << exp.getInput() << endl;
int result = exp.getInput() * exp.getInput();
usleep(500 * 1000); // 500 ms
/// Send back.
exp.setOutput(result);
jc->sendResult(exp);
}else{
cout << "No (more) data for me :(" << endl;
break;
}
}
delete jc;
}