Moved Octave socket reading into riSocketTools

This commit is contained in:
Magne Sjaastad
2014-04-02 09:52:02 +02:00
parent 492d86c39f
commit 1fd4c56a46
3 changed files with 53 additions and 2 deletions

View File

@@ -4,7 +4,9 @@
#include <octave/oct.h>
#include "riSettings.h"
#include "../ApplicationCode/SocketInterface/RiaSocketTools.h"
#include "riSocketTools.h"
void getCellCorners(NDArray& cellCornerValues, const QString &hostName, quint16 port, const qint32& caseId, const quint32& gridIndex)
@@ -72,7 +74,7 @@ void getCellCorners(NDArray& cellCornerValues, const QString &hostName, quint16
double* internalMatrixData = cellCornerValues.fortran_vec();
QStringList errorMessages;
if (!RiaSocketTools::readBlockData(socket, (char*)(internalMatrixData), byteCount, errorMessages))
if (!readBlockData(socket, (char*)(internalMatrixData), byteCount, errorMessages))
{
for (int i = 0; i < errorMessages.size(); i++)
{
@@ -82,6 +84,8 @@ void getCellCorners(NDArray& cellCornerValues, const QString &hostName, quint16
OCTAVE_QUIT;
}
octave_stdout << "Bytes count processed : " << byteCount << std::endl;
/*
while (socket.bytesAvailable() < (qint64)(byteCount))