Commit 4da6a1a7 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

Fix issue 550 (#554)

* Fix issue #550: a) fixed acscommendcenter procedure for the system boot up. b) changed the target IP for TotalPower backend

* fix issue #550: c) Dimed configuration. d) seupup procedures to include dmed e) Kband receiver configuration f) Local Oscillator configuration g) system makefile

* fix issue #550: f) Medicina pointing model now up to date. g) receivers configuration updated to reflect present status

* fix issue #550: matching commetn in PR
parent 7d6257ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@

#define _CURRENT_VERSION_MAJOR 1
#define _CURRENT_VERSION_MINOR 0
#define _CURRENT_VERSION_REVISION 6

#define _CURRENT_PRODUCT "DISCOS"

@@ -39,6 +40,7 @@ class CurrentVersion {
public:
	static WORD major;
	static WORD minor;
	static WORD revision;
	static IRA::CString station;
	static IRA::CString product;
	static IRA::CString getVersion();
+3 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@ using namespace DiscosVersion;
IRA::CString CurrentVersion::getVersion()
{
	IRA::CString value;
	value.Format("%s-%d.%d.%s",(const char *)CurrentVersion::product,CurrentVersion::major,CurrentVersion::minor,(const char *)CurrentVersion::station);
	value.Format("%s-%d.%d.%d.%s",(const char *)CurrentVersion::product,CurrentVersion::major,
	  CurrentVersion::minor,CurrentVersion::revision,(const char *)CurrentVersion::station);
	return value;
}

@@ -14,6 +15,7 @@ IRA::CString CurrentVersion::product = IRA::CString(_CURRENT_PRODUCT);
IRA::CString CurrentVersion::station = IRA::CString(_STATION);
WORD CurrentVersion::minor = _CURRENT_VERSION_MINOR; 
WORD CurrentVersion::major = _CURRENT_VERSION_MAJOR;
WORD CurrentVersion::revision = _CURRENT_VERSION_REVISION;


+2 −2
Original line number Diff line number Diff line
@@ -416,8 +416,8 @@ private:

#ifdef COMPILE_TARGET_MED
	void setup(const char * code) throw(ComponentErrors::SocketErrorExImpl,ComponentErrors::ValidationErrorExImpl);
	bool sendToRecvControl(const void *buffer,unsigned size);
	bool sendToFS(const void *buffer,unsigned size);
	bool sendToRecvControl(const void *buffer,int size);
	bool sendToFS(const void *buffer,int size);

#elif COMPILE_TARGET_NT
	void setup(const char * code) throw(ComponentErrors::SocketErrorExImpl,ComponentErrors::ValidationErrorExImpl);
+21 −11
Original line number Diff line number Diff line
//#define RB_DEBUG

#define RECV_ADDRESS "192.167.189.2"
#define RECV_ADDRESS "192.168.51.2"
#define RECV_PORT 2096
#define FS_ADDRESS "192.167.189.62"
#define FS_ADDRESS "192.168.51.14"
#define FS_PORT 5002
#define SXKL_ADDRESS "192.167.189.2"
#define SXKL_ADDRESS "192.168.51.2"
#define SXKL_PORT 9876


@@ -109,7 +109,7 @@ void CRecvBossCore::calOn() throw (ComponentErrors::ValidationErrorExImpl,Compon
	}
	else if (m_currentRecvCode=="XXP") {
		// turn the marca on through the FS
		IRA::CString fsBuffer("sxkl=*,on\n");
		IRA::CString fsBuffer("calon\n");
		if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) {
			_EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::calOn()");
			m_status=Management::MNG_FAILURE;
@@ -173,7 +173,7 @@ void CRecvBossCore::calOff() throw (ComponentErrors::ValidationErrorExImpl,Compo
	}
	else if (m_currentRecvCode=="XXP") {
		// turn the marca on through thr FS
		IRA::CString fsBuffer("sxkl=*,off\n");
		IRA::CString fsBuffer("caloff\n");
		if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) {
			_EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::calOff()");
			m_status=Management::MNG_FAILURE;
@@ -334,6 +334,13 @@ void CRecvBossCore::setup(const char * code) throw (ComponentErrors::SocketError
			m_currentRecvError=true;
			throw impl;
		}
		// now set the subreflector configuration through the FS
		IRA::CString fsBuffer("scu=kkc\n");
		if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) {
			_EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::setup()");
			m_status=Management::MNG_FAILURE;
			throw impl;
		}
		changeBossStatus(Management::MNG_OK);

		m_currentRecvCode="KKC";
@@ -1322,29 +1329,32 @@ void CRecvBossCore::publishData() throw (ComponentErrors::NotificationChannelErr
	}
}

bool CRecvBossCore::sendToRecvControl(const void *buffer,unsigned size)
bool CRecvBossCore::sendToRecvControl(const void *buffer,int size)
{
	IRA::CSocket sock;
	IRA::CError err;
	char readout[128];
	IRA::CString recvIpAddr(RECV_ADDRESS);
	DWORD recvPort=RECV_PORT;
	int count;
	try {
		if (sock.Create(err,IRA::CSocket::STREAM)!=IRA::CSocket::SUCCESS) {
			return false;
		}
		if (sock.setSockMode(err,IRA::CSocket::NONBLOCKING)==IRA::CSocket::FAIL) {
		/*if (sock.setSockMode(err,IRA::CSocket::NONBLOCKING)==IRA::CSocket::FAIL) {
			return false;
		}
		}*/
		if (sock.Connect(err,recvIpAddr,recvPort)==IRA::CSocket::FAIL) {
			return false;
		}
		if (sock.Send(err,buffer,size)!=(int)size) {
			return false;
		}
		if (sock.Receive(err,(void *)readout,128)==IRA::CSocket::FAIL) {
		count=sock.Receive(err,(void *)readout,128);
		if (count==IRA::CSocket::FAIL) {
			return false;
		}
		readout[count]=0;
		if (strcmp(readout,"ACK\n")!=0) {
			return false;
		} 	
@@ -1356,7 +1366,7 @@ bool CRecvBossCore::sendToRecvControl(const void *buffer,unsigned size)
	return true;
}

bool CRecvBossCore::sendToFS(const void *buffer,unsigned size)
bool CRecvBossCore::sendToFS(const void *buffer,int size)
{
	IRA::CSocket sock;
	IRA::CError err;
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
               RepetitionCacheTime="2000000"
               RepetitionExpireTime="5000000"
               DataPort="6001"
               DataIPAddress="192.168.51.104"            	   
               DataIPAddress="192.168.51.100"            	   
               DataLatency="3000000"
               SenderSleepTime="300000"
               SenderResponseTime="1000000"
Loading