Commit 21ddc011 authored by Andrea Orlat's avatar Andrea Orlat
Browse files

NotoReceivers component, tests tone on and off

parent 98489c93
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ void CComponentCore::calOff() throw (ReceiversErrors::FocusSelectorErrorExImpl,C

void CComponentCore::antennaUnitOff() throw (ReceiversErrors::AntennaUnitErrorExImpl)
{
	CTone tone(m_configuration.getHPIBIPAddress(),m_configuration.getHPIBPort(),2000000);
	CTone tone(m_configuration.getHPIBIPAddress(),m_configuration.getHPIBPort(),20000000);
	try {
		tone.init();
	}
@@ -241,7 +241,7 @@ void CComponentCore::antennaUnitOn() throw (ReceiversErrors::AntennaUnitErrorExI
		throw impl;
	}
	try {
		tone.turnOff();
		tone.turnOn();
	}
	catch (ComponentErrors::IRALibraryResourceExImpl& ex) {
		_ADD_BACKTRACE(ReceiversErrors::AntennaUnitErrorExImpl,impl,ex,"CComponentCore::antennaUnitOn()");
+4 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ void CTone::turnOn() throw (ComponentErrors::IRALibraryResourceExImpl)
		throw dummy;
	}
	strcpy(buffer,TURN_ON_CMD);
	total=strlen(buffer)+1;
	total=strlen(buffer);
	if (m_socket.Send(err,(const void *)buffer,total)<total) {
		_EXCPT_FROM_ERROR(ComponentErrors::IRALibraryResourceExImpl,dummy,err);
		dummy.setCode(err.getErrorCode());
@@ -72,8 +72,9 @@ void CTone::turnOff() throw (ComponentErrors::IRALibraryResourceExImpl)
		throw dummy;
	}
	strcpy(buffer,TURN_OFF_CMD);
	total=strlen(buffer)+1;
	if (m_socket.Send(err,(const void *)buffer,total)<total) {
	total=strlen(buffer);
	int res=m_socket.Send(err,buffer,total);
	if (res<total) {
		_EXCPT_FROM_ERROR(ComponentErrors::IRALibraryResourceExImpl,dummy,err);
		dummy.setCode(err.getErrorCode());
		dummy.setDescription((const char*)err.getDescription());