MAROCDebug.h 7.89 KB
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
/*----- PROTECTED REGION ID(MAROCDebug.h) ENABLED START -----*/
//=============================================================================
//
// file :        MAROCDebug.h
//
// description : Include file for the MAROCDebug class
//
// project :     
//
// This file is part of Tango device class.
// 
// 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/>.
// 
// $Author:  $
//
// $Revision:  $
// $Date:  $
//
// $HeadURL:  $
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================


#ifndef MAROCDebug_H
#define MAROCDebug_H

#include <tango.h>

#include "Worker.h"


/*----- PROTECTED REGION END -----*/	//	MAROCDebug.h

/**
 *  MAROCDebug class description:
 *    
 */

namespace MAROCDebug_ns
{
/*----- PROTECTED REGION ID(MAROCDebug::Additional Class Declarations) ENABLED START -----*/

//	Additional Class Declarations

/*----- PROTECTED REGION END -----*/	//	MAROCDebug::Additional Class Declarations

class MAROCDebug : public TANGO_BASE_CLASS
{

/*----- PROTECTED REGION ID(MAROCDebug::Data Members) ENABLED START -----*/

//	Add your own data members

/*----- PROTECTED REGION END -----*/	//	MAROCDebug::Data Members

Alexander Steffens's avatar
Alexander Steffens committed
70
71
72
73
74
75
76
77
78
79
//	Device property data members
public:
	//	coincEnabled:	Toggles coincidence logic. When disabled, raw data of entire MAROC boards will be transmitted, sorted by time.
	Tango::DevBoolean	coincEnabled;
	//	coincSingle:	Use only one single coincidence entity
	Tango::DevBoolean	coincSingle;
	//	coincOnlyXY:	Transfer only first X/Y pair (event + location). Do not set during aquisition because additional information will be discarded due to lack of additional coincidence data.
	Tango::DevBoolean	coincOnlyXY;
	//	coincMark:	
	Tango::DevBoolean	coincMark;
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

//	Attribute data members
public:
	Tango::DevDouble	*attr_daqTime_read;
	Tango::DevString	*attr_dataPath_read;
	Tango::DevString	*attr_lastFilename_read;
	Tango::DevBoolean	*attr_readAllData_read;
	Tango::DevDouble	*attr_remainingTime_read;

//	Constructors and destructors
public:
	/**
	 * Constructs a newly device object.
	 *
	 *	@param cl	Class.
	 *	@param s 	Device Name
	 */
	MAROCDebug(Tango::DeviceClass *cl,string &s);
	/**
	 * Constructs a newly device object.
	 *
	 *	@param cl	Class.
	 *	@param s 	Device Name
	 */
	MAROCDebug(Tango::DeviceClass *cl,const char *s);
	/**
	 * Constructs a newly device object.
	 *
	 *	@param cl	Class.
	 *	@param s 	Device name
	 *	@param d	Device description.
	 */
	MAROCDebug(Tango::DeviceClass *cl,const char *s,const char *d);
	/**
	 * The device object destructor.
	 */
	~MAROCDebug() {delete_device();};


//	Miscellaneous methods
public:
	/*
	 *	will be called at device destruction or at init command.
	 */
	void delete_device();
	/*
	 *	Initialize the device
	 */
	virtual void init_device();
Alexander Steffens's avatar
Alexander Steffens committed
129
130
131
132
	/*
	 *	Read the device properties from database
	 */
	void get_device_property();
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
	/*
	 *	Always executed method before execution command method.
	 */
	virtual void always_executed_hook();


//	Attribute methods
public:
	//--------------------------------------------------------
	/*
	 *	Method      : MAROCDebug::read_attr_hardware()
	 *	Description : Hardware acquisition for attributes.
	 */
	//--------------------------------------------------------
	virtual void read_attr_hardware(vector<long> &attr_list);
	//--------------------------------------------------------
	/*
	 *	Method      : MAROCDebug::write_attr_hardware()
	 *	Description : Hardware writing for attributes.
	 */
	//--------------------------------------------------------
	virtual void write_attr_hardware(vector<long> &attr_list);

/**
 *	Attribute daqTime related methods
 *	Description: Preset DAQ time value.
 *
 *	Data type:	Tango::DevDouble
 *	Attr type:	Scalar
 */
	virtual void read_daqTime(Tango::Attribute &attr);
	virtual void write_daqTime(Tango::WAttribute &attr);
	virtual bool is_daqTime_allowed(Tango::AttReqType type);
/**
 *	Attribute dataPath related methods
 *	Description: Directory where DAQ data is stored.
 *
 *	Data type:	Tango::DevString
 *	Attr type:	Scalar
 */
	virtual void read_dataPath(Tango::Attribute &attr);
	virtual void write_dataPath(Tango::WAttribute &attr);
	virtual bool is_dataPath_allowed(Tango::AttReqType type);
/**
 *	Attribute lastFilename related methods
 *	Description: Name of last DAQ data file.
 *
 *	Data type:	Tango::DevString
 *	Attr type:	Scalar
 */
	virtual void read_lastFilename(Tango::Attribute &attr);
	virtual bool is_lastFilename_allowed(Tango::AttReqType type);
/**
 *	Attribute readAllData related methods
 *	Description: Indicates whether all FIFO data is read immediately or blockwise.
 *
 *	Data type:	Tango::DevBoolean
 *	Attr type:	Scalar
 */
	virtual void read_readAllData(Tango::Attribute &attr);
	virtual void write_readAllData(Tango::WAttribute &attr);
	virtual bool is_readAllData_allowed(Tango::AttReqType type);
/**
 *	Attribute remainingTime related methods
 *	Description: Current remaining time value.
 *
 *	Data type:	Tango::DevDouble
 *	Attr type:	Scalar
 */
	virtual void read_remainingTime(Tango::Attribute &attr);
	virtual bool is_remainingTime_allowed(Tango::AttReqType type);


	//--------------------------------------------------------
	/**
	 *	Method      : MAROCDebug::add_dynamic_attributes()
	 *	Description : Add dynamic attributes if any.
	 */
	//--------------------------------------------------------
	void add_dynamic_attributes();




//	Command related methods
public:
	/**
	 *	Command State related method
	 *	Description: This command gets the device state (stored in its device_state data member) and returns it to the caller.
	 *
	 *	@returns Device state
	 */
	virtual Tango::DevState dev_state();
	/**
	 *	Command Status related method
	 *	Description: This command gets the device status (stored in its device_status data member) and returns it to the caller.
	 *
	 *	@returns Device status
	 */
	virtual Tango::ConstDevString dev_status();
	/**
	 *	Command WorkerTest related method
	 *	Description: 
	 *
	 *	@returns 
	 */
	virtual Tango::DevString worker_test();
	virtual bool is_WorkerTest_allowed(const CORBA::Any &any);
Alexander Steffens's avatar
Alexander Steffens committed
241
242
243
244
245
246
247
248
249
250
251
252
253
254
	/**
	 *	Command loadSettings related method
	 *	Description: Load settings from configuration files. Will overwrite current hardware values.
	 *
	 */
	virtual void load_settings();
	virtual bool is_loadSettings_allowed(const CORBA::Any &any);
	/**
	 *	Command saveSettings related method
	 *	Description: Write current settings to configuration files.
	 *
	 */
	virtual void save_settings();
	virtual bool is_saveSettings_allowed(const CORBA::Any &any);
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


	//--------------------------------------------------------
	/**
	 *	Method      : MAROCDebug::add_dynamic_commands()
	 *	Description : Add dynamic commands if any.
	 */
	//--------------------------------------------------------
	void add_dynamic_commands();

/*----- PROTECTED REGION ID(MAROCDebug::Additional Method prototypes) ENABLED START -----*/

//	Additional Method prototypes
private:
	vector<MAROC_ns::Worker *> workerList;

/*----- PROTECTED REGION END -----*/	//	MAROCDebug::Additional Method prototypes
};

/*----- PROTECTED REGION ID(MAROCDebug::Additional Classes Definitions) ENABLED START -----*/

//	Additional Classes Definitions

/*----- PROTECTED REGION END -----*/	//	MAROCDebug::Additional Classes Definitions

}	//	End of namespace

#endif   //	MAROCDebug_H