VPTissue Reference Manual
ServerNodeProtocol.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_SERVER_NODE_PROTOCOL_H_
2 #define SIMPT_PAREX_SERVER_NODE_PROTOCOL_H_
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "Protocol.h"
23 #include "SimTask.h"
24 #include "SimResult.h"
25 
26 #include <QObject>
27 #include <QTcpSocket>
28 #include <QByteArray>
29 
30 namespace SimPT_Parex {
31 
36 {
37  Q_OBJECT
38 public:
40  ServerNodeProtocol(QTcpSocket* socket, QObject* parent = 0);
41 
43  virtual ~ServerNodeProtocol();
44 
45 public slots:
47  void SendTask(const SimTask& task);
48 
50  void SendAck();
51 
53  void StopTask();
54 
56  void Delete(const std::string& name);
57 
58 signals:
60  void ResultReceived(const SimResult& result);
61 
62 protected:
64  virtual void ReceivePtree(const boost::property_tree::ptree& reader);
65 };
66 
67 } // namespace
68 
69 #endif // end-of-include-guard
Base class for the XML/ptree protocols between client, server and node.
Definition: Protocol.h:35
void StopTask()
Orders the node to stop its current task.
virtual void ReceivePtree(const boost::property_tree::ptree &reader)
Receive a ptree message (implements of Protocol::ReceivePtree).
Interface for Protocol.
A container class for the final result of a simulation.
Definition: SimResult.h:29
void SendTask(const SimTask &task)
Sends a task to the server.
void SendAck()
Sends an acknowledgment of a received result to the server.
Protocol at the server side to communicate with the node.
void ResultReceived(const SimResult &result)
Signals emitted when a sim result was received.
Interface for SimResult.
Interface for SimTask.
void Delete(const std::string &name)
Orders the node to delete all files it has for a certain exploration.
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Contains all information needed for a transmitable simulation task.
Definition: SimTask.h:31
see the online Qt documentation