-
Notifications
You must be signed in to change notification settings - Fork 1
/
WaitCommand.m
41 lines (27 loc) · 1.34 KB
/
WaitCommand.m
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
%#########################################################################
% WaitCommand
% ImagingStationController command to wait for a specified amount of time
% Written by Curtis Layton 10/2012
%#########################################################################
classdef WaitCommand < ControlCommand
properties % PROPERTIES
end % END PROPERTIES
methods (Access = private) % PRIVATE METHODS
end % END PRIVATE METHODS
methods % PUBLIC METHODS
function command = WaitCommand(hardware, time)
CheckParam.isInteger(time, 'WaitCommand:WaitCommand:badInputs');
command = command@ControlCommand(hardware, 'wait', 'wait for a specified amount of time'); %call parent constructor
command.parameters.time = time; %wait time (in seconds)
end
function execute(command, scriptDepth, depthIndex)
if(~exist('depthIndex','var'))
depthIndex = 1;
end
%get a local copy of parameters that will be used
%the 'getParameter' method substitutes any loop variables for this iteration
time = command.getParameter('time', depthIndex);
pause on; pause(time);
end
end % END PUBLIC METHODS
end