Class GPClient


  • public class GPClient
    extends Object
    The default instance for the gpclient.
    Author:
    carcassi
    • Constructor Detail

      • GPClient

        public GPClient()
    • Method Detail

      • readOnce

        public static Future<org.epics.vtype.VType> readOnce​(String channelName)
        Reads the value of the given expression, asking for VType values.
        Parameters:
        channelName - the name of the channel
        Returns:
        the future value
      • readOnce

        public static <R> Future<R> readOnce​(Expression<R,​?> expression)
        Reads the value of the given expression.
        Type Parameters:
        R - the read type
        Parameters:
        expression - the expression to read
        Returns:
        the future value
      • read

        public static PVReaderConfiguration<org.epics.vtype.VType> read​(String channelName)
        Reads the channel with the given name, asking for VType values.
        Parameters:
        channelName - the name of the channel
        Returns:
        the configuration options
      • read

        public static <R> PVReaderConfiguration<R> read​(Expression<R,​?> expression)
        Reads the given expression.
        Type Parameters:
        R - the read type
        Parameters:
        expression - the expression to read
        Returns:
        the configuration options
      • readAndWrite

        public static PVConfiguration<org.epics.vtype.VType,​Object> readAndWrite​(String channelName)
        Reads and writes the channel with the given name, asking for VType values.
        Parameters:
        channelName - the name of the channel
        Returns:
        the configuration options
      • readAndWrite

        public static <R,​W> PVConfiguration<R,​W> readAndWrite​(Expression<R,​W> expression)
        Reads and writes the given expression.
        Type Parameters:
        R - the read type
        W - the write type
        Parameters:
        expression - the expression to read and write
        Returns:
        the configuration options
      • cacheLastValue

        public static <R> ReadCollector<R,​R> cacheLastValue​(Class<R> readType)
        Keep only the latest value from the channel.

        In case of data bursts (i.e. data coming in at rate faster than the reader can handle) this strategy will skip the notification in between, but always notify on the last value.

        Type Parameters:
        R - the type to read
        Parameters:
        readType - the type to read
        Returns:
        the caching strategy
      • queueAllValues

        public static <R> ReadCollector<R,​List<R>> queueAllValues​(Class<R> readType)
        Return all the values queued from the last update.

        In case of data bursts (i.e. data coming in at rate faster than the reader can handle) this strategy will combine the notifications and return all the values.

        Type Parameters:
        R - the type to read
        Parameters:
        readType - the type to read
        Returns:
        the caching strategy
      • writeType

        public static <W> WriteCollector<W> writeType​(Class<W> writeType)
        A write buffer for the the given type.
        Type Parameters:
        W - the type to write
        Parameters:
        writeType - the type to write
        Returns:
        the caching strategy
      • channel

        public static <R,​W> Expression<R,​W> channel​(String channelName,
                                                                ReadCollector<?,​R> readCollector,
                                                                WriteCollector<W> writeCollector)
        A channel that reads and writes the given data types with the given strategy.
        Type Parameters:
        R - the type to read
        W - the type to write
        Parameters:
        channelName - the name of the channel
        readCollector - the read buffer
        writeCollector - the write buffer
        Returns:
        a new channel expression
      • channel

        public static <R> Expression<R,​Object> channel​(String channelName,
                                                             ReadCollector<?,​R> readCollector)
        A channel that reads the given data type with the given strategy.
        Type Parameters:
        R - the type to read
        Parameters:
        channelName - the name of the channel
        readCollector - the read buffer
        Returns:
        a new channel expression
      • channel

        public static Expression<org.epics.vtype.VType,​Object> channel​(String channelName)
        A channel that reads VTypes caching the latest value.
        Parameters:
        channelName - the name of the channel
        Returns:
        a new channel expression
      • collector

        public static <R,​C,​W> CollectorExpression<R,​C,​W> collector​(ReadCollector<C,​R> readCollector,
                                                                                           WriteCollector<W> writeCollector)
        An expression that allows to directly send/receive values to/from PVReaders/PVWriters. This can be used for testing purpose or to integrate data models that do not fit datasources or services.
        Type Parameters:
        R - the type to read
        C - the type to collect
        W - the type to write
        Parameters:
        readCollector - the read buffer
        writeCollector - the write buffer
        Returns:
        a new collector expression
      • collector

        public static <R,​C> CollectorExpression<R,​C,​Object> collector​(ReadCollector<C,​R> readCollector)
        An expression that allows to directly send/receive values to/from PVReaders/PVWriters. This can be used for testing purpose or to integrate data models that do not fit datasources or services.
        Type Parameters:
        R - the type to read
        C - the type to collect
        Parameters:
        readCollector - the read buffer
        Returns:
        a new collector expression
      • collector

        public static CollectorExpression<org.epics.vtype.VType,​org.epics.vtype.VType,​Object> collector()
        An expression that allows to directly send/receive values to/from PVReaders/PVWriters. This can be used for testing purpose or to integrate data models that do not fit datasources or services.
        Returns:
        a new collector expression
      • defaultInstance

        public static GPClientInstance defaultInstance()
        The default instance of the general purpose client.
        Returns:
        the default instance