Class ChannelGroup

java.lang.Object
xal.service.pvlogger.ChannelGroup

public class ChannelGroup extends Object
ChannelGroup is a wrapper for the PV_SET data source which defines a group of related PVs.
Author:
tap
  • Field Details

    • defaultLoggingPeriod

      protected final double defaultLoggingPeriod
      default logging period (seconds) for the group
    • retention

      protected final double retention
      retention time in days (or zero for permanent retention) for snapshots associated with this group
    • label

      protected final String label
      label of the channel group
    • serviceId

      protected final String serviceId
      service ID
    • description

      protected final String description
      description of the channel group
    • channelWrappers

      protected ChannelWrapper[] channelWrappers
      array of channel wrappers
    • connectionHandler

      protected ChannelGroup.ConnectionHandler connectionHandler
      handler of channel connection events
  • Constructor Details

    • ChannelGroup

      public ChannelGroup(String label, String serviceID, String description, String[] pvs, double loggingPeriod, double retention)
      Primary Constructor
      Parameters:
      label - The group's label
      description - A description of the group
      pvs - The PVs in the group
      loggingPeriod - The default logging period for the group
      retention - the rentention time in days (or zero for permanent retention) for snapshots associated with this group
    • ChannelGroup

      public ChannelGroup(String label, String serviceID, String description, String[] pvs, double loggingPeriod)
      Constructor
      Parameters:
      label - The group's label
      description - A description of the group
      pvs - The PVs in the group
      loggingPeriod - The default logging period for the group
    • ChannelGroup

      public ChannelGroup(String groupLabel, String serviceID, String[] pvs, double loggingPeriod)
      Constructor
      Parameters:
      groupLabel - The group's label
      pvs - The PVs in the group
      loggingPeriod - The default logging period for the group
  • Method Details

    • dispose

      public void dispose()
      Dispose of this channel group's resources
    • getLabel

      public String getLabel()
      Get the group label.
      Returns:
      the group label.
    • getServiceID

      public String getServiceID()
      Get the service ID
      Returns:
      the service ID
    • getDescription

      public String getDescription()
      Get a description of the group
      Returns:
      a description of this group
    • getDefaultLoggingPeriod

      public double getDefaultLoggingPeriod()
      Get the default logging period for this group
      Returns:
      the default logging period in seconds
    • getRetention

      public double getRetention()
      get the retention in days (or 0 for permanent) of the snapshots associated with this group
    • wrapPVs

      protected void wrapPVs(String[] pvs)
      Create ChannelWrappers for the specified pvs.
      Parameters:
      pvs - the list of PVs to wrap
    • requestConnections

      public void requestConnections()
      Request connections to the channel wrappers.
    • getChannelWrappers

      public ChannelWrapper[] getChannelWrappers()
      Get the channel wrappers for the channels associated with this group.
      Returns:
      The array of channel wrappers of this group.
    • getChannels

      public Collection<Channel> getChannels()
      Get the collection of channels which we attempt to monitor
      Returns:
      a collection of channels corresponding to the channel wrappers
    • getChannelCount

      public int getChannelCount()
      Get the number of channels in this group
      Returns:
      The number of channels in this group
    • getLastChannelEventTime

      public Date getLastChannelEventTime()
      Get the timestamp of the last channel event (e.g. channel connected/disconnected event)
      Returns:
      the wall clock timestamp of the last channel event
    • toString

      public String toString()
      Override toString() to return the group label and a description
      Overrides:
      toString in class Object
      Returns:
      the group label and description