Accelerator Independent Data Access / PVAccess 2.0
AIDA-PVA is the latest version of the AIDA framework. Built on top of EPICS 7 it enables client applications to programmatically access and manage any device or database on the SLAC Network using simple channel names.
Loading...
Searching...
No Matches
toArray.m
1function matlabArray = toArray(values)
2 for m = 1:values.length
3 value = values(m);
4 if (isa(value, 'java.lang.Byte'))
5 matlabArray(m) = value.byteValue;
6
7 elseif (isa(value, 'java.lang.Boolean'))
8 matlabArray(m) = value.booleanValue;
9
10 elseif (isa(value, 'java.lang.Short'))
11 matlabArray(m) = value.shortValue;
12
13 elseif (isa(value, 'java.lang.Integer'))
14 matlabArray(m) = value.intValue;
15
16 elseif (isa(value, 'java.lang.Long'))
17 matlabArray(m) = value.longValue;
18
19 elseif (isa(value, 'java.lang.Float'))
20 matlabArray(m) = value.floatValue;
21
22 elseif (isa(value, 'java.lang.Double'))
23 matlabArray(m) = value.doubleValue;
24
25 elseif (isa(value, 'java.lang.String'))
26 matlabArray(m) = { char(value) };
27
28 elseif (isa(value, 'char'))
29 matlabArray(m) = { value };
30
31 else
32 matlabArray(m) = value;
33 end
34 end
35end