another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s. As "*" isn't a desirable part of directory names, just name the whole thing "fail/", the core parts being stored in "fail/core/". Additionally fixing two build system dependency issues: - missing jobserver -> protomessages dependency - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain file dependencies ... cmake for the win) git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
63
core/jobserver/JobClient.hpp
Normal file
63
core/jobserver/JobClient.hpp
Normal file
@ -0,0 +1,63 @@
|
||||
/**
|
||||
* \brief The Minion's JobClient requests ExperimentData and returns results.
|
||||
*
|
||||
* \author Martin Hoffmann
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __JOB_CLIENT_H__
|
||||
#define __JOB_CLIENT_H__
|
||||
|
||||
#include "SocketComm.hpp"
|
||||
#include <string>
|
||||
#include "controller/ExperimentData.hpp"
|
||||
#include "jobserver/messagedefs/FailControlMessage.pb.h"
|
||||
|
||||
namespace fi {
|
||||
|
||||
/**
|
||||
* \class JobClient
|
||||
*
|
||||
* \brief Manages communication with JobServer
|
||||
*
|
||||
*/
|
||||
class JobClient {
|
||||
|
||||
std::string m_server;
|
||||
int m_server_port;
|
||||
struct hostent* m_server_ent;
|
||||
int m_sockfd;
|
||||
|
||||
bool connectToServer();
|
||||
|
||||
FailControlMessage_Command tryToGetExperimentData(ExperimentData& exp);
|
||||
public:
|
||||
JobClient(std::string server = "localhost", int port = 1111);
|
||||
/**
|
||||
* Receive experiment data set from (remote) JobServer
|
||||
* The caller (experiment developer) is responsible for
|
||||
* allocating his ExperimentData object.
|
||||
*
|
||||
* @param exp Reference to a ExperimentData object allocated by the caller!
|
||||
* @result \c true if parameter have been received and put into \c exp, \c false else.
|
||||
*/
|
||||
bool getParam(ExperimentData& exp);
|
||||
|
||||
/**
|
||||
* Send back experiment result to the (remote) JobServer
|
||||
* The caller (experiment developer) is responsible for
|
||||
* destroying his ExperimentData object afterwards.
|
||||
*
|
||||
* @param exp Reference to the ExperimentData holding result values
|
||||
* @return \c true Result successfully sent, \c else.
|
||||
*/
|
||||
bool sendResult(ExperimentData& result);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user