Commit c3a10d76 authored by ics's avatar ics
Browse files

nomad server endpoint

parent 551c07b7
......@@ -110,11 +110,8 @@ std::string getNomadProperty(const std::string& propertyname) {
* \param[in] appli the name of application to connect on cameo server
* \return the server end point string
*/
std::string getServerEndPoint(const std::string& appli) {
std::string buf = "tcp://localhost:7000";
buf += ":";
buf += getNomadProperty("serverEndpoint");
return buf;
std::string getNomadServerEndPoint() {
return getNomadProperty("nomadServerEndpoint");
}
#endif
......@@ -73,8 +73,12 @@ int main(int32 argc, char* argv[]) {
else {
DBGMSG("Start ploty in main mode");
}
DBGMSG("Connected to " << getNomadServerEndPoint());
cameo::Server server(getNomadServerEndPoint());
// Get nomad server instance
nomadserver = getNomadInstance(application::This::getServer());
nomadserver = getNomadInstance(server);
if (nomadserver.get() == 0) {
Error("mainplot", "No nomad server instance");
err = EXIT_FAILURE;
......
......@@ -199,7 +199,7 @@ void PlotManager::displayPropertyPlot(const ploty::Message& message, const ploty
// Create temporary file 1 which contains ploty::Message info
ostringstream filename1;
filename1 << "/tmp/mplplot-" << plotMessage.plotkey() << ".message1";
filename1 << "/tmp/" << getenv("USER") << "-mplplot-" << plotMessage.plotkey() << ".message1";
ofstream file1(filename1.str().c_str(), ios::binary);
if (file1.is_open() == true) {
......@@ -208,7 +208,7 @@ void PlotManager::displayPropertyPlot(const ploty::Message& message, const ploty
// Create temporary file 2 which contains ploty::PlotPropertyDataMessage info
ostringstream filename2;
filename2 << "/tmp/mplplot-" << plotMessage.plotkey() << ".message2";
filename2 << "/tmp/" << getenv("USER") << "-mplplot-" << plotMessage.plotkey() << ".message2";
ofstream file2(filename2.str().c_str(), ios::binary);
if (file2.is_open() == true) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment