Skip to content
Snippets Groups Projects
Commit 552f96d5 authored by Ruud Overeem's avatar Ruud Overeem
Browse files

Bug 1000: Removed obsolete code that allocated an ITCPort to the parent-task that was overwritten

later when registerTask was called..
parent 64e9106a
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ GCFITCPort* ParentControl::registerTask(GCFTask* mainTask)
itsMainTaskPort = new GCFITCPort(*mainTask, *this, mainTask->getName(),
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsMainTaskPort, "Can not allocate ITC port for parent-control");
itsMainTaskPort->open(); // will result in F_CONN signal
itsMainTaskPort->open(); // will result in F_CONN signal in main task!!!!
itsSDPort = new GCFTCPPort(*this, MAC_SVCMASK_STARTDAEMON,
GCFPortInterface::SAP, STARTDAEMON_PROTOCOL);
......
......@@ -97,10 +97,6 @@ OnlineControl::OnlineControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
......@@ -83,10 +83,6 @@ PythonControl::PythonControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
itsListener = new GCFTCPPort (*this, "listener", GCFPortInterface::MSPP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsListener, "Cannot allocate TCP for server port");
......
......@@ -96,10 +96,6 @@ OfflineControl::OfflineControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
......@@ -334,6 +334,8 @@ GCFEvent::TResult MACScheduler::active_state(GCFEvent& event, GCFPortInterface&
// Start heartbeat timer.
itsSecondTimer = itsTimerPort->setTimer(1L);
LOG_INFO("MACScheduler now operational");
break;
}
......@@ -420,7 +422,7 @@ GCFEvent::TResult MACScheduler::active_state(GCFEvent& event, GCFPortInterface&
case CONTROL_CONNECTED: {
// The observationController has registered itself at childControl.
CONTROLConnectedEvent conEvent(event);
LOG_DEBUG_STR(conEvent.cntlrName << " is connected, updating SAS)");
LOG_INFO_STR(conEvent.cntlrName << " is connected, updating SAS)");
// Ok, controller is really up, update SAS so that obs will not appear in
// in the SAS list again.
......@@ -439,7 +441,7 @@ GCFEvent::TResult MACScheduler::active_state(GCFEvent& event, GCFPortInterface&
case CONTROL_QUITED: {
// The observationController is going down.
CONTROLQuitedEvent quitedEvent(event);
LOG_DEBUG_STR("Received QUITED(" << quitedEvent.cntlrName << "," << quitedEvent.result << ")");
LOG_INFO_STR("Received QUITED(" << quitedEvent.cntlrName << "," << quitedEvent.result << ")");
// update SAS database.
CMiter theObs(itsControllerMap.find(quitedEvent.cntlrName));
......@@ -458,7 +460,7 @@ GCFEvent::TResult MACScheduler::active_state(GCFEvent& event, GCFPortInterface&
}
// update our administration
LOG_DEBUG_STR("Removing observation " << quitedEvent.cntlrName <<
LOG_INFO_STR("Removing observation " << quitedEvent.cntlrName <<
" from activeList");
// _removeActiveObservation(quitedEvent.cntlrName);
break;
......@@ -656,7 +658,7 @@ void MACScheduler::_updatePlannedList()
// the observation will not be returned in the 'plannedDBlist' anymore.
string cntlrName(controllerName(CNTLRTYPE_OBSERVATIONCTRL, 0, obsID));
if (itsControllerMap.find(cntlrName) == itsControllerMap.end()) {
LOG_DEBUG_STR("Requesting start of " << cntlrName);
LOG_INFO_STR("Requesting start of " << cntlrName);
itsChildControl->startChild(CNTLRTYPE_OBSERVATIONCTRL,
obsID,
0, // instanceNr
......@@ -685,7 +687,7 @@ void MACScheduler::_updatePlannedList()
while (oldObsIter != backupObsList.end()) {
prepIter = itsPreparedObs.find(oldObsIter->first);
if (prepIter != itsPreparedObs.end()) {
LOG_INFO_STR("Removing " << oldObsIter->first << " from the prepared list.");
LOG_DEBUG_STR("Removing " << oldObsIter->first << " from the prepared list.");
itsPreparedObs.erase(prepIter);
}
oldObsIter++;
......
......@@ -119,10 +119,6 @@ ObservationControl::ObservationControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsChildPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
......@@ -85,10 +85,6 @@ BeamControl::BeamControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
......@@ -81,10 +81,6 @@ CalibrationControl::CalibrationControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
......@@ -81,10 +81,6 @@ ClockControl::ClockControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// open port for get/set clock/splitters
itsCommandPort = new GCFTCPPort (*this, MAC_SVCMASK_CLOCKCTRL,
......@@ -258,8 +254,6 @@ GCFEvent::TResult ClockControl::initial_state(GCFEvent& event,
break;
case F_CONNECTED:
ASSERTSTR(&port == itsParentPort, "Received unexpected F_CONNECTED at port " << port.getName());
LOG_INFO_STR("Connected to Parent Control Task");
break;
case F_ACCEPT_REQ:
......@@ -826,7 +820,6 @@ GCFEvent::TResult ClockControl::active_state(GCFEvent& event, GCFPortInterface&
LOG_INFO_STR("Received request to switch the splitters " << (request.splittersOn ? "ON" : "OFF"));
itsSplitterRequest = request.splittersOn;
TRAN (ClockControl::setSplitters_state);
LOG_INFO("@@@@@@@@@@@@@@@");
CLKCTRLSetSplittersAckEvent response;
response.status = CLKCTRL_NO_ERR;
port.send(response);
......
......@@ -103,10 +103,6 @@ StationControl::StationControl(const string& cntlrName) :
// attach to parent control task
itsParentControl = ParentControl::instance();
itsParentPort = new GCFITCPort (*this, *itsParentControl, "ParentITCport",
GCFPortInterface::SAP, CONTROLLER_PROTOCOL);
ASSERTSTR(itsParentPort, "Cannot allocate ITCport for Parentcontrol");
itsParentPort->open(); // will result in F_CONNECTED
// need port for timers.
itsTimerPort = new GCFTimerPort(*this, "TimerPort");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment