From 00142eabc4cec81424ae68524cb3665465cd7b9a Mon Sep 17 00:00:00 2001 From: marco-buttu Date: Tue, 3 Mar 2020 10:54:14 +0000 Subject: [PATCH] Logging remote/local --- .../src/MFKBandBaseCore.cpp | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp index af4a69274..59524049f 100644 --- a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp +++ b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp @@ -71,6 +71,22 @@ CConfiguration const * const CComponentCore::execute() throw ( } m_localOscillatorValue=0.0; m_setupMode=""; + + if(m_control->isRemoteOn()) { + _IRA_LOGFILTER_LOG( + LM_INFO, + "CComponentCore::updateIsRemote()", + "RECEVER_REMOTELY_CONTROLLABLE" + ); + } + else { + _IRA_LOGFILTER_LOG( + LM_INFO, + "CComponentCore::updateIsRemote()", + "RECEVER_NOT_REMOTELY_CONTROLLABLE" + ); + } + return &m_configuration; } @@ -985,6 +1001,22 @@ void CComponentCore::updateIsRemote() throw (ReceiversErrors::ReceiverControlBoa setStatusBit(CONNECTIONERROR); throw impl; } + + if (checkStatusBit(LOCAL) && answer) { + _IRA_LOGFILTER_LOG( + LM_INFO, + "CComponentCore::updateIsRemote()", + "RECEVER_SWITCHED_FROM_LOCAL_TO_REMOTE" + ); + } + else if (!checkStatusBit(LOCAL) && !answer) { + _IRA_LOGFILTER_LOG( + LM_INFO, + "CComponentCore::updateIsRemote()", + "RECEVER_SWITCHED_FROM_REMOTE_TO_LOCAL" + ); + } + if (!answer) setStatusBit(LOCAL); else clearStatusBit(LOCAL); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit -- GitLab