Commit 32b7ee4b authored by Carlo Migoni's avatar Carlo Migoni
Browse files

DBBC component upgrade

parent 1a263282
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ virtual ACS::ROlong_ptr sectionsNumber() throw (CORBA::SystemException);

virtual ACS::ROlongSeq_ptr inputSection() throw (CORBA::SystemException);

virtual char * command(const char *configCommand) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx){IRA::CString out;return CORBA::string_dup((const char *)out);};  
//virtual char * command(const char *configCommand) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx){IRA::CString out;return CORBA::string_dup((const char *)out);};  
		

virtual void setSection (CORBA::Long input,CORBA::Double freq,CORBA::Double bw, CORBA::Long feed,CORBA::Long pol,CORBA::Double sr,CORBA::Long bins) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,BackendsErrors::BackendsErrorsEx){ };


CORBA::Boolean command(const char *configCommand, CORBA::String_out answer) throw (CORBA::SystemException);

virtual ACS::ROuLongLong_ptr time() throw (CORBA::SystemException);
virtual ACS::ROstring_ptr backendName() throw (CORBA::SystemException);
+30 −0
Original line number Diff line number Diff line
@@ -104,6 +104,36 @@ void DBBCImpl::initialize()
    }
}

CORBA::Boolean DBBCImpl::command(const char *configCommand, CORBA::String_out answer) 
	throw (CORBA::SystemException)
{
	AUTO_TRACE("DBBCImpl::command()");
	IRA::CString out;
	//IRA::CString in("");
	bool res;
	//CSecAreaResourceWrapper<CCommandLine> line=m_commandLine->Get();
	//in=IRA::CString(configCommand);
	try {
		//m_parser->run(configCommand,out);
		res = true;
	}
	catch (ParserErrors::ParserErrorsExImpl &ex) {
		/*_ADD_BACKTRACE(ManagementErrors::CommandLineErrorExImpl,impl,ex,"XBackendsImpl::command()");
		impl.setCommand(configCommand);
		impl.setErrorMessage((const char *)out);
		impl.log(LM_DEBUG);
		throw impl.getCommandLineErrorEx();*/
		res = false;
	}
	catch (ACSErr::ACSbaseExImpl& ex) {
		ex.log(LM_ERROR); // the errors resulting from the execution are logged here as stated in the documentation of CommandInterpreter interface, while the parser errors are never logged.
		res=false;
	}
	answer=CORBA::string_dup((const char *)out);
	return res;
	//return CORBA::string_dup((const char *)out);
}

// Il codice seguente va messo sempre, sono le properties ereditate dal Generic Backend. E' una macro, definita in Definitions.h (cvs/Common/Libraries/IRALibrary/include) che serve per creare la properties
_PROPERTY_REFERENCE_CPP(DBBCImpl,ACS::ROuLongLong,m_ptime,time); 
_PROPERTY_REFERENCE_CPP(DBBCImpl,ACS::ROstring,m_pbackendName,backendName);