Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
3f320135
Commit
3f320135
authored
18 years ago
by
Ruud Overeem
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 801
Extended PVSS propertySet with a couple of fields.
parent
7881b1cb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MAC/APL/StationCU/src/BeamControl/BeamControl.cc
+40
-6
40 additions, 6 deletions
MAC/APL/StationCU/src/BeamControl/BeamControl.cc
MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h
+7
-0
7 additions, 0 deletions
MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h
with
47 additions
and
6 deletions
MAC/APL/StationCU/src/BeamControl/BeamControl.cc
+
40
−
6
View file @
3f320135
...
...
@@ -240,6 +240,13 @@ GCFEvent::TResult BeamControl::initial_state(GCFEvent& event,
LOG_TRACE_FLOW
(
"Updateing state to PVSS"
);
itsPropertySet
->
setValue
(
PVSSNAME_FSM_STATE
,
GCFPVString
(
"initial"
));
itsPropertySet
->
setValue
(
PVSSNAME_FSM_ERROR
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_CONNECTED
,
GCFPVBool
(
false
));
itsPropertySet
->
setValue
(
PN_BC_SUBBANDLIST
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_BEAMLETLIST
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLE1
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLE2
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLETIMES
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_BEAMID
,
GCFPVInteger
(
0
));
// Start ParentControl task
LOG_DEBUG
(
"Enabling ParentControl task and wait for my name"
);
...
...
@@ -294,6 +301,7 @@ GCFEvent::TResult BeamControl::started_state(GCFEvent& event, GCFPortInterface&
// update PVSS
// itsPropertySet->setValue(string(PVSSNAME_FSM_STATE),GCFPVString("started"));
itsPropertySet
->
setValue
(
PVSSNAME_FSM_ERROR
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_CONNECTED
,
GCFPVBool
(
false
));
break
;
}
...
...
@@ -306,6 +314,7 @@ GCFEvent::TResult BeamControl::started_state(GCFEvent& event, GCFPortInterface&
<<
port
.
getName
());
itsTimerPort
->
cancelAllTimers
();
LOG_INFO
(
"Connected with BeamServer, going to claimed state"
);
itsPropertySet
->
setValue
(
PN_BC_CONNECTED
,
GCFPVBool
(
true
));
setState
(
CTState
::
CLAIMED
);
sendControlResult
(
*
itsParentPort
,
CONTROL_CLAIMED
,
getName
(),
CT_RESULT_NO_ERROR
);
TRAN
(
BeamControl
::
claimed_state
);
// go to next state.
...
...
@@ -622,6 +631,20 @@ void BeamControl::doPrepare()
LOG_DEBUG_STR
(
"Sending Alloc event to BeamServer"
);
itsBeamServer
->
send
(
beamAllocEvent
);
// will result in BS_BEAMALLOCACK;
// store values in PVSS for operator
itsPropertySet
->
setValue
(
PN_BC_SUBBANDLIST
,
GCFPVString
(
APLUtilities
::
compactedArrayString
(
globalParameterSet
()
->
getString
(
"Observation.subbandList"
))));
itsPropertySet
->
setValue
(
PN_BC_BEAMLETLIST
,
GCFPVString
(
APLUtilities
::
compactedArrayString
(
globalParameterSet
()
->
getString
(
"Observation.beamletList"
))));
itsPropertySet
->
setValue
(
PN_BC_ANGLE1
,
GCFPVString
(
globalParameterSet
()
->
getString
(
"Observation.Beam.angle1"
)));
itsPropertySet
->
setValue
(
PN_BC_ANGLE2
,
GCFPVString
(
globalParameterSet
()
->
getString
(
"Observation.Beam.angle2"
)));
itsPropertySet
->
setValue
(
PN_BC_ANGLETIMES
,
GCFPVString
(
globalParameterSet
()
->
getString
(
"Observation.Beam.angleTimes"
)));
}
//
...
...
@@ -636,6 +659,7 @@ uint16 BeamControl::handleBeamAllocAck(GCFEvent& event)
return
(
CT_RESULT_BEAMALLOC_FAILED
);
}
itsBeamID
=
ackEvent
.
handle
;
itsPropertySet
->
setValue
(
PN_BC_BEAMID
,
GCFPVInteger
(
itsBeamID
));
// read new angles from parameterfile.
vector
<
string
>
sourceTimes
;
...
...
@@ -698,11 +722,21 @@ void BeamControl::doRelease()
//
bool
BeamControl
::
handleBeamFreeAck
(
GCFEvent
&
event
)
{
//TODO BSBeamfreeackEvent ack(event);
//TODO if (ack.status != 0 || ack.handle != ...beamID...) {
//TODO errorCode = CT_RESULT_BEAMFREE_ERROR;
//TODO LOG_ERROR_STR("Beamlet de-allocation failed with errorcode: " << ack.status);
//TODO }
BSBeamfreeackEvent
ack
(
event
);
if
(
ack
.
status
!=
0
||
ack
.
handle
!=
itsBeamID
)
{
LOG_ERROR_STR
(
"Beamlet de-allocation failed with errorcode: "
<<
ack
.
status
);
itsPropertySet
->
setValue
(
PVSSNAME_FSM_ERROR
,
GCFPVString
(
"De-allocation of the beamlet failed."
));
return
(
false
);
}
// clear beam in PVSS
itsPropertySet
->
setValue
(
PN_BC_SUBBANDLIST
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_BEAMLETLIST
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLE1
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLE2
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_ANGLETIMES
,
GCFPVString
(
""
));
itsPropertySet
->
setValue
(
PN_BC_BEAMID
,
GCFPVInteger
(
0
));
return
(
true
);
}
...
...
@@ -720,7 +754,7 @@ GCFEvent::TResult BeamControl::_defaultEventHandler(GCFEvent& event,
switch
(
event
.
signal
)
{
case
CONTROL_CONNECT
:
case
CONTROL_RESYNC
:
case
CONTROL_SCHEDULE
:
// we should do something with this
case
CONTROL_SCHEDULE
:
//
TODO:
we should do something with this
case
CONTROL_CLAIM
:
case
CONTROL_PREPARE
:
case
CONTROL_RESUME
:
...
...
This diff is collapsed.
Click to expand it.
MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h
+
7
−
0
View file @
3f320135
...
...
@@ -31,6 +31,13 @@ namespace LOFAR {
#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl"
#define PST_BEAM_CTRL "BeamCtrl"
#define PN_BC_CONNECTED "connected"
#define PN_BC_SUBBANDLIST "subbandList"
#define PN_BC_BEAMLETLIST "beamletList"
#define PN_BC_SUBARRAY "subArray"
#define PN_BC_ANGLE1 "angle1"
#define PN_BC_ANGLE2 "angle2"
#define PN_BC_ANGLETIMES "angleTimes"
#define PN_BC_BEAMID "beamID"
// next lines should be defined somewhere in Common.
#define PVSSNAME_FSM_STATE "state"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment