Class Epics7ChannelRecord

java.lang.Object
xal.ca.ChannelRecordImpl
xal.plugin.epics7.Epics7ChannelRecord
All Implemented Interfaces:
ChannelRecord
Direct Known Subclasses:
Epics7ChannelStatusRecord

public class Epics7ChannelRecord extends ChannelRecordImpl
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

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected org.epics.pvdata.pv.PVStructure
     
    protected static final String
     

    Fields inherited from class xal.ca.ChannelRecordImpl

    store
  • Constructor Summary

    Constructors
    Constructor
    Description
    Epics7ChannelRecord(org.epics.pvdata.pv.PVStructure pvStructure)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Get the number of elements in the array value.
    static int
    getCountArray(org.epics.pvdata.pv.PVStructure structure, org.epics.pvdata.pv.PVField valueField)
     
     
    org.epics.pvdata.pv.PVStructure
    Get the internal storage.
    Get the native type of the data as a Java class.
    int[]
    Get the data converted to a int array.
    int
    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.
    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.
    Override toString to return a representation of the data as an array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • pvStructureStore

      protected org.epics.pvdata.pv.PVStructure pvStructureStore
    • fieldName

      protected String fieldName
    • VALUE_FIELD_NAME

      protected static final String 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

      public String getFieldName()
    • getCount

      public int getCount()
      Description copied from class: ChannelRecordImpl
      Get the number of elements in the array value.
      Specified by:
      getCount in interface ChannelRecord
      Overrides:
      getCount in class ChannelRecordImpl
      Returns:
      The length of the array.
    • getCountArray

      public static int getCountArray(org.epics.pvdata.pv.PVStructure structure, org.epics.pvdata.pv.PVField valueField)
    • getType

      public Class<?> getType()
      Description copied from class: ChannelRecordImpl
      Get the native type of the data as a Java class.
      Specified by:
      getType in interface ChannelRecord
      Overrides:
      getType in class ChannelRecordImpl
      Returns:
      The native type of the data.
    • byteValue

      public byte byteValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      byteValue in interface ChannelRecord
      Overrides:
      byteValue in class ChannelRecordImpl
      Returns:
      The data as a scalar byte.
    • byteValueAt

      public byte byteValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a byte.
      Specified by:
      byteValueAt in interface ChannelRecord
      Overrides:
      byteValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a byte array.
      Specified by:
      byteArray in interface ChannelRecord
      Overrides:
      byteArray in class ChannelRecordImpl
      Returns:
      The data as a byte array.
    • shortValue

      public short shortValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      shortValue in interface ChannelRecord
      Overrides:
      shortValue in class ChannelRecordImpl
      Returns:
      The data as a scalar short.
    • shortValueAt

      public short shortValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a short.
      Specified by:
      shortValueAt in interface ChannelRecord
      Overrides:
      shortValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a short array.
      Specified by:
      shortArray in interface ChannelRecord
      Overrides:
      shortArray in class ChannelRecordImpl
      Returns:
      The data as a short array.
    • intValue

      public int intValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      intValue in interface ChannelRecord
      Overrides:
      intValue in class ChannelRecordImpl
      Returns:
      The data as a scalar int.
    • intValueAt

      public int intValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a int.
      Specified by:
      intValueAt in interface ChannelRecord
      Overrides:
      intValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a int array.
      Specified by:
      intArray in interface ChannelRecord
      Overrides:
      intArray in class ChannelRecordImpl
      Returns:
      The data as a int array.
    • longValue

      public long longValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      longValue in interface ChannelRecord
      Overrides:
      longValue in class ChannelRecordImpl
      Returns:
      The data as a scalar long.
    • longValueAt

      public long longValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a long.
      Specified by:
      longValueAt in interface ChannelRecord
      Overrides:
      longValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a long array.
      Specified by:
      longArray in interface ChannelRecord
      Overrides:
      longArray in class ChannelRecordImpl
      Returns:
      The data as a long array.
    • floatValue

      public float floatValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      floatValue in interface ChannelRecord
      Overrides:
      floatValue in class ChannelRecordImpl
      Returns:
      The data as a scalar float.
    • floatValueAt

      public float floatValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a float.
      Specified by:
      floatValueAt in interface ChannelRecord
      Overrides:
      floatValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a float array.
      Specified by:
      floatArray in interface ChannelRecord
      Overrides:
      floatArray in class ChannelRecordImpl
      Returns:
      The data as a float array.
    • doubleValue

      public double doubleValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      doubleValue in interface ChannelRecord
      Overrides:
      doubleValue in class ChannelRecordImpl
      Returns:
      The data as a scalar double.
    • doubleValueAt

      public double doubleValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a double.
      Specified by:
      doubleValueAt in interface ChannelRecord
      Overrides:
      doubleValueAt in class ChannelRecordImpl
      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: ChannelRecordImpl
      Get the data converted to a double array.
      Specified by:
      doubleArray in interface ChannelRecord
      Overrides:
      doubleArray in class ChannelRecordImpl
      Returns:
      The data as a double array.
    • stringValue

      public String stringValue()
      Description copied from class: ChannelRecordImpl
      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.
      Specified by:
      stringValue in interface ChannelRecord
      Overrides:
      stringValue in class ChannelRecordImpl
      Returns:
      The data as a scalar string.
    • stringValueAt

      public String stringValueAt(int index)
      Description copied from class: ChannelRecordImpl
      Get the value of the array element identified by the index and convert it to a string.
      Specified by:
      stringValueAt in interface ChannelRecord
      Overrides:
      stringValueAt in class ChannelRecordImpl
      Parameters:
      index - The index of the array element to get.
      Returns:
      The data element at the index as a scalar string.
    • stringArray

      public String[] stringArray()
      Description copied from class: ChannelRecordImpl
      Get the data converted to a string array.
      Specified by:
      stringArray in interface ChannelRecord
      Overrides:
      stringArray in class ChannelRecordImpl
      Returns:
      The data as a string array.
    • toString

      public String toString()
      Description copied from class: ChannelRecordImpl
      Override toString to return a representation of the data as an array.
      Specified by:
      toString in interface ChannelRecord
      Overrides:
      toString in class ChannelRecordImpl
      Returns:
      A string representation of this object.
    • applyTransform

      public ChannelRecord applyTransform(ValueTransform transform)
      Description copied from class: ChannelRecordImpl
      Convert the store from a raw value to a processed value.
      Specified by:
      applyTransform in interface ChannelRecord
      Overrides:
      applyTransform in class ChannelRecordImpl
      Parameters:
      transform - The transform used to convert the store.
      Returns:
      this instance as a convenience.
    • arrayValue

      public ArrayValue arrayValue()
      Description copied from class: ChannelRecordImpl
      Get the internal storage.
      Specified by:
      arrayValue in interface ChannelRecord
      Overrides:
      arrayValue in class ChannelRecordImpl
      Returns:
      The internal data storage.