Package xal.ca
Interface ChannelRecord
- All Known Subinterfaces:
ChannelStatusRecord
,ChannelTimeRecord
- All Known Implementing Classes:
ChannelRecordImpl
,ChannelStatusRecordImpl
,ChannelTimeRecordImpl
,Epics7ChannelRecord
,Epics7ChannelStatusRecord
,Epics7ChannelTimeRecord
public interface ChannelRecord
ChannelRecord is a wrapper for the value returned by a get operation on a
Channel. It a provides convenience methods for getting data back as one of
many primitive types.
- Author:
- tap
-
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.byte
Get the data converted to a scalar byte.byte
byteValueAt
(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.double
Get the data converted to a scalar double.double
doubleValueAt
(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.float
Get the data converted to a scalar float.float
floatValueAt
(int index) Get the value of the array element identified by the index and convert it to a float.int
getCount()
Get the number of elements in the array value.Class<?>
getType()
Get the native type of the data as a Java class.int[]
intArray()
Get the data converted to a int array.int
intValue()
Get the data converted to a scalar int.int
intValueAt
(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.long
Get the data converted to a scalar long.long
longValueAt
(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.short
Get the data converted to a scalar short.short
shortValueAt
(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.
-
Method Details
-
getCount
int getCount()Get the number of elements in the array value.- Returns:
- The length of the array.
-
getType
Class<?> getType()Get the native type of the data as a Java class.- Returns:
- The native type of the data.
-
byteValue
byte byteValue()Get 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.- Returns:
- The data as a scalar byte.
-
byteValueAt
byte byteValueAt(int index) Get the value of the array element identified by the index and convert it to a byte.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar byte.
-
byteArray
byte[] byteArray()Get the data converted to a byte array.- Returns:
- The data as a byte array.
-
shortValue
short shortValue()Get 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.- Returns:
- The data as a scalar short.
-
shortValueAt
short shortValueAt(int index) Get the value of the array element identified by the index and convert it to a short.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar short.
-
shortArray
short[] shortArray()Get the data converted to a short array.- Returns:
- The data as a short array.
-
intValue
int intValue()Get 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.- Returns:
- The data as a scalar int.
-
intValueAt
int intValueAt(int index) Get the value of the array element identified by the index and convert it to a int.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar int.
-
intArray
int[] intArray()Get the data converted to a int array.- Returns:
- The data as a int array.
-
longValue
long longValue()Get 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.- Returns:
- The data as a scalar long.
-
longValueAt
long longValueAt(int index) Get the value of the array element identified by the index and convert it to a long.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar long.
-
longArray
long[] longArray()Get the data converted to a long array.- Returns:
- The data as a long array.
-
floatValue
float floatValue()Get 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.- Returns:
- The data as a scalar float.
-
floatValueAt
float floatValueAt(int index) Get the value of the array element identified by the index and convert it to a float.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar float.
-
floatArray
float[] floatArray()Get the data converted to a float array.- Returns:
- The data as a float array.
-
doubleValue
double doubleValue()Get 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.- Returns:
- The data as a scalar double.
-
doubleValueAt
double doubleValueAt(int index) Get the value of the array element identified by the index and convert it to a double.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar double.
-
doubleArray
double[] doubleArray()Get the data converted to a double array.- Returns:
- The data as a double array.
-
stringValue
String stringValue()Get 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.- Returns:
- The data as a scalar string.
-
stringValueAt
Get the value of the array element identified by the index and convert it to a string.- Parameters:
index
- The index of the array element to get.- Returns:
- The data element at the index as a scalar string.
-
stringArray
String[] stringArray()Get the data converted to a string array.- Returns:
- The data as a string array.
-
toString
String toString()Override toString to return a representation of the data as an array. -
applyTransform
Convert the store from a raw value to a processed value.- Parameters:
transform
- The transform used to convert the store.- Returns:
- this instance as a convenience.
-
arrayValue
ArrayValue arrayValue()Get the internal storage.- Returns:
- The internal data storage.
-