diff --git a/MAC/APL/APLCommon/src/Controller_Protocol.prot b/MAC/APL/APLCommon/src/Controller_Protocol.prot new file mode 100644 index 0000000000000000000000000000000000000000..2c379a42ea4a02333220d43eefc247fa913f1c84 --- /dev/null +++ b/MAC/APL/APLCommon/src/Controller_Protocol.prot @@ -0,0 +1,231 @@ +//# Controller_Protocol.prot: Protocol definition for the MAC controllers +//# +//# Copyright (C) 2006 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + + +autogen definitions protocol; + +description = "Protocol for LogicalDevice servers"; +prefix = "CONTROL"; // for the signal names +id = "(LOFAR::GCF::TM::F_APL_PROTOCOL+3)"; + +// specify extra include files +// e.g. +// include = '<sys/time.h>'; +include = '<APL/APLCommon/APL_Defines.h>'; + +prelude = << PRELUDE_END +// define namespace and enumerations here + +PRELUDE_END; + +// +// An "event" has a "signal" and a "dir" (direction) +// and zero or more "param"s. +// "dir" can be one of "IN" or "OUT". +// A "param" has a "name" and a "type". +// + +// +// CONNECT - sent by a child after connecting to it's parent to identify itself +// +event = { + signal = CONNECT; + dir = IN; // from child to parent + param = { + name = "name"; + type = "string"; + }; +}; + +// +// CONNECTED - result of the CONNECT request +// +event = { + signal = CONNECTED; + dir = OUT; // from parent to child + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// SCHEDULE - sent by a parent to all childs to inform them of a new schedule or +// a change in the existing schedule +// +event = { + signal = SCHEDULE; + dir = OUT; // from parent to child + param = { + name = "startTime"; + type = "time_t"; + }; + param = { + name = "stopTime"; + type = "time_t"; + }; +}; + +// +// SCHEDULED - result of the SCHEDULE request +// +event = { + signal = SCHEDULED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// CLAIM - sent by a parent to all childs to claim the resources +// +event = { + signal = CLAIM; + dir = OUT; // from parent to child +}; + +// +// CLAIMED - result of the CLAIM request +// +event = { + signal = CLAIMED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// PREPARE - sent by a parent to all childs to prepare itself +// +event = { + signal = PREPARE; + dir = OUT; // from parent to child +}; + +// +// PREPARED - result of the PREPARE request +// +event = { + signal = PREPARED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// RESUME - sent by a parent to all childs to resume itself +// +event = { + signal = RESUME; + dir = OUT; // from parent to child +}; + +// +// RESUMED - result of the RESUME request +// +event = { + signal = RESUMED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// SUSPEND - sent by a parent to all childs to suspend itself +// +event = { + signal = SUSPEND; + dir = OUT; // from parent to child +}; + +// +// SUSPENDED - result of the SUSPEND request +// +event = { + signal = SUSPENDED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// RELEASE - sent by a parent to all childs to release itself +// +event = { + signal = RELEASE; + dir = OUT; // from parent to child +}; + +// +// RELEASED - result of the RELEASE request +// +event = { + signal = RELEASED; + dir = IN; // from child to parent + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + +// +// FINISH - sent by a child to tell its parent it is dying. +// +event = { + signal = FINISH; + dir = IN; // from child to parent + param = { + name = "treeID"; + type = "unsigned int"; + }; + param = { + name = "succesfull"; + type = "bool"; + }; + param = { + name = "errorMsg"; + type = "string"; + }; +}; + +// +// FINISHED - result of the FINISH request +// +event = { + signal = FINISHED; + dir = OUT; // from parent to child + param = { + name = "result"; + type = "APLCommon::TLDResult"; + }; +}; + diff --git a/MAC/APL/APLCommon/src/Makefile.am b/MAC/APL/APLCommon/src/Makefile.am index 5d509cd64467be3aaaa2df64bc59135883847007..cd4f7704f1cb37e6c2a6144230fee373fb4c1e92 100644 --- a/MAC/APL/APLCommon/src/Makefile.am +++ b/MAC/APL/APLCommon/src/Makefile.am @@ -19,7 +19,8 @@ libaplcommon_la_SOURCES = \ PropertySetAnswer.cc \ ResourceAllocator.cc \ LogicalDevice_Protocol.cc \ - StartDaemon_Protocol.cc + StartDaemon_Protocol.cc \ + Controller_Protocol.cc NOINSTHDRS = @@ -37,7 +38,8 @@ EXTRA_DIST = phdir=$(includedir)/APL/APLCommon ph_HEADERS = \ LogicalDevice_Protocol.ph \ - StartDaemon_Protocol.ph + StartDaemon_Protocol.ph \ + Controller_Protocol.ph clean-local: rm -f *.ph diff --git a/MAC/APL/APLCommon/src/StartDaemon_Protocol.prot b/MAC/APL/APLCommon/src/StartDaemon_Protocol.prot index 79f75c7357acac7849513d0e45b4408d0a315340..6d3fd60f1a84e399438711cc6822512febe52fd4 100644 --- a/MAC/APL/APLCommon/src/StartDaemon_Protocol.prot +++ b/MAC/APL/APLCommon/src/StartDaemon_Protocol.prot @@ -85,3 +85,21 @@ event = { }; }; +event = { + signal = NEWPARENT; + dir = IN; + param = { + name = "taskName"; + type = "string"; + }; + param = { + name = "parentHost"; + type = "string"; + }; + param = { + name = "parentService"; + type = "string"; + }; +}; + +