From dc81eb806e2be24fc68ca6ce663f6993217fbb2f Mon Sep 17 00:00:00 2001
From: Ruud Overeem <overeem@astron.nl>
Date: Thu, 23 Nov 2006 15:55:08 +0000
Subject: [PATCH] BugID: 801 Bugfix.

---
 .../StationCU/src/BeamControl/BeamControl.cc  | 12 ++--------
 .../StationCU/src/BeamControl/BeamControl.h   | 23 ++++++++-----------
 2 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
index 83e4e519d64..3ef20250b76 100644
--- a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
+++ b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
@@ -74,14 +74,6 @@ BeamControl::BeamControl(const string&	cntlrName) :
 	itsTreePrefix = globalParameterSet()->getString("prefix");
 	itsInstanceNr = globalParameterSet()->getUint32("_instanceNr");
 
-	// get Observation based information
-	itsStartTime     = time_from_string(globalParameterSet()->
-											 getString("Observation.startTime"));
-	itsStopTime      = time_from_string(globalParameterSet()->
-											 getString("Observation.stopTime"));
-//	itsClaimPeriod   = globalParameterSet()->getTime  ("Observation.claimPeriod");
-//	itsPreparePeriod = globalParameterSet()->getTime  ("Observation.preparePeriod");
-
 	// Instruct codeloggingProcessor
 	LOG_INFO_STR("MACProcessScope: " << itsTreePrefix + cntlrName);
 
@@ -667,8 +659,8 @@ uint16	BeamControl::handleBeamAllocAck(GCFEvent&	event)
 		// key sourceTimes not found: use one fixed angle
 		double	directionAngle1(0.0);
 		double	directionAngle2(0.0);
-		directionAngle1=globalParameterSet()->getDouble(beam+"declination");
-		directionAngle2=globalParameterSet()->getDouble(beam+"rightAscention");
+		directionAngle1=globalParameterSet()->getDouble(beam+"angle1");
+		directionAngle2=globalParameterSet()->getDouble(beam+"angle2");
 
 		beamPointToEvent.pointing.setTime(RTC::Timestamp()); // asap
 		beamPointToEvent.pointing.setDirection(directionAngle1,directionAngle2);
diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControl.h b/MAC/APL/StationCU/src/BeamControl/BeamControl.h
index dedfe74ec64..395dc399b39 100644
--- a/MAC/APL/StationCU/src/BeamControl/BeamControl.h
+++ b/MAC/APL/StationCU/src/BeamControl/BeamControl.h
@@ -92,14 +92,15 @@ private:
 	BeamControl(const BeamControl&);
    	BeamControl& operator=(const BeamControl&);
 
-	int32	convertDirection(const string&	typeName);
-	void	doPrepare();
-	uint16	handleBeamAllocAck(GCFEvent&	event);
-	bool	handleBeamFreeAck(GCFEvent&	event);
-	void	doRelease();
-   	void	_connectedHandler(GCFPortInterface& port);
-   	void	_disconnectedHandler(GCFPortInterface& port);
-	void	setState(CTState::CTstateNr     newState);
+	int32	convertDirection		(const string&	typeName);
+	void	doPrepare				();
+	uint16	handleBeamAllocAck		(GCFEvent&	event);
+	bool	handleBeamFreeAck		(GCFEvent&	event);
+	void	doRelease				();
+
+   	void	_connectedHandler		(GCFPortInterface& port);
+   	void	_disconnectedHandler	(GCFPortInterface& port);
+	void	setState				(CTState::CTstateNr     newState);
 	GCFEvent::TResult	_defaultEventHandler(GCFEvent&	event, GCFPortInterface&	port);
 
    	typedef boost::shared_ptr<GCF::PAL::GCFMyPropertySet> GCFMyPropertySetPtr;
@@ -121,11 +122,7 @@ private:
 	// ParameterSet variables
 	string					itsTreePrefix;
 	uint32					itsInstanceNr;
-	ptime					itsStartTime;
-	ptime					itsStopTime;
-	uint32					itsClaimPeriod;
-	uint32					itsPreparePeriod;
-	uint32					itsBeamID;
+	uint32					itsBeamID;				// returned from BeamServer
 };
 
   };//StationCU
-- 
GitLab