From 0bc32bf296f716381b126afb3614aaf7b55c9859 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 4 Mar 2006 16:27:26 +0000 Subject: [PATCH] go back to previous implementation since the new version seems not to work correctly --- src/channel.cpp | 27 +++++++++++++++++++++++++++ src/channel.h | 14 ++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/channel.cpp b/src/channel.cpp index 784dda0c..d01d1d52 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -30,6 +30,8 @@ \******************************************************************************/ CChannelSet::CChannelSet() { +/* +// seems not to work... // connect "message send"-message for each channel for ( int i = 0; i < MAX_NUM_CHANNELS; i++ ) { @@ -37,13 +39,38 @@ CChannelSet::CChannelSet() SIGNAL ( MessReadyForSending ( CVector ) ), this, SLOT ( OnSendProtMessage ( i, CVector ) ) ); } +*/ +// make sure we have MAX_NUM_CHANNELS connections!!! +QObject::connect(&vecChannels[0],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh0(CVector))); +QObject::connect(&vecChannels[1],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh1(CVector))); +QObject::connect(&vecChannels[2],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh2(CVector))); +QObject::connect(&vecChannels[3],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh3(CVector))); +QObject::connect(&vecChannels[4],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh4(CVector))); +QObject::connect(&vecChannels[5],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh5(CVector))); +QObject::connect(&vecChannels[6],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh6(CVector))); +QObject::connect(&vecChannels[7],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh7(CVector))); +QObject::connect(&vecChannels[8],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh8(CVector))); +QObject::connect(&vecChannels[9],SIGNAL(MessReadyForSending(CVector)), + this,SLOT(OnSendProtMessCh9(CVector))); } +/* +// seems not to work... void CChannelSet::OnSendProtMessage ( int iChID, CVector vecMessage ) { // just pass message through and add channel ID emit MessReadyForSending ( iChID,vecMessage ); } +*/ int CChannelSet::GetFreeChan() { diff --git a/src/channel.h b/src/channel.h index 437f55de..e16b5eaf 100755 --- a/src/channel.h +++ b/src/channel.h @@ -181,7 +181,21 @@ protected: QMutex Mutex; public slots: +/* +// seems not to work... void OnSendProtMessage ( int iChID, CVector vecMessage ); +*/ +// make sure we have MAX_NUM_CHANNELS connections!!! +void OnSendProtMessCh0(CVector mess) {emit MessReadyForSending(0,mess);} +void OnSendProtMessCh1(CVector mess) {emit MessReadyForSending(1,mess);} +void OnSendProtMessCh2(CVector mess) {emit MessReadyForSending(2,mess);} +void OnSendProtMessCh3(CVector mess) {emit MessReadyForSending(3,mess);} +void OnSendProtMessCh4(CVector mess) {emit MessReadyForSending(4,mess);} +void OnSendProtMessCh5(CVector mess) {emit MessReadyForSending(5,mess);} +void OnSendProtMessCh6(CVector mess) {emit MessReadyForSending(6,mess);} +void OnSendProtMessCh7(CVector mess) {emit MessReadyForSending(7,mess);} +void OnSendProtMessCh8(CVector mess) {emit MessReadyForSending(8,mess);} +void OnSendProtMessCh9(CVector mess) {emit MessReadyForSending(9,mess);} signals: void MessReadyForSending ( int iChID, CVector vecMessage );