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

Bug 1000: Added new protocol so that the StationController and the...

Bug 1000: Added new protocol so that the StationController and the ClockController can chat which each other.
parent 2feb6423
No related branches found
No related tags found
No related merge requests found
...@@ -355,6 +355,7 @@ MAC/APL/RTDBCommon/src/RTDButilities.cc -text ...@@ -355,6 +355,7 @@ MAC/APL/RTDBCommon/src/RTDButilities.cc -text
MAC/APL/RTDBCommon/test/Makefile.am -text MAC/APL/RTDBCommon/test/Makefile.am -text
MAC/APL/RTDBCommon/test/tRTDButilities.cc -text MAC/APL/RTDBCommon/test/tRTDButilities.cc -text
MAC/APL/RTDBCommon/test/tRTDButilities.h -text MAC/APL/RTDBCommon/test/tRTDButilities.h -text
MAC/APL/StationCU/src/ClockProtocol/Clock_Protocol.prot -text
MAC/APL/StationCU/src/HardwareMonitor/EC_Protocol.prot -text MAC/APL/StationCU/src/HardwareMonitor/EC_Protocol.prot -text
MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitor.conf -text MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitor.conf -text
MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc -text MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc -text
......
//# ClockControl_Protocol.prot: Protocol definition for the ClockController
//#
//# Copyright (C) 2009
//# 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: Controller_Protocol.prot 11042 2008-03-21 08:35:15Z overeem $
autogen definitions protocol;
description = "Protocol for the ClockController of the station";
prefix = "CLKCTRL"; // for the signal names
id = "(LOFAR::MACIO::F_APL_PROTOCOL+1)";
// specify extra include files
// e.g.
// include = '<sys/time.h>';
include = '<Common/lofar_bitset.h>';
include = '<Common/LofarConstants.h>';
include = '<APL/APLCommon/ControllerDefines.h>';
prelude = << PRELUDE_END
// The following messages are defined in the Controller protocol:
//
// GET_CLOCK ()
// GET_CLOCK_ACK (int clock)
// SET_CLOCK (int clock)
// SET_CLOCK_ACK (int status)
//
// GET_SPLITTERS ()
// GET_SPLITTERS_ACK (bitset splitters)
// SET_SPLITTERS (bool splittersOn)
// SET_SPLITTERS_ACK (int status, bitset splitters)
//
PRELUDE_END;
error = {
id = NO;
msg = "No errors";
};
error = {
id = CLOCKFREQ;
msg = "Invalid clock frequency specified, only 160 and 200 MHz are allowed";
};
error = {
id = SPLITTERS;
msg = "Trouble setting the splitters";
};
//
// 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".
//
//
// GET_CLOCK
//
event = {
signal = GET_CLOCK;
dir = IN; // from client to server
};
//
// GET_CLOCK_ACK
//
event = {
signal = GET_CLOCK_ACK;
dir = OUT;
param = {
name = "clock";
type = "uint32";
};
};
//
// SET_CLOCK
//
event = {
signal = SET_CLOCK;
dir = IN;
param = {
name = "clock";
type = "uint32";
};
};
//
// SET_CLOCK_ACK
//
event = {
signal = SET_CLOCK_ACK;
dir = OUT;
param = {
name = "status";
type = "uint32";
};
};
//
// GET_SPLITTERS
//
event = {
signal = GET_SPLITTERS;
dir = IN; // from client to server
};
//
// GET_SPLITTERS_ACK
//
event = {
signal = GET_SPLITTERS_ACK;
dir = OUT;
param = {
name = "splitters";
type = "bitset<MAX_RSPBOARDS>";
};
};
//
// SET_SPLITTERS
//
event = {
signal = SET_SPLITTERS;
dir = IN;
param = {
name = "splittersOn";
type = "bool";
};
};
//
// SET_SPLITTERS_ACK
//
event = {
signal = SET_SPLITTERS_ACK;
dir = OUT;
param = {
name = "status";
type = "uint32";
};
param = {
name = "splitters";
type = "bitset<MAX_RSPBOARDS>";
};
};
AUTOGEN = autogen
SUFFIXES = .ph
%.ph: %.prot
$(AUTOGEN) --writable -L $(datadir)/MACIO $<
cp $*.ph $(top_builddir)/include/APL/ClockProtocol
%.cc: %.prot
$(AUTOGEN) --writable -L $(datadir)/MACIO $<
EXTRA_DIST = Clock_Protocol.prot
BUILT_SOURCES = Clock_Protocol.ph Clock_Protocol.cc
pkgincludedir = $(includedir)/APL/ClockProtocol
pkginclude_HEADERS = $(BUILT_SOURCES)
lib_LTLIBRARIES = libclock_protocol.la
libclock_protocol_la_SOURCES = $(BUILT_SOURCES)
clean-local:
rm -f *.ph
include $(top_srcdir)/Makefile.common
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