Package xal.plugin.epics7
Class Epics7ChannelRecord
java.lang.Object
xal.ca.ChannelRecordImpl
xal.plugin.epics7.Epics7ChannelRecord
- All Implemented Interfaces:
ChannelRecord
- Direct Known Subclasses:
Epics7ChannelStatusRecord
ChannelRecord implementation for Epics7. It stores the PVStructure data to
make it possible to use PVAccess Structures in Open XAL without making
significant changes to the core library.
- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.epics.pvdata.pv.PVStructureprotected static final StringFields inherited from class xal.ca.ChannelRecordImpl
store -
Constructor Summary
ConstructorsConstructorDescriptionEpics7ChannelRecord(org.epics.pvdata.pv.PVStructure pvStructure) Constructor -
Method Summary
Modifier and TypeMethodDescriptionapplyTransform(ValueTransform transform) Convert the store from a raw value to a processed value.Get the internal storage.byte[]Get the data converted to a byte array.byteGet the data converted to a scalar byte.bytebyteValueAt(int index) Get the value of the array element identified by the index and convert it to a byte.double[]Get the data converted to a double array.doubleGet the data converted to a scalar double.doubledoubleValueAt(int index) Get the value of the array element identified by the index and convert it to a double.float[]Get the data converted to a float array.floatGet the data converted to a scalar float.floatfloatValueAt(int index) Get the value of the array element identified by the index and convert it to a float.intgetCount()Get the number of elements in the array value.static intgetCountArray(org.epics.pvdata.pv.PVStructure structure, org.epics.pvdata.pv.PVField valueField) org.epics.pvdata.pv.PVStructuregetStore()Get the internal storage.Class<?>getType()Get the native type of the data as a Java class.int[]intArray()Get the data converted to a int array.intintValue()Get the data converted to a scalar int.intintValueAt(int index) Get the value of the array element identified by the index and convert it to a int.long[]Get the data converted to a long array.longGet the data converted to a scalar long.longlongValueAt(int index) Get the value of the array element identified by the index and convert it to a long.short[]Get the data converted to a short array.shortGet the data converted to a scalar short.shortshortValueAt(int index) Get the value of the array element identified by the index and convert it to a short.String[]Get the data converted to a string array.Get the data converted to a scalar string.stringValueAt(int index) Get the value of the array element identified by the index and convert it to a string.toString()Override toString to return a representation of the data as an array.
-
Field Details
-
pvStructureStore
protected org.epics.pvdata.pv.PVStructure pvStructureStore -
fieldName
-
VALUE_FIELD_NAME
- See Also:
-
-
Constructor Details
-
Epics7ChannelRecord
public Epics7ChannelRecord(org.epics.pvdata.pv.PVStructure pvStructure) Constructor- Parameters:
pvStructure-
-
-
Method Details
-
getStore
public org.epics.pvdata.pv.PVStructure getStore()Get the internal storage.- Returns:
- The internal data storage.
-
getFieldName
-
getCount
public int getCount()Description copied from class:ChannelRecordImplGet the number of elements in the array value.- Specified by:
getCountin interfaceChannelRecord- Overrides:
getCountin classChannelRecordImpl- Returns:
- The length of the array.
-
getCountArray
public static int getCountArray(org.epics.pvdata.pv.PVStructure structure, org.epics.pvdata.pv.PVField valueField) -
getType
Description copied from class:ChannelRecordImplGet the native type of the data as a Java class.- Specified by:
getTypein interfaceChannelRecord- Overrides:
getTypein classChannelRecordImpl- Returns:
- The native type of the data.
-
byteValue
public byte byteValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar byte. If the data is an array the the value of the first element is converted to a byte and returned.- Specified by:
byteValuein interfaceChannelRecord- Overrides:
byteValuein classChannelRecordImpl- Returns:
- The data as a scalar byte.
-
byteValueAt
public byte byteValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a byte.- Specified by:
byteValueAtin interfaceChannelRecord- Overrides:
byteValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar byte.
-
byteArray
public byte[] byteArray()Description copied from class:ChannelRecordImplGet the data converted to a byte array.- Specified by:
byteArrayin interfaceChannelRecord- Overrides:
byteArrayin classChannelRecordImpl- Returns:
- The data as a byte array.
-
shortValue
public short shortValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar short. If the data is an array the the value of the first element is converted to a short and returned.- Specified by:
shortValuein interfaceChannelRecord- Overrides:
shortValuein classChannelRecordImpl- Returns:
- The data as a scalar short.
-
shortValueAt
public short shortValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a short.- Specified by:
shortValueAtin interfaceChannelRecord- Overrides:
shortValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar short.
-
shortArray
public short[] shortArray()Description copied from class:ChannelRecordImplGet the data converted to a short array.- Specified by:
shortArrayin interfaceChannelRecord- Overrides:
shortArrayin classChannelRecordImpl- Returns:
- The data as a short array.
-
intValue
public int intValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar int. If the data is an array the the value of the first element is converted to a int and returned.- Specified by:
intValuein interfaceChannelRecord- Overrides:
intValuein classChannelRecordImpl- Returns:
- The data as a scalar int.
-
intValueAt
public int intValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a int.- Specified by:
intValueAtin interfaceChannelRecord- Overrides:
intValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar int.
-
intArray
public int[] intArray()Description copied from class:ChannelRecordImplGet the data converted to a int array.- Specified by:
intArrayin interfaceChannelRecord- Overrides:
intArrayin classChannelRecordImpl- Returns:
- The data as a int array.
-
longValue
public long longValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar long. If the data is an array the the value of the first element is converted to a long and returned.- Specified by:
longValuein interfaceChannelRecord- Overrides:
longValuein classChannelRecordImpl- Returns:
- The data as a scalar long.
-
longValueAt
public long longValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a long.- Specified by:
longValueAtin interfaceChannelRecord- Overrides:
longValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar long.
-
longArray
public long[] longArray()Description copied from class:ChannelRecordImplGet the data converted to a long array.- Specified by:
longArrayin interfaceChannelRecord- Overrides:
longArrayin classChannelRecordImpl- Returns:
- The data as a long array.
-
floatValue
public float floatValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar float. If the data is an array the the value of the first element is converted to a float and returned.- Specified by:
floatValuein interfaceChannelRecord- Overrides:
floatValuein classChannelRecordImpl- Returns:
- The data as a scalar float.
-
floatValueAt
public float floatValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a float.- Specified by:
floatValueAtin interfaceChannelRecord- Overrides:
floatValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar float.
-
floatArray
public float[] floatArray()Description copied from class:ChannelRecordImplGet the data converted to a float array.- Specified by:
floatArrayin interfaceChannelRecord- Overrides:
floatArrayin classChannelRecordImpl- Returns:
- The data as a float array.
-
doubleValue
public double doubleValue()Description copied from class:ChannelRecordImplGet the data converted to a scalar double. If the data is an array the the value of the first element is converted to a double and returned.- Specified by:
doubleValuein interfaceChannelRecord- Overrides:
doubleValuein classChannelRecordImpl- Returns:
- The data as a scalar double.
-
doubleValueAt
public double doubleValueAt(int index) Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a double.- Specified by:
doubleValueAtin interfaceChannelRecord- Overrides:
doubleValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar double.
-
doubleArray
public double[] doubleArray()Description copied from class:ChannelRecordImplGet the data converted to a double array.- Specified by:
doubleArrayin interfaceChannelRecord- Overrides:
doubleArrayin classChannelRecordImpl- Returns:
- The data as a double array.
-
stringValue
Description copied from class:ChannelRecordImplGet the data converted to a scalar string. If the data is an array the the value of the first element is converted to a string and returned.- Specified by:
stringValuein interfaceChannelRecord- Overrides:
stringValuein classChannelRecordImpl- Returns:
- The data as a scalar string.
-
stringValueAt
Description copied from class:ChannelRecordImplGet the value of the array element identified by the index and convert it to a string.- Specified by:
stringValueAtin interfaceChannelRecord- Overrides:
stringValueAtin classChannelRecordImpl- Parameters:
index- The index of the array element to get.- Returns:
- The data element at the index as a scalar string.
-
stringArray
Description copied from class:ChannelRecordImplGet the data converted to a string array.- Specified by:
stringArrayin interfaceChannelRecord- Overrides:
stringArrayin classChannelRecordImpl- Returns:
- The data as a string array.
-
toString
Description copied from class:ChannelRecordImplOverride toString to return a representation of the data as an array.- Specified by:
toStringin interfaceChannelRecord- Overrides:
toStringin classChannelRecordImpl- Returns:
- A string representation of this object.
-
applyTransform
Description copied from class:ChannelRecordImplConvert the store from a raw value to a processed value.- Specified by:
applyTransformin interfaceChannelRecord- Overrides:
applyTransformin classChannelRecordImpl- Parameters:
transform- The transform used to convert the store.- Returns:
- this instance as a convenience.
-
arrayValue
Description copied from class:ChannelRecordImplGet the internal storage.- Specified by:
arrayValuein interfaceChannelRecord- Overrides:
arrayValuein classChannelRecordImpl- Returns:
- The internal data storage.
-