|
1
|
|
|
# -*- coding: utf-8 -*- |
|
2
|
|
|
|
|
3
|
|
|
""" |
|
4
|
|
|
Interface file to define a setpoint for a process variable. |
|
5
|
|
|
|
|
6
|
|
|
Qudi is free software: you can redistribute it and/or modify |
|
7
|
|
|
it under the terms of the GNU General Public License as published by |
|
8
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
9
|
|
|
(at your option) any later version. |
|
10
|
|
|
|
|
11
|
|
|
Qudi is distributed in the hope that it will be useful, |
|
12
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14
|
|
|
GNU General Public License for more details. |
|
15
|
|
|
|
|
16
|
|
|
You should have received a copy of the GNU General Public License |
|
17
|
|
|
along with Qudi. If not, see <http://www.gnu.org/licenses/>. |
|
18
|
|
|
|
|
19
|
|
|
Copyright (c) the Qudi Developers. See the COPYRIGHT.txt file at the |
|
20
|
|
|
top-level directory of this distribution and at <https://github.com/Ulm-IQO/qudi/> |
|
21
|
|
|
""" |
|
22
|
|
|
|
|
23
|
|
|
import abc |
|
24
|
|
|
from core.util.interfaces import InterfaceMetaclass |
|
25
|
|
|
|
|
26
|
|
|
|
|
27
|
|
|
class SetpointInterface(metaclass=InterfaceMetaclass): |
|
28
|
|
|
""" This interface is used to manage a setpoint value. |
|
29
|
|
|
""" |
|
30
|
|
|
|
|
31
|
|
|
_modtype = 'ProcessControlInterface' |
|
32
|
|
|
_modclass = 'interface' |
|
33
|
|
|
|
|
34
|
|
|
@abc.abstractmethod |
|
35
|
|
|
def get_setpoint(self): |
|
36
|
|
|
""" Getter for the setpoint value |
|
37
|
|
|
|
|
38
|
|
|
Return a value in unit |
|
39
|
|
|
""" |
|
40
|
|
|
pass |
|
41
|
|
|
|
|
42
|
|
|
@abc.abstractmethod |
|
43
|
|
|
def set_setpoint(self, setpoint): |
|
44
|
|
|
""" Set the current setpoint |
|
45
|
|
|
|
|
46
|
|
|
Parameter : new value desired in unit |
|
47
|
|
|
Return the real new value |
|
48
|
|
|
""" |
|
49
|
|
|
pass |
|
50
|
|
|
|
|
51
|
|
|
@abc.abstractmethod |
|
52
|
|
|
def get_setpoint_unit(self): |
|
53
|
|
|
""" Return the unit that the setpoint value is set in as a tuple of ('abbreviation', 'full unit name') """ |
|
54
|
|
|
pass |
|
55
|
|
|
|
|
56
|
|
|
@abc.abstractmethod |
|
57
|
|
|
def get_setpoint_limits(self): |
|
58
|
|
|
""" Return limits within which the setpoint value can be set as a tuple of (low limit, high limit) |
|
59
|
|
|
""" |
|
60
|
|
|
pass |
|
61
|
|
|
|