make the "ParseMessageBody" signal/slot mechanism the default since in the future we will need to use different threads at some point
This commit is contained in:
parent
7c81775232
commit
27f0e540b6
2 changed files with 5 additions and 16 deletions
|
@ -105,13 +105,11 @@ QObject::connect ( &Protocol,
|
|||
SIGNAL ( ReqNetTranspProps() ),
|
||||
this, SLOT ( OnReqNetTranspProps() ) );
|
||||
|
||||
#ifdef ENABLE_RECEIVE_SOCKET_IN_SEPARATE_THREAD
|
||||
// this connection is intended for a thread transition if we have a
|
||||
// separate socket thread running
|
||||
QObject::connect ( this,
|
||||
SIGNAL ( ParseMessageBody ( CVector<uint8_t>, int, int ) ),
|
||||
this, SLOT ( OnParseMessageBody ( CVector<uint8_t>, int, int ) ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CChannel::ProtocolIsEnabled()
|
||||
|
@ -483,7 +481,6 @@ EPutDataStat CChannel::PutData ( const CVector<uint8_t>& vecbyData,
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_RECEIVE_SOCKET_IN_SEPARATE_THREAD
|
||||
// parse the message assuming this is a regular protocol message
|
||||
emit ParseMessageBody ( vecbyMesBodyData, iRecCounter, iRecID );
|
||||
|
||||
|
@ -491,14 +488,6 @@ EPutDataStat CChannel::PutData ( const CVector<uint8_t>& vecbyData,
|
|||
// check if the protocol was ok since we emit just a signal
|
||||
// and do not get any feedback on the protocol decoding state
|
||||
eRet = PS_PROT_OK;
|
||||
#else
|
||||
// parse the message assuming this is a protocol message
|
||||
if ( !Protocol.ParseMessageBody ( vecbyMesBodyData, iRecCounter, iRecID ) )
|
||||
{
|
||||
// set status flag
|
||||
eRet = PS_PROT_OK;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -208,11 +208,13 @@ public slots:
|
|||
void OnNetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps );
|
||||
void OnReqNetTranspProps();
|
||||
|
||||
#ifdef ENABLE_RECEIVE_SOCKET_IN_SEPARATE_THREAD
|
||||
void OnParseMessageBody ( CVector<uint8_t> vecbyMesBodyData,
|
||||
int iRecCounter,
|
||||
int iRecID ) { Protocol.ParseMessageBody ( vecbyMesBodyData, iRecCounter, iRecID ); }
|
||||
#endif
|
||||
int iRecID )
|
||||
{
|
||||
// note that the return value is ignored here
|
||||
Protocol.ParseMessageBody ( vecbyMesBodyData, iRecCounter, iRecID );
|
||||
}
|
||||
|
||||
signals:
|
||||
void MessReadyForSending ( CVector<uint8_t> vecMessage );
|
||||
|
@ -233,11 +235,9 @@ signals:
|
|||
void DetectedCLMessage ( CVector<uint8_t> vecbyMesBodyData,
|
||||
int iRecID );
|
||||
|
||||
#ifdef ENABLE_RECEIVE_SOCKET_IN_SEPARATE_THREAD
|
||||
void ParseMessageBody ( CVector<uint8_t> vecbyMesBodyData,
|
||||
int iRecCounter,
|
||||
int iRecID );
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* !defined ( CHANNEL_HOIH9345KJH98_3_4344_BB23945IUHF1912__INCLUDED_ ) */
|
||||
|
|
Loading…
Reference in a new issue