Class StateCollectorChannel

  • All Implemented Interfaces:
    Channel<java.lang.Integer>

    public class StateCollectorChannel
    extends EnumReadChannel
    Collects the values of all StateChannels. This class is used for the "State" Channel of every OpenEMS Component.
    • Method Detail

      • value

        public Value<java.lang.Integer> value()
        Description copied from interface: Channel
        Gets the currently active value, wrapped in a @{link Value}.
        Specified by:
        value in interface Channel<java.lang.Integer>
        Overrides:
        value in class AbstractReadChannel<EnumDoc,​java.lang.Integer>
        Returns:
        the active value
      • addChannel

        public void addChannel​(StateChannel channel)
        Adds a Channel to this StateCollector.
        Parameters:
        channel - the Channel
      • removeChannel

        public void removeChannel​(StateChannel channel)
        Removes a Channel from this StateCollector.

        The onChange listener is removed by the Channel.deactivate() method.

        Parameters:
        channel - the Channel
      • listStates

        public java.lang.String listStates()
        Lists all States as Text.
        Returns:
        the text
      • listStates

        public java.lang.String listStates​(Level fromLevel)
        Lists all States that are at least 'fromLevel' as text.
        Parameters:
        fromLevel - the minimum Level
        Returns:
        the text