Commit 93c4c026 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

Fixed a small bug in the receivers boss introduced by recoding of Medicina implementation. (#320)

The Boss client now check if the derotator is available before trying to load it. This should save an erro from the manger in systems without
a derotator.
Some changes in Medicina configuration regarding the receivers management.
parent a13bb25e
Loading
Loading
Loading
Loading
+39 −12
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
	ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_INFO,"Trying to get property "#NAME"...")); \
	NAME=component->NAME(); \
	if (NAME.ptr()!=TYPE::_nil()) { \
		ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"OK, reference is: %x",NAME.ptr())); \
		ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"OK, reference is: %lx",(long)NAME.ptr())); \
	} \
	else { \
		_EXCPT(ClientErrors::CouldntAccessPropertyExImpl,impl,MODULE_NAME"::Main()"); \
@@ -208,6 +208,7 @@ int main(int argc, char *argv[]) {
	// Component declaration 
	COMPONENT_DECLARATION component;
	DEWAR_DECLARATION dewar;
	bool dewarReady=false;
		

	/* Add frame controls declaration */
@@ -310,9 +311,30 @@ int main(int argc, char *argv[]) {
		goto ErrorLabel;
	}
	component=COMPONENT_INTERFACE::_narrow(obj.in());
	ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"Receivers Boss reference is: %d",component.ptr()));
	ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"Receivers Boss reference is: %ld",(long)component.ptr()));
	ACE_OS::sleep(1);

	try {
		maci::ComponentInfoSeq_var cInfo;
		maci::HandleSeq handles;
		handles.length(0);
		IRA::CString cName,cType;
		cName="";
		cType=DEWAR_INTERFACE_TPYE;
		cInfo=client.manager()->get_component_info(client.handle(),handles,(const char *)cName,
			(const char *)cType,(CORBA::Boolean)false);
		for(unsigned k=0;k<cInfo->length();k++) {
			printf("type: %s\n",(const char *)cInfo[k].type);
			if (cInfo[k].type==DEWAR_INTERFACE_TPYE) {
				ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_NOTICE,"Dewar positioner found"));
				dewarReady=true;
				break;
			}
		}		
	}
	catch (...) {
		dewarReady=false;
	}
	if (dewarReady) {
		try {
			info=client.manager()->get_default_component(client.handle(),DEWAR_INTERFACE_TPYE);
			obj=info->reference;
@@ -322,11 +344,16 @@ int main(int argc, char *argv[]) {
			}
			else {
				dewar=DEWAR_INTERFACE::_narrow(obj.in());
			ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"Dewar reference is: %d",dewar.ptr()));
				ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_DEBUG,"Dewar reference is: %ld",(long)dewar.ptr()));
			}
		}
		catch(...) {
			ACS_LOG(LM_FULL_INFO,MODULE_NAME"::Main()",(LM_NOTICE,"Dewar positioner not available"));
			dewar=DEWAR_INTERFACE::_nil();
		}
	}
	else {
		dewar=DEWAR_INTERFACE::_nil();
	}
	ACE_OS::sleep(1);
	try {
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ void CComponentCore::initialize(maci::ContainerServices* services)
    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_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;
@@ -252,7 +253,7 @@ void CComponentCore::externalCalOff() throw (
void CComponentCore::deactivate() throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl)
{
	// no guard needed.
	
	m_setupMode="";
	/*************************************************************************************/
	/**************************************************************************************/	
	//lnaOff(); // throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl)
+2 −3
Original line number Diff line number Diff line
@@ -411,7 +411,6 @@ void CRecvBossCore::setup(const char * code) throw (ComponentErrors::SocketError
			throw impl;
		}
		changeBossStatus(Management::MNG_OK);
		ACS_LOG(LM_FULL_INFO,"CRecvBossCore::setup()",(LM_NOTICE,"NEW_RECEIVER_CONFIGURED %s",code));		

		m_currentRecvCode="KKC";
		m_currentOperativeMode="NORMAL";
@@ -1214,7 +1213,7 @@ void CRecvBossCore::getBandWidth(ACS::doubleSeq& bw) throw (ComponentErrors::C
		}
		else {
			bw.length(m_bandWidth_.length());
			for (unsigned i=0;i<m_bandWidth_.length();i++) bw[i]=m_bandWidth[i];
			for (unsigned i=0;i<m_bandWidth_.length();i++) bw[i]=m_bandWidth_[i];
		}
	}	
	else {
@@ -1268,7 +1267,7 @@ void CRecvBossCore::getInitialFrequency(ACS::doubleSeq& iFreq) throw (Componen
		}	
		else {
			iFreq.length(m_startFreq_.length());
			for (unsigned i=0;i<m_startFreq_.length();i++) iFreq[i]=m_startFreq[i];
			for (unsigned i=0;i<m_startFreq_.length();i++) iFreq[i]=m_startFreq_[i];
		}	
	}
	else {	
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@

<AvailableReceiver Code="CCC" Derotator="false" Component=""/>

<AvailableReceiver Code="KKC" Derotator="true" Component="RECEIVERS/KBandDualFReceiver"/>
<AvailableReceiver Code="KKC" Derotator="false" Component="RECEIVERS/KBandDualFReceiver"/>

<AvailableReceiver Code="XXP" Derotator="false" Component=""/>

+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
    LNAPort="10001"      
    WatchDogResponseTime="10000000"
    WatchDogSleepTime="10000000"
    LNASamplingTime="1000000"
    LNASamplingTime="250000"
    RepetitionCacheTime="7000000"
    RepetitionExpireTime="10000000"
    LocalOscillatorInstance="RECEIVERS/LO"