Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
//# 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>";
};
};