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
c96bbc4d
Commit
c96bbc4d
authored
17 years ago
by
Ruud Overeem
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1154: Step4 checkin.
parent
9102651a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
LCS/ACC/ACCbin/configure.in
+4
-0
4 additions, 0 deletions
LCS/ACC/ACCbin/configure.in
LCS/ACC/ACCbin/src/ApplController.cc
+47
-0
47 additions, 0 deletions
LCS/ACC/ACCbin/src/ApplController.cc
LCS/ACC/ACCbin/src/ApplController.h
+3
-0
3 additions, 0 deletions
LCS/ACC/ACCbin/src/ApplController.h
with
54 additions
and
0 deletions
LCS/ACC/ACCbin/configure.in
+
4
−
0
View file @
c96bbc4d
...
...
@@ -56,6 +56,10 @@ lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/TransportHolder.h,,)
lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,)
lofar_INTERNAL(LCS/ACC/ALC,ALC,,1,ALC/ApplControl.h,,)
lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,)
lofar_INTERNAL(MAC/GCF/GCFCommon,GCFCommon,,1,GCF/GCF_ServiceInfo.h,,)
lofar_INTERNAL(MAC/GCF/TM,eventport,,1,GCF/TM/EventPort.h,,)
dnl lofar_INTERNAL(MAC/GCF/TM,gcftm,,1,GCF/TM/GCF_Event.h,,)
lofar_INTERNAL(MAC/APL/APLProtocol,kvt_protocol,,1,APL/APLProtocol/KVT_Protocol.ph,,)
dnl Note: only the test programs depend on the tribool functionality
lofar_EXTERNAL(boost,1,boost/logic/tribool.hpp,"")
...
...
This diff is collapsed.
Click to expand it.
LCS/ACC/ACCbin/src/ApplController.cc
+
47
−
0
View file @
c96bbc4d
...
...
@@ -28,6 +28,8 @@
#include
<Common/LofarLocators.h>
#include
<ALC/ACCmd.h>
#include
<PLC/ProcControlComm.h>
#include
<GCF/GCF_ServiceInfo.h>
#include
<APL/APLProtocol/KVT_Protocol.ph>
#include
"ApplController.h"
#include
"PR_Shell.h"
// TODO: factory!
#include
"PR_MPI.h"
// TODO: factory!
...
...
@@ -36,6 +38,7 @@
#include
"lofarDirs.h"
namespace
LOFAR
{
using
namespace
GCF
::
TM
;
namespace
ACC
{
//
...
...
@@ -52,6 +55,7 @@ ApplController::ApplController(const string& configID) :
itsAPAPool
(
0
),
itsServerStub
(
0
),
itsDaemonComm
(
0
),
itsKVLogger
(
0
),
itsCurTime
(
0
),
itsIsRunning
(
false
),
itsStateEngine
(
new
StateEngine
),
...
...
@@ -89,6 +93,7 @@ ApplController::~ApplController()
if
(
itsAPAPool
)
{
delete
itsAPAPool
;
}
if
(
itsServerStub
)
{
delete
itsServerStub
;
}
if
(
itsDaemonComm
)
{
delete
itsDaemonComm
;
}
if
(
itsKVLogger
)
{
delete
itsKVLogger
;
}
if
(
itsCurACMsg
)
{
delete
itsCurACMsg
;
}
if
(
itsStateEngine
)
{
delete
itsStateEngine
;
}
...
...
@@ -121,6 +126,11 @@ void ApplController::startupNetwork()
itsBootParamSet
->
getString
(
"AC.pinghost"
),
itsBootParamSet
->
getString
(
"AC.pingportnr"
),
itsBootParamSet
->
getString
(
"AC.pingID"
));
// client synchrone
itsKVLogger
=
new
EventPort
(
MAC_SVCMASK_KVTLOGGER
,
false
,
KVT_PROTOCOL
,
""
,
true
);
ASSERTSTR
(
itsKVLogger
,
"Can't connect to KeyValueLogger"
);
itsIsRunning
=
true
;
}
...
...
@@ -172,9 +182,11 @@ void ApplController::handleProcMessage(APAdmin* anAP)
break
;
case
PCCmdParams
:
{
// TODO: Write this information to the >>>> KeyValueLogger <<<<
ParameterSet
resultParam
;
resultParam
.
adoptBuffer
(
DHProcPtr
->
getOptions
());
resultParam
.
writeFile
(
itsObsParamSet
->
getString
(
"ApplCtrl.resultfile"
),
true
);
sendToKVLogger
(
resultParam
);
break
;
}
...
...
@@ -440,6 +452,41 @@ void ApplController::writeResultFile()
}
}
//
// sendToKVLogger(parSet)
//
// Send the KV pairs to the KeyValueLogger
//
void
ApplController
::
sendToKVLogger
(
ParameterSet
&
aResultPS
)
{
// loop over PS and construct a msgpool event.
ParameterSet
::
iterator
iter
=
aResultPS
.
begin
();
ParameterSet
::
iterator
end
=
aResultPS
.
end
();
KVTSendMsgPoolEvent
poolEvent
;
poolEvent
.
seqnr
=
1
;
poolEvent
.
msgCount
=
0
;
while
(
iter
!=
end
)
{
poolEvent
.
keys
.
theVector
.
push_back
(
iter
->
first
);
poolEvent
.
values
.
theVector
.
push_back
(
iter
->
second
);
poolEvent
.
msgCount
++
;
iter
++
;
}
// empty PS?
if
(
!
poolEvent
.
msgCount
)
{
return
;
}
// send message and wait for answer.
itsKVLogger
->
send
(
&
poolEvent
);
KVTSendMsgPoolAckEvent
poolAck
(
*
(
itsKVLogger
->
receive
()));
if
(
poolAck
.
result
!=
0
)
{
LOG_ERROR_STR
(
"Storing metadata in PVSS resulted in errorcode "
<<
poolAck
.
result
);
}
}
//
// startState (newMsg)
//
...
...
This diff is collapsed.
Click to expand it.
LCS/ACC/ACCbin/src/ApplController.h
+
3
−
0
View file @
c96bbc4d
...
...
@@ -38,6 +38,7 @@
#include
<ALC/ApplControlServer.h>
//# communication stub
#include
<PLC/DH_ProcControl.h>
#include
<APS/ParameterSet.h>
#include
<GCF/TM/EventPort.h>
#include
"ACCmdImpl.h"
//# the real implementation
#include
"ACDaemonComm.h"
#include
"CmdStack.h"
...
...
@@ -80,6 +81,7 @@ private:
// it is only meant to avoid code duplication in createParSubsets
void
writeParSubset
(
ParameterSet
ps
,
const
string
&
procName
,
const
string
&
fileName
);
void
writeResultFile
();
void
sendToKVLogger
(
ParameterSet
&
aResultPS
);
void
checkForACCommands
();
void
checkForAPMessages
();
...
...
@@ -101,6 +103,7 @@ private:
APAdminPool
*
itsAPAPool
;
// Communication with all AP's
ApplControlServer
*
itsServerStub
;
// Communication with AM
ACDaemonComm
*
itsDaemonComm
;
// Communication with ACDaemon
GCF
::
TM
::
EventPort
*
itsKVLogger
;
// Connection to KeyValueLogger
time_t
itsCurTime
;
// Current timestamp
bool
itsIsRunning
;
// Alive or not
...
...
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