1
2
3
4
5 package org.epics.pvmanager.jca;
6
7 import gov.aps.jca.dbr.DBR_TIME_String;
8 import java.util.Arrays;
9 import java.util.Collections;
10 import java.util.List;
11 import org.epics.vtype.VStringArray;
12 import org.epics.vtype.VTypeToString;
13 import org.epics.util.array.ArrayInt;
14 import org.epics.util.array.ListInt;
15
16
17
18
19
20 class VStringArrayFromDbr extends VMetadata<DBR_TIME_String> implements VStringArray {
21
22 private List<String> data;
23
24 public VStringArrayFromDbr(DBR_TIME_String dbrValue, JCAConnectionPayload connPayload) {
25 super(dbrValue, connPayload);
26 data = Collections.unmodifiableList(Arrays.asList(dbrValue.getStringValue()));
27 }
28
29 @Override
30 public List<String> getData() {
31 return data;
32 }
33
34 @Override
35 public ListInt getSizes() {
36 return new ArrayInt(dbrValue.getStringValue().length);
37 }
38
39 @Override
40 public String toString() {
41 return VTypeToString.toString(this);
42 }
43
44 }