![]() |
VPTissue Reference Manual
|
ServerClient Protocol to deal with Client-Server communication (Server-side) More...
#include <ServerClientProtocol.h>


Signals | |
| void | DeleteExploration (const std::string &name) |
| Emitted when a request to stop/delete the given exploration is received. More... | |
| void | ExplorationNamesRequested () |
| Emitted when the names of the explorations are requested. | |
| void | ExplorationReceived (const Exploration *exploration) |
| Emitted when an exploration is received. More... | |
| void | RestartTask (const std::string &name, int id) |
| Emitted when a request for stopping a task arrives. | |
| void | StopTask (const std::string &name, int id) |
| Emitted when a request for stopping a task arrives. | |
| void | Subscribe (const std::string &name) |
| Emitted when a request for subscription arrives. More... | |
| void | Unsubscribe (const std::string &name) |
| Emitted when a request for unsubscription arrives. More... | |
Signals inherited from SimPT_Parex::Protocol | |
| void | Ended () |
| Signal emitted when the protocol has ended and the connection is closed. | |
| void | Error (const std::string &error) |
| Signal emitted when an error occured. | |
Public Member Functions | |
| ServerClientProtocol (QTcpSocket *socket, QObject *parent=0) | |
| Constructor. More... | |
| virtual | ~ServerClientProtocol () |
| Destructor. | |
| void | SendAck (const std::string &name) |
| Acknowledgement for sent exploration. More... | |
| void | SendExplorationNames (const std::vector< std::string > &names) |
| Send list of Exploration names. More... | |
| void | SendStatus (const ExplorationProgress &status) |
| Send status for given exploration. More... | |
| void | SendStatusDeleted (const std::string &name) |
| Send a deleted status for the exploration with the specified name. More... | |
Public Member Functions inherited from SimPT_Parex::Protocol | |
| Protocol (QTcpSocket *socket, QObject *parent=nullptr) | |
| Constructor. More... | |
| Protocol (ServerInfo *server, QObject *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~Protocol () |
| Destructor. | |
| bool | IsConnected () |
| Check if still connected. | |
Protected Member Functions | |
| virtual void | ReceivePtree (const boost::property_tree::ptree &reader) |
| Receive a ptree message Implementation of Protocol::ReceivePtree. More... | |
Protected Member Functions inherited from SimPT_Parex::Protocol | |
| std::string | GetClientIP () const |
| int | GetClientPort () const |
| void | SendPtree (const boost::property_tree::ptree &pt) |
| Sends a ptree over the connection. | |
ServerClient Protocol to deal with Client-Server communication (Server-side)
Definition at line 36 of file ServerClientProtocol.h.
| SimPT_Parex::ServerClientProtocol::ServerClientProtocol | ( | QTcpSocket * | socket, |
| QObject * | parent = 0 |
||
| ) |
Constructor.
| socket | Connected socket to set-up the connection |
Definition at line 36 of file ServerClientProtocol.cpp.
|
signal |
Emitted when a request to stop/delete the given exploration is received.
| name | The name for the exploration to stop/delete |
Referenced by ReceivePtree().

|
signal |
Emitted when an exploration is received.
| exploration | The exploration that is received |
Referenced by ReceivePtree().

|
protectedvirtual |
Receive a ptree message Implementation of Protocol::ReceivePtree.
| reader | The received pt |
Implements SimPT_Parex::Protocol.
Definition at line 79 of file ServerClientProtocol.cpp.
References DeleteExploration(), ExplorationNamesRequested(), ExplorationReceived(), SimPT_Parex::Exploration::GetName(), RestartTask(), SimPT_Parex::Exploration::SetName(), StopTask(), Subscribe(), and Unsubscribe().

| void SimPT_Parex::ServerClientProtocol::SendAck | ( | const std::string & | name | ) |
Acknowledgement for sent exploration.
| name | The name of the exploration |
Definition at line 45 of file ServerClientProtocol.cpp.
References SimPT_Parex::Protocol::SendPtree().

| void SimPT_Parex::ServerClientProtocol::SendExplorationNames | ( | const std::vector< std::string > & | names | ) |
Send list of Exploration names.
| names | The names of the explorations |
Definition at line 52 of file ServerClientProtocol.cpp.
References SimPT_Parex::Protocol::SendPtree().

| void SimPT_Parex::ServerClientProtocol::SendStatus | ( | const ExplorationProgress & | status | ) |
Send status for given exploration.
| status | The progress of the exploration to send to the client |
Definition at line 64 of file ServerClientProtocol.cpp.
References SimPT_Parex::Protocol::SendPtree(), and SimPT_Parex::ExplorationProgress::ToPtree().

| void SimPT_Parex::ServerClientProtocol::SendStatusDeleted | ( | const std::string & | name | ) |
Send a deleted status for the exploration with the specified name.
| name | The name of the deleted/nonexistent exploration |
Definition at line 71 of file ServerClientProtocol.cpp.
References SimPT_Parex::Protocol::SendPtree().

|
signal |
Emitted when a request for subscription arrives.
| name | The exploration name to receive updates for |
Referenced by ReceivePtree().

|
signal |
Emitted when a request for unsubscription arrives.
| name | The exploration name to unsubscribe to |
Referenced by ReceivePtree().
