From 576b87b49ee0be7d7b4d804a60df4c0593fa7843 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 6 Mar 2006 19:02:23 +0000 Subject: [PATCH] test --- src/protocol.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/protocol.cpp b/src/protocol.cpp index 17e75aa0..88c00aed 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -86,6 +86,10 @@ void CProtocol::EnqueueMessage ( CVector& vecMessage, const int iCnt, const int iID ) { + +qDebug("EnqueueMessage start"); + + // check if list is empty so that we have to initiate a send process const bool bListWasEmpty = SendMessQueue.empty(); @@ -100,10 +104,18 @@ void CProtocol::EnqueueMessage ( CVector& vecMessage, { SendMessage(); } + +qDebug("EnqueueMessage end"); + + } void CProtocol::SendMessage() { + +qDebug("SendMessage start"); + + // we have to check that list is not empty, since in another thread the // last element of the list might have been erased if ( !SendMessQueue.empty() ) @@ -122,6 +134,10 @@ void CProtocol::SendMessage() // no message to send, stop timer TimerSendMess.stop(); } + +qDebug("SendMessage stop"); + + } void CProtocol::CreateAndSendAcknMess ( const int& iID, const int& iCnt ) @@ -130,6 +146,10 @@ void CProtocol::CreateAndSendAcknMess ( const int& iID, const int& iCnt ) CVector vecData ( 2 ); // 2 bytes of data unsigned int iPos = 0; // init position pointer + +qDebug("CreateAndSendAcknMess start"); + + // build data vector PutValOnStream ( vecData, iPos, static_cast ( iID ), 2 ); @@ -138,6 +158,10 @@ void CProtocol::CreateAndSendAcknMess ( const int& iID, const int& iCnt ) // immediately send acknowledge message emit MessReadyForSending ( vecAcknMessage ); + + +qDebug("CreateAndSendAcknMess end"); + } @@ -170,8 +194,15 @@ bool CProtocol::ParseMessage ( const CVector& vecbyData, /* return code: true -> ok; false -> error */ + +qDebug("before lock"); + Mutex.lock(); { + +qDebug("after lock"); + + int iRecCounter, iRecID, iData; unsigned int iPos; CVector vecData;