CalibParamController.h 2.45 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
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
/*
 * Nomad Instrument Control Software
 *
 * Copyright 2011 Institut Laue-Langevin
 *
 * Licensed under the EUPL, Version 1.1 only (the "License");
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at:
 *
 * http://joinup.ec.europa.eu/software/page/eupl
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Licence for the specific language governing permissions and
 * limitations under the Licence.
 */

#ifndef CALIBPARAMCONTROLLER_H
#define CALIBPARAMCONTROLLER_H

#include <Controller.h>
#include "drivers/stereo_elec/StereoElecDriver.h"
#include "DAQParamController.h"

namespace stereo_daq {



/*!
 * \class CalibParamController
 */

class CalibParamController: public ExperimentController,
		public controller::Stoppable,
		public Select,
		public Set {

public:

	//! Type of controller
	static const std::string TYPE;

	/*!
	 * \brief Constructor
	 *
	 * It is the default constructor called by the creator class ExperimentControllerCreator.
	 *
	 * \param[in] name the name of the controller
	 */
	CalibParamController(const std::string& name);

	/*!
	 * \brief Copy constructor
	 *
	 * \param[in] controller the controller to copy
	 */
	CalibParamController(const CalibParamController& controller);

	/*!
	 * \brief Destructor
	 */
	virtual ~CalibParamController();

	/*!
	 * \brief Method called before changing the property value
	 *
	 * This method is called after setting configuration during the creation of controller.
	 */
	virtual void postConfiguration();

	/*!
	 * Properties
	 */

	Property<string> sourcetype;
	Property<float64> x;
	Property<float64> y;
	Property<float64> z;

protected:

	DriverPtr<stereo_elec::StereoElecDriver> m_ELECDriver; //! The driver linked to the controller

	/*!
	 * \brief select command
	 */
	virtual void select();

	/*!
	 * \brief select command
	 */
	virtual void set();

	/*!
			 * \brief start
			 *
			 */
			virtual void start();

			/*!
			 * \brief Stop command
			 */
			virtual void stop();

private:



	void refreshSourceTypeProperty(const std::string& value) throw (CannotSetValue);
	void refreshXProperty(float64 value) throw (CannotSetValue);
	void refreshYProperty(float64 value) throw (CannotSetValue);
	void refreshZProperty(float64 value) throw (CannotSetValue);

};
}
#endif // CALIBPARAMCONTROLLER_H