diff options
| author | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
|---|---|---|
| committer | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
| commit | 0d97a7378ffe5f6be408201cd1f5595607ed5f87 (patch) | |
| tree | 78ccd691a67c2f63f8fa4d1032d4cabfae0e80fa /src/core/pvsConnectionManager.cpp | |
| parent | [PVSGUI] parsing cmdargs fixed (diff) | |
| download | pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.gz pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.xz pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.zip | |
Process start/stop/view functionality
processWidget - shows a list of processes on one client, allows to start ans stop processes
processesDialog - shows every processWidget as a tab
processesStartDialog - starts process entered in messageEdit
added handling of new pvscommands
Diffstat (limited to 'src/core/pvsConnectionManager.cpp')
| -rw-r--r-- | src/core/pvsConnectionManager.cpp | 42 |
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) { |
