1
2
3
4
5 package org.epics.pvmanager.jca;
6
7 import gov.aps.jca.dbr.DBR_CTRL_Double;
8 import gov.aps.jca.dbr.DBR_TIME_Double;
9 import java.util.List;
10 import org.epics.vtype.VDoubleArray;
11 import org.epics.vtype.VTypeToString;
12 import org.epics.util.array.ArrayDouble;
13 import org.epics.util.array.ArrayInt;
14 import org.epics.util.array.ListDouble;
15 import org.epics.util.array.ListInt;
16 import org.epics.vtype.ArrayDimensionDisplay;
17 import org.epics.vtype.ValueUtil;
18
19
20
21
22
23 class VDoubleArrayFromDbr extends VNumberMetadata<DBR_TIME_Double, DBR_CTRL_Double> implements VDoubleArray {
24
25 public VDoubleArrayFromDbr(DBR_TIME_Double dbrValue, DBR_CTRL_Double metadata, JCAConnectionPayload connPayload) {
26 super(dbrValue, metadata, connPayload);
27 }
28
29 @Override
30 public ListDouble getData() {
31 return new ArrayDouble(dbrValue.getDoubleValue());
32 }
33
34 @Override
35 public ListInt getSizes() {
36 return new ArrayInt(dbrValue.getDoubleValue().length);
37 }
38
39 @Override
40 public String toString() {
41 return VTypeToString.toString(this);
42 }
43
44 @Override
45 public List<ArrayDimensionDisplay> getDimensionDisplay() {
46 return ValueUtil.defaultArrayDisplay(this);
47 }
48
49 }