diff --git a/Medicina/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml b/Medicina/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml index 19f94869af329dfcb1cf986bf382912edfdefa0d..7b82f66e96da595bc38a4d915798ad1e73297964 100644 --- a/Medicina/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml +++ b/Medicina/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml @@ -23,7 +23,7 @@ LNAPort="10001" VertexIPAddress="192.168.51.2" VertexPort="2096" - VertexCommand="proc kkc\n" + VertexCommand="proc kkc" WatchDogResponseTime="10000000" WatchDogSleepTime="10000000" LNASamplingTime="250000" diff --git a/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml b/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml index 22484033b841f8bb3b30b282eec61e29b6d08dcc..6bf968be04b3c2d8524dec615b8712127eada212 100644 --- a/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml +++ b/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml @@ -19,7 +19,7 @@ LNAPort="10001" VertexIPAddress="192.168.51.2" VertexPort="2096" - VertexCommand="proc kkc\n" + VertexCommand="proc kkc" WatchDogResponseTime="10000000" WatchDogSleepTime="10000000" LNASamplingTime="25000000" diff --git a/Medicina/Libraries/MedicinaVertexLibrary/include/MedicinaVertex.h b/Medicina/Libraries/MedicinaVertexLibrary/include/MedicinaVertex.h index 41a3ec9324dba4ddbe4292bad0d05bf1c2c9b64d..522d217c2a2024840f5d0ceb5fdef1fecc21beab 100644 --- a/Medicina/Libraries/MedicinaVertexLibrary/include/MedicinaVertex.h +++ b/Medicina/Libraries/MedicinaVertexLibrary/include/MedicinaVertex.h @@ -18,7 +18,7 @@ public: virtual ~CMedicinaVertex(); inline IRA::CString getLastErrorMessage() const { return m_lastErrorMessage; } - bool sendTo(const void *buffer,int size); + bool sendTo(const IRA::CString& buffer,int size); protected: IRA::CString m_vertexAddr; @@ -30,4 +30,4 @@ protected: -#endif \ No newline at end of file +#endif diff --git a/Medicina/Libraries/MedicinaVertexLibrary/src/MedicinaVertex.cpp b/Medicina/Libraries/MedicinaVertexLibrary/src/MedicinaVertex.cpp index c5c7fac17cc20a9c5b7a347383911bb047754f23..2099d340970168db4f8bf5573a85246a00cf910c 100644 --- a/Medicina/Libraries/MedicinaVertexLibrary/src/MedicinaVertex.cpp +++ b/Medicina/Libraries/MedicinaVertexLibrary/src/MedicinaVertex.cpp @@ -9,12 +9,17 @@ CMedicinaVertex::~CMedicinaVertex() { } -bool CMedicinaVertex::sendTo(const void *buffer,int size) +bool CMedicinaVertex::sendTo(const IRA::CString& buffer,int size) { int count; char readout[128]; + IRA::CString sendBuffer; + int sendSize; m_err.Reset(); try { + sendBuffer=buffer; + sendBuffer+=" \n"; + sendSize=sendBuffer.GetLength(); if (m_sock.Create(m_err,IRA::CSocket::STREAM)!=IRA::CSocket::SUCCESS) { m_lastErrorMessage.Format("Cannot create socket with error code %d",m_err.getErrorCode()); return false; @@ -23,7 +28,7 @@ bool CMedicinaVertex::sendTo(const void *buffer,int size) m_lastErrorMessage.Format("Cannot connect with error code %d",m_err.getErrorCode()); return false; } - if (m_sock.Send(m_err,buffer,size)!=(int)size) { + if (m_sock.Send(m_err,(const char *)sendBuffer,sendSize)!=(int)sendSize) { m_lastErrorMessage.Format("Error code %d while sending data",m_err.getErrorCode()); return false; } @@ -44,4 +49,4 @@ bool CMedicinaVertex::sendTo(const void *buffer,int size) return false; } return true; -} \ No newline at end of file +} diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp index a3908b6727e579a1bac906d44c691f4bc1e20d57..b0be7b241fef0d027c15aa65e2f73f137c522ff9 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp @@ -136,7 +136,7 @@ void MedicinaKBandDualFCore::setMode(const char * mode) throw ( setLO(lo); if (m_medConfig.getVertexCommand()!="") { int size=m_medConfig.getVertexCommand().GetLength(); - if (!vertex.sendTo((const char *)m_medConfig.getVertexCommand(),size)) { + if (!vertex.sendTo(m_medConfig.getVertexCommand(),size)) { ACS_LOG(LM_FULL_INFO,"MedicinaKBandDualFCore::setMode()", (LM_ERROR,"Vertex Communication Error: %s",(const char *)vertex.getLastErrorMessage())); CUSTOM_LOG(LM_FULL_INFO,"MedicinaKBandDualFCore::setMode()",