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
4f59e83f
Commit
4f59e83f
authored
9 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Task #6883: Allow multiple observations to reach CLAIM phase
parent
b3dc3731
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MAC/APL/StationCU/src/StationControl/StationControl.cc
+20
-6
20 additions, 6 deletions
MAC/APL/StationCU/src/StationControl/StationControl.cc
with
20 additions
and
6 deletions
MAC/APL/StationCU/src/StationControl/StationControl.cc
+
20
−
6
View file @
4f59e83f
...
...
@@ -700,7 +700,7 @@ GCFEvent::TResult StationControl::operational_state(GCFEvent& event, GCFPortInte
// In the claim state station-wide changes are activated.
if
(
event
.
signal
==
CONTROL_CLAIM
)
{
if
(
its
ClaimSequence
==
0
)
{
if
(
its
StartingObs
!=
theObs
)
{
itsStartingObs
=
theObs
;
TRAN
(
StationControl
::
startObservation_state
);
queueTaskEvent
(
event
,
port
);
...
...
@@ -788,6 +788,12 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor
*/
switch
(
event
.
signal
)
{
case
F_ENTRY
:
{
itsClaimSequence
=
1
;
itsClaimTimerPort
->
setTimer
(
0.0
);
}
break
;
case
CONTROL_CLAIM
:
{
// defer the setup to the timer eventa
// NOTE: StationControl can receive multiple CLAIM requests. Example:
...
...
@@ -795,10 +801,19 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor
// * Station receives PREPARE (due to state sync errors?)
// * Station will replay PREPARE -> CLAIM
// So we ONLY start the ClaimTimer if the ClaimSequence was not yet started
if
(
itsClaimSequence
==
0
)
{
itsClaimSequence
++
;
itsClaimTimerPort
->
setTimer
(
0.0
);
}
CONTROLCommonEvent
ObsEvent
(
event
);
// we just need the name
uint16
instanceNr
=
getInstanceNr
(
ObsEvent
.
cntlrName
);
OTDBtreeIDType
treeID
=
getObservationNr
(
ObsEvent
.
cntlrName
);
string
cntlrName
=
controllerName
(
CNTLRTYPE_STATIONCTRL
,
instanceNr
,
treeID
);
CTState
CTS
;
ObsIter
theObs
=
itsObsMap
.
find
(
cntlrName
);
if
(
theObs
!=
itsStartingObs
)
{
// CLAIM is for a different observation
LOG_DEBUG_STR
(
"Postponing event "
<<
eventName
(
event
)
<<
" till operational state"
);
return
(
GCFEvent
::
NEXT_STATE
);
}
}
break
;
...
...
@@ -952,7 +967,6 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor
}
break
;
case
F_ENTRY
:
case
F_EXIT
:
break
;
...
...
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