File: StarterStateMachine.cpp

package info (click to toggle)
tango 7.2.6%2Bdfsg-14
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 20,720 kB
  • sloc: cpp: 122,899; sh: 11,304; ansic: 1,079; makefile: 843; java: 215; python: 55
file content (363 lines) | stat: -rw-r--r-- 11,314 bytes parent folder | download
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
/*----- PROTECTED REGION ID(StarterStateMachine.cpp) ENABLED START -----*/
static const char *RcsId = "$Id: StarterStateMachine.cpp 16078 2011-03-16 12:53:37Z pascal_verdier $";
//=============================================================================
//
// file :        StarterStateMachine.cpp
//
// description : C++ source for the name and its alowed
//               methods for commands and attributes
//
// project :     Starter for Tango Administration.
//
// $Author: pascal_verdier $
//
// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
//						European Synchrotron Radiation Facility
//                      BP 220, Grenoble 38043
//                      FRANCE
//
// This file is part of Tango.
//
// Tango 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 3 of the License, or
// (at your option) any later version.
// 
// Tango 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 Tango.  If not, see <http://www.gnu.org/licenses/>.
//
// $Revision: 16078 $
// $Date: 2011-03-16 13:53:37 +0100 (Wed, 16 Mar 2011) $
//
// SVN only:
// $HeadURL:  $
//
// CVS only:
// $Source$
// $Log$
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================



#include <Starter.h>
#include <StarterClass.h>

/*----- PROTECTED REGION END -----*/


/*
 * Starter states description:
 *
 * UNKNOWN :	This device server has NOT been correctly initialised. 
 * ON :	All controlled servers are running. 
 * ALARM :	At least one controled device server is not running. 
 * MOVING :	The Sarter is starting servers. 
 */

namespace Starter_ns
{

//=================================================
//		Attributes Allowed Methods
//=================================================

//--------------------------------------------------------
/**
 *	Method      : Starter::is_NotifdStateState_allowed()
 *	Description : Execution allowed for NotifdState attribute.
 */
//--------------------------------------------------------

bool Starter::is_NotifdState_allowed(Tango::AttReqType type)
{
		//	Not any excluded states for NotifdState attribute in READ access.
	
	/*----- PROTECTED REGION ID(Starter::read_NotifdStateStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::read_NotifdStateStateAllowed_READ

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_HostStateState_allowed()
 *	Description : Execution allowed for HostState attribute.
 */
//--------------------------------------------------------

bool Starter::is_HostState_allowed(Tango::AttReqType type)
{
		//	Not any excluded states for HostState attribute in READ access.
	
	/*----- PROTECTED REGION ID(Starter::read_HostStateStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::read_HostStateStateAllowed_READ

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_RunningServersState_allowed()
 *	Description : Execution allowed for RunningServers attribute.
 */
//--------------------------------------------------------

bool Starter::is_RunningServers_allowed(Tango::AttReqType type)
{
		//	Not any excluded states for RunningServers attribute in READ access.
	
	/*----- PROTECTED REGION ID(Starter::read_RunningServersStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::read_RunningServersStateAllowed_READ

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_StoppedServersState_allowed()
 *	Description : Execution allowed for StoppedServers attribute.
 */
//--------------------------------------------------------

bool Starter::is_StoppedServers_allowed(Tango::AttReqType type)
{
		//	Not any excluded states for StoppedServers attribute in READ access.
	
	/*----- PROTECTED REGION ID(Starter::read_StoppedServersStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::read_StoppedServersStateAllowed_READ

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_ServersState_allowed()
 *	Description : Execution allowed for Servers attribute.
 */
//--------------------------------------------------------

bool Starter::is_Servers_allowed(Tango::AttReqType type)
{
		//	Not any excluded states for Servers attribute in READ access.
	
	/*----- PROTECTED REGION ID(Starter::read_ServersStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::read_ServersStateAllowed_READ

	return true;
}


	/*----- PROTECTED REGION ID(Starter::are_dynamic_attributes_allowed) ENABLED START -----*/

	//	Add your code to check if dynamic attributes are alowed

	/*----- PROTECTED REGION END -----*/	//	Starter::are_dynamic_attributes_allowed


//=================================================
//		Commands Allowed Methods
//=================================================


//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevStartState_allowed()
 *	Description : Execution allowed for DevStart command.
 */
//--------------------------------------------------------

bool Starter::is_DevStart_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevStart command.

	/*----- PROTECTED REGION ID(Starter::DevStartStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevStartStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevStopState_allowed()
 *	Description : Execution allowed for DevStop command.
 */
//--------------------------------------------------------

bool Starter::is_DevStop_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevStop command.

	/*----- PROTECTED REGION ID(Starter::DevStopStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevStopStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevStartAllState_allowed()
 *	Description : Execution allowed for DevStartAll command.
 */
//--------------------------------------------------------

bool Starter::is_DevStartAll_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevStartAll command.

	/*----- PROTECTED REGION ID(Starter::DevStartAllStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevStartAllStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevStopAllState_allowed()
 *	Description : Execution allowed for DevStopAll command.
 */
//--------------------------------------------------------

bool Starter::is_DevStopAll_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevStopAll command.

	/*----- PROTECTED REGION ID(Starter::DevStopAllStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevStopAllStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevGetRunningServersState_allowed()
 *	Description : Execution allowed for DevGetRunningServers command.
 */
//--------------------------------------------------------

bool Starter::is_DevGetRunningServers_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevGetRunningServers command.

	/*----- PROTECTED REGION ID(Starter::DevGetRunningServersStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevGetRunningServersStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevGetStopServersState_allowed()
 *	Description : Execution allowed for DevGetStopServers command.
 */
//--------------------------------------------------------

bool Starter::is_DevGetStopServers_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevGetStopServers command.

	/*----- PROTECTED REGION ID(Starter::DevGetStopServersStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevGetStopServersStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_DevReadLogState_allowed()
 *	Description : Execution allowed for DevReadLog command.
 */
//--------------------------------------------------------

bool Starter::is_DevReadLog_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for DevReadLog command.

	/*----- PROTECTED REGION ID(Starter::DevReadLogStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::DevReadLogStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_HardKillServerState_allowed()
 *	Description : Execution allowed for HardKillServer command.
 */
//--------------------------------------------------------

bool Starter::is_HardKillServer_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for HardKillServer command.

	/*----- PROTECTED REGION ID(Starter::HardKillServerStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::HardKillServerStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_NotifyDaemonStateState_allowed()
 *	Description : Execution allowed for NotifyDaemonState command.
 */
//--------------------------------------------------------

bool Starter::is_NotifyDaemonState_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for NotifyDaemonState command.

	/*----- PROTECTED REGION ID(Starter::NotifyDaemonStateStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::NotifyDaemonStateStateAllowed

	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Starter::is_UpdateServersInfoState_allowed()
 *	Description : Execution allowed for UpdateServersInfo command.
 */
//--------------------------------------------------------

bool Starter::is_UpdateServersInfo_allowed(const CORBA::Any &any)
{
	//	Not any excluded states for UpdateServersInfo command.

	/*----- PROTECTED REGION ID(Starter::UpdateServersInfoStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Starter::UpdateServersInfoStateAllowed

	return true;
}


	/*----- PROTECTED REGION ID(Starter::are_dynamic_commands_allowed) ENABLED START -----*/

	//	Add your code to check if dynamic commands are alowed

	/*----- PROTECTED REGION END -----*/	//	Starter::are_dynamic_commands_allowed

}	// namespace Starter_ns