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_Short;
9 import java.util.List;
10 import org.epics.vtype.VShortArray;
11 import org.epics.vtype.VTypeToString;
12 import org.epics.util.array.ArrayInt;
13 import org.epics.util.array.ArrayShort;
14 import org.epics.util.array.ListInt;
15 import org.epics.util.array.ListShort;
16 import org.epics.vtype.ArrayDimensionDisplay;
17 import org.epics.vtype.ValueUtil;
18
19
20
21
22
23 class VShortArrayFromDbr extends VNumberMetadata<DBR_TIME_Short, DBR_CTRL_Double> implements VShortArray {
24
25 public VShortArrayFromDbr(DBR_TIME_Short dbrValue, DBR_CTRL_Double metadata, JCAConnectionPayload connPayload) {
26 super(dbrValue, metadata, connPayload);
27 }
28
29 @Override
30 public ListInt getSizes() {
31 return new ArrayInt(dbrValue.getShortValue().length);
32 }
33
34 @Override
35 public ListShort getData() {
36 return new ArrayShort(dbrValue.getShortValue());
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 }