diff --git a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h index 90763060a202937fd0688248d9e88091adf7b565..06a2bb210cd9ccabaecfb7c593e42181216b227b 100644 --- a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h +++ b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h @@ -22,6 +22,10 @@ #include #include "MFKBandBaseUtils.h" +// Temperature dummy value to use in case of Connection Error +#define CEDUMMY 100000 + + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the * configuration database and then are used (read) inside the component. @@ -55,6 +59,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h index 3da354384d8298240ec40b5d6604fc54bab96fca..c60049b25c2cb686b3cf1077987026275068f86c 100644 --- a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h +++ b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h @@ -329,35 +329,35 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current vertex temperature in °K */ - double getVertexTemperature() const { return m_envTemperature; } + CConfiguration::BoardValue getVertexTemperature() const { return m_envTemperature; } /** @@ -547,12 +547,12 @@ protected: ACS::doubleSeq m_startFreq; ACS::doubleSeq m_bandwidth; IRA::CString m_setupMode; - double m_envTemperature; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_envTemperature; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; double m_vacuumDefault; bool m_calDiode; diff --git a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp index 365be3eb5aa967d81e16f9bffa3b3ac2a7a6beaf..26a8818e5b99c20b0030450a618349eb680f8adc 100644 --- a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp +++ b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp @@ -22,8 +22,12 @@ void CComponentCore::initialize(maci::ContainerServices* services) m_control=NULL; m_localOscillatorDevice=Receivers::LocalOscillator::_nil(); m_localOscillatorFault=false; - m_cryoCoolHead=m_cryoCoolHeadWin= m_cryoLNA=m_cryoLNAWin=m_vacuum=0.0; - m_envTemperature=20.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_cryoCoolHead.temperature = 0.0; + m_envTemperature.temperature = 20.0; + m_vacuum=0.0; m_fetValues.VDL=m_fetValues.IDL=m_fetValues.VGL=m_fetValues.VDR=m_fetValues.IDR=m_fetValues.VGR=0.0; m_statusWord=0; m_ioMarkError = false; @@ -1027,9 +1031,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1043,9 +1049,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1059,9 +1067,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1075,9 +1085,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1091,9 +1103,11 @@ void CComponentCore::updateVertexTemperature() throw (ReceiversErrors::ReceiverC { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature =m_control->vertexTemperature(voltage2Celsius); + m_envTemperature.temperature = m_control->vertexTemperature(voltage2Celsius); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..dbe0ca39dc2e4d3952dd9b27450e045b48997baf 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..23ec8fd1276349083608897648f7326c181ca3b2 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..3d4fe791bf1e49d0871fdf727f9483bc58d04d84 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } diff --git a/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h b/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h index c090d68a0647a6623402f13f86cefaaf5b49aee6..36f3a4a3588cae923f4bdc960f4232f9d06a4ab8 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h +++ b/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h @@ -268,31 +268,31 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the vertex temperature */ - double getEnvironmentTemperature() const { return m_environmentTemperature; } + CConfiguration::BoardValue getEnvironmentTemperature() const { return m_environmentTemperature; } /** * This is getter method. No need to make it thread safe...... @@ -405,12 +405,12 @@ private: ACS::longSeq m_polarization; IRA::CString m_setupMode; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; + CConfiguration::BoardValue m_environmentTemperature; double m_vacuumDefault; - double m_environmentTemperature; bool m_calDiode; IRA::ReceiverControl::FetValues m_fetValues; DWORD m_statusWord; diff --git a/SRT/Servers/SRT7GHzReceiver/include/Configuration.h b/SRT/Servers/SRT7GHzReceiver/include/Configuration.h index 3105dbd2fccec694218edb62c9eb39657dd1110c..a3a59804c0759cbf0e0e9bf66d7f9ef5b4de8612 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/Configuration.h +++ b/SRT/Servers/SRT7GHzReceiver/include/Configuration.h @@ -15,6 +15,10 @@ #include #include +// Dummy value for a board connection error +#define CEDUMMY 100000 + + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the * configuration database and then are used (read) inside the component. @@ -48,6 +52,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..dbe0ca39dc2e4d3952dd9b27450e045b48997baf 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h index 9f181b3ea2cecaa6d068dabf39a1eccebc483d6f..f5376987345778d437f5f84a275e156d53ddc5bb 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h index aff44b89d51e4988cafb81b9d4b971afaac5d032..b92bc1f38c7183bc17c8e58f19f64f904951f0f7 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getEnvironmentTemperature(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getEnvironmentTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp b/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp index 5290ef93f4662fe76db045a1f7f6fa5641b50b4e..9839a49b37a0512dea01a03c26ee203b212e8502 100644 --- a/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp +++ b/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp @@ -21,7 +21,12 @@ void CComponentCore::initialize(maci::ContainerServices* services) m_control=NULL; m_localOscillatorDevice=Receivers::LocalOscillator::_nil(); m_localOscillatorFault=false; - m_cryoCoolHead=m_cryoCoolHeadWin= m_cryoLNA=m_cryoLNAWin=m_vacuum=0.0; + m_cryoCoolHead.temperature = 0.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_environmentTemperature.temperature = 20.0; + m_vacuum=0.0; m_calDiode=false; m_fetValues.VDL=m_fetValues.IDL=m_fetValues.VGL=m_fetValues.VDR=m_fetValues.IDR=m_fetValues.VGR=0.0; m_statusWord=0; @@ -876,9 +881,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -891,9 +898,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -906,9 +915,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -921,9 +932,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -936,9 +949,11 @@ void CComponentCore::updateEnvironmentTemperature() throw (ReceiversErrors::Rece { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_environmentTemperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_environmentTemperature.temperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_environmentTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_environmentTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateEnvironmentTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..ea0baa5e2aa599cd8a4cbe1d1c1b10f35884c807 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -12,6 +12,8 @@ #include #include +#include "MFKBandBaseConf.h" + /** * This class is derived from template DevIO and it is used by the cryoTemparatureCoolHead property of the component. @@ -54,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +73,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..f2489d6726c73c20044f643a53d606aa050efa28 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +71,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..6fbb0f7b94e8a1f65571bff886c385ed7f6dca24 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -72,6 +73,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..6ac4c6038323286265e97c0fe9df248d5ffafa44 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +71,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..538523f991c8daa53044e1ef804d35fae67e78dd 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } @@ -66,6 +67,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h b/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h index 3bb68f83fd4d2af97c929d39417e3a5773e6e95f..a9e52ce1e7f2de5a06533f19077be8daf0a1e940 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h +++ b/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h @@ -327,35 +327,35 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current vertex temperature in °K */ - double getVertexTemperature() const { return m_envTemperature; } + CConfiguration::BoardValue getVertexTemperature() const { return m_envTemperature; } /** @@ -595,12 +595,12 @@ private: bool m_localOscillatorFault; double m_localOscillatorValue; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; + CConfiguration::BoardValue m_envTemperature; double m_vacuumDefault; - double m_envTemperature; bool m_calDiode; IRA::ReceiverControl::FetValues m_fetValues; DWORD m_statusWord; diff --git a/SRT/Servers/SRTLPBandReceiver/include/Configuration.h b/SRT/Servers/SRTLPBandReceiver/include/Configuration.h index 9bfc1b8ebb9963671db66b20688838659297a638..e008e82e62cdcadc8ade1fb5d7d558ed0f574d7c 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/Configuration.h +++ b/SRT/Servers/SRTLPBandReceiver/include/Configuration.h @@ -17,6 +17,9 @@ #include #include "utils.h" +// Dummy value for a board connection error +#define CEDUMMY 100000 + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the @@ -53,6 +56,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..4980f46bac84cbb5f3d93d642f14c66b0e490579 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..23ec8fd1276349083608897648f7326c181ca3b2 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..3d4fe791bf1e49d0871fdf727f9483bc58d04d84 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } diff --git a/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp b/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp index f74619cbba97ad311b103d10f457bbe29e21fa67..1e38dc13683d13ff09d171938d490c36e2f1e605 100755 --- a/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp +++ b/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp @@ -15,10 +15,11 @@ void CComponentCore::initialize(maci::ContainerServices* services) { m_services = services; m_control = NULL; - m_cryoCoolHead = 0.0; - m_cryoCoolHeadWin = 0.0; - m_cryoLNA = 0.0; - m_cryoLNAWin = 0.0; + m_cryoCoolHead.temperature = 0.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_envTemperature.temperature = 20.0; m_vacuum = 0.0; m_fetValues.VDL = 0.0; m_fetValues. IDL = 0.0; @@ -1129,9 +1130,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1145,9 +1148,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1161,9 +1166,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1177,9 +1184,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1193,9 +1202,11 @@ void CComponentCore::updateVertexTemperature() throw (ReceiversErrors::ReceiverC { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_envTemperature.temperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR);