summaryrefslogtreecommitdiffstats
path: root/src/core/pvsConnectionManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/pvsConnectionManager.cpp')
-rw-r--r--src/core/pvsConnectionManager.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/core/pvsConnectionManager.cpp b/src/core/pvsConnectionManager.cpp
index 8a35ca9..d0f1479 100644
--- a/src/core/pvsConnectionManager.cpp
+++ b/src/core/pvsConnectionManager.cpp
@@ -192,6 +192,9 @@ void PVSConnectionManager::onCommand(PVSMsg command)
{
QString message = command.getMessage();
QString ident = command.getIdent();
+
+ PVSClient* tmp = getClientFromConnectionId(command.getSndID());
+
if (ident.compare("VNCSRVRESULT") == 0)
{
int e = string2Int(message);
@@ -218,6 +221,45 @@ void PVSConnectionManager::onCommand(PVSMsg command)
break;
}
}
+ if (ident.compare("PROCESSES") == 0)
+ {
+ QString id = int2String(command.getSndID());
+ if (message.startsWith("START"))
+ {
+ QString msgcontent = message.remove(0,6);
+ if (msgcontent.startsWith("ERROR"))
+ {
+ ConsoleLog writeError("[Client: " + id + ", PROCESS] could not start: " +msgcontent.remove(0,6));
+ }
+ else
+ {
+ //ConsoleLog writeLine(QString("[Client: " + id + ", PROCESS] started: " +msgcontent));
+ }
+ }
+ if (message.startsWith("STOP"))
+ {
+ QString msgcontent = message.remove(0,5);
+ if (msgcontent.startsWith("ERROR"))
+ {
+ ConsoleLog writeError("[Client: " + id + ", PROCESS] could not stop: " +msgcontent.remove(0,6));
+ }
+ else
+ {
+ //ConsoleLog writeLine(QString("[Client: " + id + ", PROCESS] stopped: " +msgcontent));
+ }
+ }
+ if (message.startsWith("SHOW"))
+ {
+ QString msgcontent = message.remove(0,5);
+ if (msgcontent.startsWith("ERROR"))
+ ConsoleLog writeError("[Client: " + id + ", PROCESS] could not show processes: " +msgcontent.remove(0,6));
+ else if (msgcontent.startsWith("clear"))
+ tmp->clearProcessesVector();
+ else if (msgcontent.startsWith("finished"))
+ tmp->processesVectorAdd("vector ready");
+ else tmp->processesVectorAdd(message);
+ }
+ }
}
void PVSConnectionManager::onChat(PVSMsg chatMsg)
{