From 6923892cb2001d247e978fa03d51395da4882b8c Mon Sep 17 00:00:00 2001
From: Pieter Donker <donker@astron.nl>
Date: Mon, 6 Dec 2010 15:37:15 +0000
Subject: [PATCH] Bug 335: changed TBBControl

---
 MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc        |  6 +++---
 MAC/APL/StationCU/src/TBBControl/TBBControl.cc | 12 +-----------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
index 931790a96e2..06f5eccdc81 100644
--- a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
+++ b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.cc
@@ -534,7 +534,7 @@ GCFEvent::TResult TBBDriver::idle_state(GCFEvent& event, GCFPortInterface& port)
 		} break;
 
 		case F_DISCONNECTED: {
-			LOG_DEBUG_STR("DISCONNECTED: port ''" << port.getName() << "'");
+			LOG_DEBUG_STR("DISCONNECTED: port '" << port.getName() << "'");
 			port.close();
 
 			if (&port == &itsAcceptor) {
@@ -872,7 +872,7 @@ bool TBBDriver::CheckAlive(GCFEvent& event, GCFPortInterface& port)
 			
 			// if board was busy last 30 seconds, don't check alive
 			if (TS->isBoardUsed(nr)) {
-			    LOG_INFO_STR(formatString("board %d is used last 30 seconds, no alive check needed", nr));
+			    LOG_DEBUG_STR(formatString("board %d is used last 30 seconds, no alive check needed", nr));
 				sendmask |= (1 << nr);
 				activeboards |= (1 << nr);
 			}
@@ -881,7 +881,7 @@ bool TBBDriver::CheckAlive(GCFEvent& event, GCFPortInterface& port)
 					 (TS->getBoardState(nr) == boardReady) ||
 					 (TS->getBoardState(nr) == boardError) ||
 					 (TS->getBoardState(nr) == boardCleared)) {
-			    LOG_INFO_STR(formatString("board %d alive check needed", nr));
+			    LOG_DEBUG_STR(formatString("board %d alive check needed", nr));
 				itsBoard[nr].send(tp_event);
 				sendmask |= (1 << nr);
 			}
diff --git a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
index 2364d1b42c6..faa317f7e46 100644
--- a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
+++ b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
@@ -1404,23 +1404,13 @@ GCFEvent::TResult TBBControl::quiting_state(GCFEvent& event, GCFPortInterface& p
 			itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString(""));
 			// disconnect from TBBDriver
 			itsTBBDriver->close();
-		} break;
-
-		case F_INIT:
-		case F_EXIT: {
-		} break;
-
-		case F_DISCONNECTED: {      // propably from beamserver
-			port.close();
-			ASSERTSTR (&port == itsTBBDriver,
-									"F_DISCONNECTED event from port " << port.getName());
+			
 			LOG_INFO("Connection with TBBDriver down, sending QUITED to parent");
 			CONTROLQuitedEvent request;
 			request.cntlrName = getName();
 			request.result    = CT_RESULT_NO_ERROR;
 			itsParentPort->send(request);
 			itsTimerPort->setTimer(1.0);  // wait 1 second to let message go away
-
 		} break;
 
 		case F_TIMER: {
-- 
GitLab