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
8289739c
Commit
8289739c
authored
18 years ago
by
Joris van Zwieten
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 1046
- Fix to use CommandQueue in KernelProcessControl instead of sockets.
parent
f7e34b3b
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
CEP/BB/BBSControl/include/BBSControl/KernelProcessControl.h
+6
-1
6 additions, 1 deletion
CEP/BB/BBSControl/include/BBSControl/KernelProcessControl.h
CEP/BB/BBSControl/src/KernelProcessControl.cc
+19
-9
19 additions, 9 deletions
CEP/BB/BBSControl/src/KernelProcessControl.cc
with
25 additions
and
10 deletions
CEP/BB/BBSControl/include/BBSControl/KernelProcessControl.h
+
6
−
1
View file @
8289739c
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include
<BBSControl/BlobStreamableConnection.h>
#include
<BBSControl/BlobStreamableConnection.h>
#include
<BBSKernel/Prediffer.h>
#include
<BBSKernel/Prediffer.h>
#include
<BBSControl/KernelCommandControl.h>
#include
<BBSControl/KernelCommandControl.h>
#include
<BBSControl/CommandQueue.h>
#include
<BBSControl/BBSStructs.h>
#include
<BBSControl/BBSStructs.h>
namespace
LOFAR
namespace
LOFAR
...
@@ -43,6 +44,7 @@ namespace LOFAR
...
@@ -43,6 +44,7 @@ namespace LOFAR
namespace
BBS
namespace
BBS
{
{
//class CommandQueue;
/*
/*
//# Forward declations
//# Forward declations
class BBSStep;
class BBSStep;
...
@@ -96,6 +98,9 @@ namespace LOFAR
...
@@ -96,6 +98,9 @@ namespace LOFAR
// Command controller.
// Command controller.
KernelCommandControl
itsCommandController
;
KernelCommandControl
itsCommandController
;
// Command Queue
scoped_ptr
<
CommandQueue
>
itsCommandQueue
;
// Parameter set for this process controller.
// Parameter set for this process controller.
ACC
::
APS
::
ParameterSet
itsParameterSet
;
ACC
::
APS
::
ParameterSet
itsParameterSet
;
...
@@ -103,7 +108,7 @@ namespace LOFAR
...
@@ -103,7 +108,7 @@ namespace LOFAR
scoped_ptr
<
Prediffer
>
itsPrediffer
;
scoped_ptr
<
Prediffer
>
itsPrediffer
;
// Connections
// Connections
scoped_ptr
<
BlobStreamableConnection
>
itsControllerConnection
;
//
scoped_ptr<BlobStreamableConnection> itsControllerConnection;
scoped_ptr
<
BlobStreamableConnection
>
itsSolverConnection
;
scoped_ptr
<
BlobStreamableConnection
>
itsSolverConnection
;
// Region of interest
// Region of interest
...
...
This diff is collapsed.
Click to expand it.
CEP/BB/BBSControl/src/KernelProcessControl.cc
+
19
−
9
View file @
8289739c
...
@@ -26,10 +26,10 @@
...
@@ -26,10 +26,10 @@
#include
<lofar_config.h>
#include
<lofar_config.h>
#include
<BBSControl/KernelProcessControl.h>
#include
<BBSControl/KernelProcessControl.h>
#include
<BBSControl/Command.h>
//#include <BBSControl/Command.h>
#include
<BBSControl/BBSStep.h>
/*
/*
#include <BBSControl/BBSStrategy.h>
#include <BBSControl/BBSStrategy.h>
#include <BBSControl/BBSStep.h>
#include <BBSControl/BBSPredictStep.h>
#include <BBSControl/BBSPredictStep.h>
#include <BBSControl/BBSSubtractStep.h>
#include <BBSControl/BBSSubtractStep.h>
#include <BBSControl/BBSCorrectStep.h>
#include <BBSControl/BBSCorrectStep.h>
...
@@ -89,9 +89,11 @@ namespace BBS
...
@@ -89,9 +89,11 @@ namespace BBS
LOG_DEBUG
(
"KernelProcessControl::define()"
);
LOG_DEBUG
(
"KernelProcessControl::define()"
);
try
{
try
{
/*
itsControllerConnection.reset(new BlobStreamableConnection(
itsControllerConnection.reset(new BlobStreamableConnection(
globalParameterSet()->getString("Controller.Host"),
globalParameterSet()->getString("Controller.Host"),
globalParameterSet()->getString("Controller.Port")));
globalParameterSet()->getString("Controller.Port")));
*/
char
*
user
=
getenv
(
"USER"
);
char
*
user
=
getenv
(
"USER"
);
ASSERT
(
user
);
ASSERT
(
user
);
...
@@ -116,6 +118,7 @@ namespace BBS
...
@@ -116,6 +118,7 @@ namespace BBS
LOG_DEBUG
(
"KernelProcessControl::init()"
);
LOG_DEBUG
(
"KernelProcessControl::init()"
);
try
{
try
{
/*
LOG_DEBUG_STR("Trying to connect to controller@"
LOG_DEBUG_STR("Trying to connect to controller@"
<< globalParameterSet()->getString("Controller.Host") << ":"
<< globalParameterSet()->getString("Controller.Host") << ":"
<< globalParameterSet()->getString("Controller.Port" )
<< globalParameterSet()->getString("Controller.Port" )
...
@@ -127,6 +130,9 @@ namespace BBS
...
@@ -127,6 +130,9 @@ namespace BBS
return false;
return false;
}
}
LOG_DEBUG("+ ok");
LOG_DEBUG("+ ok");
*/
itsCommandQueue
.
reset
(
new
CommandQueue
(
globalParameterSet
()
->
getString
(
"BBDB.DBName"
)));
LOG_DEBUG
(
"Trying to connect to solver@localhost"
);
LOG_DEBUG
(
"Trying to connect to solver@localhost"
);
if
(
!
itsSolverConnection
->
connect
())
if
(
!
itsSolverConnection
->
connect
())
...
@@ -154,13 +160,16 @@ namespace BBS
...
@@ -154,13 +160,16 @@ namespace BBS
try
try
{
{
// Receive the next message
// Receive the next message
scoped_ptr
<
BlobStreamable
>
message
(
itsControllerConnection
->
recvObject
());
scoped_ptr
<
BBSStep
>
Command
*
command
=
dynamic_cast
<
step
(
const_cast
<
BBSStep
*>
(
itsCommandQueue
->
getNextStep
()));
Command
*>
(
message
.
get
());
//scoped_ptr<BlobStreamable>
//message(itsControllerConnection->recvObject());
if
(
command
)
//Command *command = dynamic_cast<
//Command*>(message.get());
if
(
step
)
{
{
command
->
accept
(
itsCommandController
);
step
->
accept
(
itsCommandController
);
return
true
;
return
true
;
}
}
else
else
...
@@ -169,7 +178,8 @@ Command*>(message.get());
...
@@ -169,7 +178,8 @@ Command*>(message.get());
catch
(
Exception
&
e
)
catch
(
Exception
&
e
)
{
{
LOG_ERROR_STR
(
e
);
LOG_ERROR_STR
(
e
);
itsControllerConnection
->
sendObject
(
BBSStatus
(
BBSStatus
::
ERROR
,
e
.
message
()));
// itsControllerConnection->sendObject(BBSStatus(BBSStatus::ERROR,
//e.message()));
return
false
;
return
false
;
}
}
}
}
...
...
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