-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDigiLockSystem.m
More file actions
73 lines (61 loc) · 2.61 KB
/
DigiLockSystem.m
File metadata and controls
73 lines (61 loc) · 2.61 KB
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
classdef DigiLockSystem < handle
% DigiLockSystem - System configuration module
% CORRECTED VERSION with proper RCI command syntax
properties (Access = private)
parent
end
methods
function obj = DigiLockSystem(parent)
obj.parent = parent;
end
function setInputOffset(obj, value)
% RCI Command: main in:input offset=0
obj.parent.write(sprintf('main in:input offset=%.6f', value));
end
function value = getInputOffset(obj)
% RCI Command: main in:input offset?
value = obj.parent.queryNumeric('main in:input offset?');
end
function setInputGain(obj, value)
% RCI Command: main in:gain=1
obj.parent.write(sprintf('main in:gain=%d', value));
end
function value = getInputGain(obj)
% RCI Command: main in:gain?
value = obj.parent.queryNumeric('main in:gain?');
end
function setInvert(obj, enable)
% RCI Command: main in:invert=true
if enable
obj.parent.write('main in:invert=true');
else
obj.parent.write('main in:invert=false');
end
end
function status = getInvert(obj)
% RCI Command: main in:invert?
response = obj.parent.query('main in:invert?');
status = strcmpi(response, 'true') || strcmpi(response, '1');
end
function setLowPassFilter(obj, frequency, order)
% RCI Commands: main in:low pass:frequency, :order, :bypass
obj.parent.write(sprintf('main in:low pass:frequency=%.6f', frequency));
obj.parent.write(sprintf('main in:low pass:order=%d', order));
obj.parent.write('main in:low pass:bypass=false');
end
function disableLowPassFilter(obj)
% RCI Command: main in:low pass:bypass=true
obj.parent.write('main in:low pass:bypass=true');
end
function setHighPassFilter(obj, frequency, order)
% RCI Commands: main in:high pass:frequency, :order, :bypass
obj.parent.write(sprintf('main in:high pass:frequency=%.6f', frequency));
obj.parent.write(sprintf('main in:high pass:order=%d', order));
obj.parent.write('main in:high pass:bypass=false');
end
function disableHighPassFilter(obj)
% RCI Command: main in:high pass:bypass=true
obj.parent.write('main in:high pass:bypass=true');
end
end
end