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
ef2a2697
Commit
ef2a2697
authored
17 years ago
by
Ruud Overeem
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 1000
Update to protocol change.
parent
9f04cb44
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
MAC/APL/TestCtlr/src/ControllerMenu.cc
+6
-7
6 additions, 7 deletions
MAC/APL/TestCtlr/src/ControllerMenu.cc
MAC/APL/TestCtlr/src/TestController.cc
+6
-14
6 additions, 14 deletions
MAC/APL/TestCtlr/src/TestController.cc
with
12 additions
and
21 deletions
MAC/APL/TestCtlr/src/ControllerMenu.cc
+
6
−
7
View file @
ef2a2697
...
@@ -463,7 +463,7 @@ GCFEvent::TResult ControllerMenu::finish_state(GCFEvent& event, GCFPortInterface
...
@@ -463,7 +463,7 @@ GCFEvent::TResult ControllerMenu::finish_state(GCFEvent& event, GCFPortInterface
// Start ChildControl task
// Start ChildControl task
cout
<<
"Telling controller we are FINISHED ..."
<<
endl
;;
cout
<<
"Telling controller we are FINISHED ..."
<<
endl
;;
string
cntlrName
=
controllerName
(
itsCntlrType
,
0
,
itsObsNr
);
string
cntlrName
=
controllerName
(
itsCntlrType
,
0
,
itsObsNr
);
if
(
!
itsChildControl
->
requestState
(
CTState
::
FINISH
ED
,
cntlrName
,
itsObsNr
,
itsCntlrType
))
{
if
(
!
itsChildControl
->
requestState
(
CTState
::
QUIT
ED
,
cntlrName
,
itsObsNr
,
itsCntlrType
))
{
cout
<<
"Error during state request, bailing out"
<<
endl
;
cout
<<
"Error during state request, bailing out"
<<
endl
;
stop
();
stop
();
}
}
...
@@ -475,16 +475,15 @@ GCFEvent::TResult ControllerMenu::finish_state(GCFEvent& event, GCFPortInterface
...
@@ -475,16 +475,15 @@ GCFEvent::TResult ControllerMenu::finish_state(GCFEvent& event, GCFPortInterface
case
F_DISCONNECTED
:
case
F_DISCONNECTED
:
break
;
break
;
case
CONTROL_FINISH
:
{
case
CONTROL_QUITED
:
{
CONTROLFinishEvent
msg
(
event
);
CONTROLQuitedEvent
msg
(
event
);
cout
<<
endl
<<
"Finish result = "
<<
msg
.
result
<<
endl
;
if
(
msg
.
result
!=
CT_RESULT_NO_ERROR
)
{
if
(
msg
.
result
!=
CT_RESULT_NO_ERROR
)
{
cout
<<
"Bailing out because of the errors."
<<
endl
;
cout
<<
endl
<<
"WARNING: Finish result = "
<<
msg
.
result
<<
endl
;
stop
();
}
}
else
{
else
{
_doActionMenu
()
;
cout
<<
endl
<<
"Finish result = "
<<
msg
.
result
<<
endl
;
}
}
_doActionMenu
();
}
}
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
MAC/APL/TestCtlr/src/TestController.cc
+
6
−
14
View file @
ef2a2697
...
@@ -200,19 +200,19 @@ GCFEvent::TResult TestController::active_state(GCFEvent& event, GCFPortInterface
...
@@ -200,19 +200,19 @@ GCFEvent::TResult TestController::active_state(GCFEvent& event, GCFPortInterface
answer
.
result
=
0
;
answer
.
result
=
0
;
LOG_DEBUG_STR
(
"Sending RELEASED event"
);
LOG_DEBUG_STR
(
"Sending RELEASED event"
);
itsParentPort
->
send
(
answer
);
itsParentPort
->
send
(
answer
);
LOG_DEBUG_STR
(
"Will send
FINISH
event over 6 seconds"
);
LOG_DEBUG_STR
(
"Will send
QUITED
event over 6 seconds"
);
itsState
=
CTState
::
FINISH
;
itsState
=
CTState
::
QUIT
;
itsTimerPort
->
setTimer
(
6.0
);
itsTimerPort
->
setTimer
(
6.0
);
}
}
break
;
break
;
case
CTState
::
FINISH
:
{
case
CTState
::
QUIT
:
{
CONTROL
Finish
Event
msg
;
CONTROL
Quited
Event
msg
;
msg
.
cntlrName
=
itsController
;
msg
.
cntlrName
=
itsController
;
msg
.
treeID
=
7
;
msg
.
treeID
=
7
;
msg
.
errorMsg
=
"Normal Termination"
;
msg
.
errorMsg
=
"Normal Termination"
;
msg
.
result
=
0
;
msg
.
result
=
0
;
LOG_DEBUG_STR
(
"Sending
FINISH
event"
);
LOG_DEBUG_STR
(
"Sending
QUITED
event"
);
itsParentPort
->
send
(
msg
);
itsParentPort
->
send
(
msg
);
}
}
break
;
break
;
...
@@ -286,19 +286,11 @@ GCFEvent::TResult TestController::active_state(GCFEvent& event, GCFPortInterface
...
@@ -286,19 +286,11 @@ GCFEvent::TResult TestController::active_state(GCFEvent& event, GCFPortInterface
case
CONTROL_QUIT
:
{
case
CONTROL_QUIT
:
{
CONTROLQuitEvent
msg
(
event
);
CONTROLQuitEvent
msg
(
event
);
itsController
=
msg
.
cntlrName
;
itsController
=
msg
.
cntlrName
;
itsState
=
CTState
::
FINISH
;
itsState
=
CTState
::
QUIT
;
itsTimerPort
->
setTimer
(
5.0
);
itsTimerPort
->
setTimer
(
5.0
);
}
}
break
;
break
;
case
CONTROL_FINISHED
:
{
CONTROLFinishedEvent
msg
(
event
);
LOG_DEBUG_STR
(
"About to quit"
);
sleep
(
2
);
stop
();
}
break
;
default
:
default
:
LOG_DEBUG
(
"active_state, default"
);
LOG_DEBUG
(
"active_state, default"
);
break
;
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