Skip to content
Snippets Groups Projects
Commit 80561d55 authored by Ruud Overeem's avatar Ruud Overeem
Browse files

Bug 1000: Including LofarTypes now in generated ph files so that uint32 et....

Bug 1000: Including LofarTypes now in generated ph files so that uint32 et. al. can be used as parameter types.
parent 5cf13429
No related branches found
No related tags found
No related merge requests found
......@@ -22,18 +22,22 @@
autogen definitions protocol;
description = "Protocol definition for sending LogMessages to a LoggingProcessor";
prefix = "KVT"; // for the signal names
id = "(LOFAR::GCF::TM::F_GCF_PROTOCOL + 1)";
description = "Protocol for sending Key-Value-Time triples to the KeyValueLogger";
prefix = "KVT"; // for the signal names
id = "(LOFAR::GCF::TM::F_GCF_PROTOCOL + 1)";
// specify extra include files
// e.g.
//include = '<sys/time.h>';
//include = '<GCF/GCF_PValue.h>';
//include = '<GCF/GCF_Defines.h>';
include = '<APL/RTCCommon/StringVector.h>';
prelude = << PRELUDE_END
// REGISTER (uint obsID, string name);
// REGISTER_ACK (uint obsID, string name);
// SEND_MSG (uint seqnr, string key, string value);
// SEND_MSG_ACK (uint seqnr, uint result);
// SEND_MSG_POOL (uint seqnr, uint nrMsgs, strVector key, strVector value);
// SEND_MSG_POOL_ACK(uint seqnr, uint result);
PRELUDE_END;
// An "event" has a "signal" and a "dir" (direction)
......@@ -42,12 +46,38 @@ PRELUDE_END;
// A "param" has a "name" and a "type".
//
event = {
signal = REGISTER;
dir = IN;
param = {
name = "obsID";
type = "uint32";
};
param = {
name = "name";
type = "string";
};
};
event = {
signal = REGISTER_ACK;
dir = OUT;
param = {
name = "obsID";
type = "uint32";
};
param = {
name = "name";
type = "string";
};
};
event = {
signal = SEND_MSG;
dir = IN;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "key";
......@@ -64,11 +94,11 @@ event = {
dir = OUT;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "result";
type = "unsigned short";
type = "uint32";
};
};
......@@ -77,11 +107,11 @@ event = {
dir = IN;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "msgCount";
type = "unsigned short";
type = "uint32";
};
param = {
name = "keys";
......@@ -100,11 +130,11 @@ event = {
dir = OUT;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "result";
type = "unsigned short";
type = "uint32";
};
};
......@@ -28,8 +28,6 @@ id = "(LOFAR::GCF::TM::F_GCF_PROTOCOL + 0)";
// specify extra include files
// e.g.
//include = '<sys/time.h>';
include = '<GCF/GCF_PValue.h>';
include = '<GCF/GCF_Defines.h>';
include = '<APL/RTCCommon/StringVector.h>';
prelude = << PRELUDE_END
......@@ -47,7 +45,7 @@ event = {
dir = IN;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "DPname";
......@@ -64,11 +62,11 @@ event = {
dir = OUT;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "result";
type = "unsigned short";
type = "uint32";
};
};
......@@ -77,11 +75,11 @@ event = {
dir = IN;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "msgCount";
type = "unsigned short";
type = "uint32";
};
param = {
name = "DPnames";
......@@ -100,11 +98,11 @@ event = {
dir = OUT;
param = {
name = "seqnr";
type = "unsigned short";
type = "uint32";
};
param = {
name = "result";
type = "unsigned short";
type = "uint32";
};
};
......@@ -47,13 +47,12 @@ namespace LOFAR {
#define MAC_SVCMASK_BEAMSERVER "BeamServer%s:acceptor_v2"
#define MAC_SVCMASK_TBBDRIVER "TBBDriver%s:acceptor"
#define MAC_SVCMASK_RSPCTLFE "RSPCtlFE%s:acceptor"
#define MAC_SVCMASK_KVLDAEMON "KVLDaemon%s:v1.0"
#define MAC_SVCMASK_KVLMASTER "KVLMaster%s:v1.0"
// Define names for the daemons
#define MAC_SVCMASK_SERVICEBROKER "ServiceBroker%s:v1.0"
#define MAC_SVCMASK_STARTDAEMON "StartDaemon%s:v1.0"
#define MAC_SVCMASK_LOGPROC "LogProcessor%s:v1.0"
#define MAC_SVCMASK_KVTLOGGER "KVTLogger%s:v1.0"
// Define names for all controllers
#define MAC_SVCMASK_SCHEDULERCTRL "MACScheduler%s:v1.0"
......
......@@ -25,7 +25,7 @@ autogen definitions protocol;
description = "Protocol for passing PVSSresponses to GCF-tasks";
prefix = "DP"; // for the signal names
id = "(LOFAR::GCF::TM::F_APL_PROTOCOL+1)";
id = "(LOFAR::GCF::TM::F_GCF_PROTOCOL+2)";
// specify extra include files
// e.g.
......
......@@ -17,7 +17,7 @@
//
// [+ (base-name) +].[+ (suffix) +]: [+ description +]
//
// Copyright (C) 2003
// Copyright (C) 2003-2008
// ASTRON (Netherlands Foundation for Research in Astronomy)
// P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//
......@@ -53,6 +53,7 @@ const struct protocolStrings LOFAR::[+ (base-name) +]::[+ protocol-name +]_STRI
[+ FOR include "" +]
#include [+ (get "include") +][+ ENDFOR +]
#include <GCF/TM/GCF_Protocols.h>
#include <Common/LofarTypes.h>
#include <string>
namespace LOFAR
......
......@@ -112,15 +112,16 @@ EventPort::EventPort(const string& aServiceMask,
LOG_DEBUG_STR ("Opening listener on port " << itsPort);
itsListenSocket = new Socket(serviceName, toString(itsPort), Socket::TCP);
itsSocket = itsListenSocket->accept(-1);
itsSocket->setBlocking(false); // assume async.
itsSocket->setBlocking(true); // assume sync. See note.
}
else {
LOG_DEBUG_STR ("Trying to make connection with " << serviceName);
itsSocket = new Socket(serviceName, itsHost, toString(itsPort), Socket::TCP);
itsSocket->connect(1000);
itsSocket->setBlocking(false); // assume async.
itsSocket->setBlocking(true); // assume sync. See note.
}
// Note: sockets are set to blocking. Setting them to non-blocking requires
// different code in receiveEvent().
}
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment