![]() |
VPTissue Reference Manual
|
Client side of the protocol. More...
#include <ClientProtocol.h>


Signals | |
| void | ExplorationDeleted () const |
| Signal emitted when subscribed exploration has been deleted. | |
| void | ExplorationNames (const std::vector< std::string > &names) const |
| Signal emitted when exploration names are received. | |
| void | ExplorationStatus (const ExplorationProgress *exploration) const |
| Signal emitted when new status update is received. | |
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 | |
| ClientProtocol (ServerInfo *server, QObject *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~ClientProtocol () |
| Destructor. | |
| bool | DeleteExploration (const std::string &name) |
| Request a stop and delete of the given exploration. More... | |
| bool | RequestExplorationNames () |
| Request a list of current Explorations. | |
| bool | RestartTask (const std::string &name, int task) |
| Request to restart a task. | |
| bool | SendExploration (const Exploration *exploration) |
| Send exploration. More... | |
| bool | StopTask (const std::string &name, int task) |
| Request to stop a task. | |
| bool | SubscribeUpdates (const std::string &explorationName) |
| Subscribe for regular updates. More... | |
| bool | UnsubscribeUpdates (const std::string &explorationName) |
| Unsubscribe for regular updates. 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. | |
Client side of the protocol.
Definition at line 36 of file ClientProtocol.h.
| SimPT_Parex::ClientProtocol::ClientProtocol | ( | ServerInfo * | server, |
| QObject * | parent = nullptr |
||
| ) |
Constructor.
| socket | The socket to connect through |
Definition at line 35 of file ClientProtocol.cpp.
| bool SimPT_Parex::ClientProtocol::DeleteExploration | ( | const std::string & | name | ) |
Request a stop and delete of the given exploration.
| name | The name of the exploration to stop and delete |
Definition at line 59 of file ClientProtocol.cpp.
References SimPT_Parex::Protocol::IsConnected(), and SimPT_Parex::Protocol::SendPtree().

|
protectedvirtual |
Receive a ptree message Implementation of Protocol::ReceivePtree.
| reader | The received pt |
Implements SimPT_Parex::Protocol.
Definition at line 133 of file ClientProtocol.cpp.
References ExplorationDeleted(), ExplorationNames(), and ExplorationStatus().
| bool SimPT_Parex::ClientProtocol::SendExploration | ( | const Exploration * | exploration | ) |
Send exploration.
| exploration | The Exploration to send |
Definition at line 40 of file ClientProtocol.cpp.
References SimPT_Parex::Protocol::IsConnected(), SimPT_Parex::Protocol::SendPtree(), and SimPT_Parex::Exploration::ToPtree().

| bool SimPT_Parex::ClientProtocol::SubscribeUpdates | ( | const std::string & | explorationName | ) |
Subscribe for regular updates.
| exploration_name | The name of the exploration to subscribe to |
Definition at line 83 of file ClientProtocol.cpp.
References SimPT_Parex::Protocol::IsConnected(), and SimPT_Parex::Protocol::SendPtree().

| bool SimPT_Parex::ClientProtocol::UnsubscribeUpdates | ( | const std::string & | explorationName | ) |
Unsubscribe for regular updates.
| exploration_name | The name of the exploration to unsubscribe |
Definition at line 95 of file ClientProtocol.cpp.
References SimPT_Parex::Protocol::IsConnected(), and SimPT_Parex::Protocol::SendPtree().
