Removed instrumentation code

p4#: 19267
This commit is contained in:
Magne Sjaastad
2012-10-23 11:19:02 +02:00
parent f833244b68
commit 1d90bd680e
2 changed files with 0 additions and 50 deletions

View File

@@ -29,7 +29,6 @@
#include "RimReservoir.h" #include "RimReservoir.h"
#include "RigReservoir.h" #include "RigReservoir.h"
#include "RigReservoirCellResults.h" #include "RigReservoirCellResults.h"
#include <QDebug>
#include "RimInputProperty.h" #include "RimInputProperty.h"
#include "RimInputReservoir.h" #include "RimInputReservoir.h"
#include "RimUiTreeModelPdm.h" #include "RimUiTreeModelPdm.h"
@@ -97,17 +96,12 @@ void RiaSocketServer::slotNewClientConnection()
if (m_currentClient != NULL) if (m_currentClient != NULL)
{ {
qDebug() << "onNewClientConnection(), m_currentClient != NULL";
if (m_currentClient->state() == QAbstractSocket::ConnectedState) if (m_currentClient->state() == QAbstractSocket::ConnectedState)
{ {
return; return;
} }
else else
{ {
qDebug() << "onNewClientConnection(), m_currentClient != NULL, state : " << m_currentClient->state() << "errorString " << m_currentClient->errorString();
if (m_readState == ReadingPropertyData) if (m_readState == ReadingPropertyData)
{ {
readPropertyDataFromOctave(); readPropertyDataFromOctave();
@@ -129,8 +123,6 @@ void RiaSocketServer::slotNewClientConnection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle) void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle)
{ {
qDebug() << "handleClientConnection()";
CVF_ASSERT(clientToHandle != NULL); CVF_ASSERT(clientToHandle != NULL);
CVF_ASSERT(m_currentClient == NULL); CVF_ASSERT(m_currentClient == NULL);
m_currentClient = clientToHandle; m_currentClient = clientToHandle;
@@ -147,14 +139,10 @@ void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle)
m_currentPropertyName = ""; m_currentPropertyName = "";
connect(m_currentClient, SIGNAL(disconnected()), this, SLOT(slotCurrentClientDisconnected())); connect(m_currentClient, SIGNAL(disconnected()), this, SLOT(slotCurrentClientDisconnected()));
connect(m_currentClient, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slotCurrentClientError(QAbstractSocket::SocketError)));
connect(m_currentClient, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(slotCurrentClientStateChanged(QAbstractSocket::SocketState)));
m_readState = ReadingCommand; m_readState = ReadingCommand;
if (m_currentClient->bytesAvailable()) if (m_currentClient->bytesAvailable())
{ {
qDebug() << "Initial call to slotReadCommand()";
this->readCommandFromOctave(); this->readCommandFromOctave();
} }
@@ -208,8 +196,6 @@ RimReservoir* RiaSocketServer::findReservoir(const QString& caseName)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaSocketServer::readCommandFromOctave() void RiaSocketServer::readCommandFromOctave()
{ {
qDebug() << "slotReadCommand() ";
QDataStream socketStream(m_currentClient); QDataStream socketStream(m_currentClient);
socketStream.setVersion(QDataStream::Qt_4_0); socketStream.setVersion(QDataStream::Qt_4_0);
@@ -249,14 +235,11 @@ void RiaSocketServer::readCommandFromOctave()
if (!(isGetProperty || isSetProperty || isGetCellInfo || isGetGridDim)) if (!(isGetProperty || isSetProperty || isGetCellInfo || isGetGridDim))
{ {
qDebug() << tr("ResInsight SocketServer: \n") + tr("Unknown command: %1").arg(args[0].data());
m_errorMessageDialog->showMessage(tr("ResInsight SocketServer: \n") + tr("Unknown command: %1").arg(args[0].data())); m_errorMessageDialog->showMessage(tr("ResInsight SocketServer: \n") + tr("Unknown command: %1").arg(args[0].data()));
terminateCurrentConnection(); terminateCurrentConnection();
return; return;
} }
qDebug() << args;
QString caseName; QString caseName;
QString propertyName; QString propertyName;
RimReservoir* reservoir = NULL; RimReservoir* reservoir = NULL;
@@ -341,8 +324,6 @@ void RiaSocketServer::readCommandFromOctave()
quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double)); quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double));
socketStream << timestepByteCount ; socketStream << timestepByteCount ;
// qDebug() << "Trying to read " << (quint64)(scalarResultFrames->front().size()*sizeof(double)) << "bytes of data";
// Then write the data. // Then write the data.
for (size_t tIdx = 0; tIdx < scalarResultFrames->size(); ++tIdx) for (size_t tIdx = 0; tIdx < scalarResultFrames->size(); ++tIdx)
@@ -360,8 +341,6 @@ void RiaSocketServer::readCommandFromOctave()
} }
else // Set property else // Set property
{ {
qDebug() << "Starting set property handling";
m_readState = ReadingPropertyData; m_readState = ReadingPropertyData;
// Disconnect the socket from calling this slot again. // Disconnect the socket from calling this slot again.
@@ -372,7 +351,6 @@ void RiaSocketServer::readCommandFromOctave()
m_scalarResultsToAdd = scalarResultFrames; m_scalarResultsToAdd = scalarResultFrames;
if (m_currentClient->bytesAvailable()) if (m_currentClient->bytesAvailable())
{ {
qDebug() << "Initial call to slotReadPropertyData()";
this->readPropertyDataFromOctave(); this->readPropertyDataFromOctave();
} }
} }
@@ -440,8 +418,6 @@ void RiaSocketServer::readCommandFromOctave()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaSocketServer::readPropertyDataFromOctave() void RiaSocketServer::readPropertyDataFromOctave()
{ {
qDebug() << "slotReadPropertyData() ";
QDataStream socketStream(m_currentClient); QDataStream socketStream(m_currentClient);
socketStream.setVersion(QDataStream::Qt_4_0); socketStream.setVersion(QDataStream::Qt_4_0);
@@ -518,8 +494,6 @@ void RiaSocketServer::readPropertyDataFromOctave()
// If we have read all the data, refresh the views // If we have read all the data, refresh the views
if (m_currentTimeStepToRead == m_timeStepCountToRead) if (m_currentTimeStepToRead == m_timeStepCountToRead)
{ {
qDebug() << "slotReadPropertyData() - all data read from socket";
if (m_currentReservoir != NULL) if (m_currentReservoir != NULL)
{ {
// Create a new input property if we have an input reservoir // Create a new input property if we have an input reservoir
@@ -565,16 +539,11 @@ void RiaSocketServer::readPropertyDataFromOctave()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotCurrentClientDisconnected() void RiaSocketServer::slotCurrentClientDisconnected()
{ {
qDebug() << "slotCurrentClientDisconnected()";
if (m_timeStepCountToRead > 0 if (m_timeStepCountToRead > 0
&& m_currentTimeStepToRead < m_timeStepCountToRead && m_currentTimeStepToRead < m_timeStepCountToRead
&& m_currentClient->bytesAvailable() && m_currentClient->bytesAvailable()
&& !m_invalidActiveCellCountDetected) && !m_invalidActiveCellCountDetected)
{ {
qDebug() << "slotCurrentClientDisconnected(), but not completed yet)";
this->readPropertyDataFromOctave(); this->readPropertyDataFromOctave();
} }
@@ -642,18 +611,3 @@ void RiaSocketServer::slotReadyRead()
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotCurrentClientError(QAbstractSocket::SocketError socketError)
{
qDebug() << "slotCurrentClientError() error : " << m_currentClient->errorString();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::slotCurrentClientStateChanged(QAbstractSocket::SocketState socketState)
{
qDebug() << "slotCurrentClientStateChanged() state : " << m_currentClient->state();
}

View File

@@ -45,10 +45,6 @@ public:
private slots: private slots:
void slotNewClientConnection(); void slotNewClientConnection();
void slotCurrentClientDisconnected(); void slotCurrentClientDisconnected();
void slotCurrentClientError(QAbstractSocket::SocketError socketError);
void slotCurrentClientStateChanged(QAbstractSocket::SocketState socketState);
void slotReadyRead(); void slotReadyRead();
private: private: