Interface PowerConfig<T>

  • All Superinterfaces:
    Behaviour, HandlerBehaviour

    @Beta
    public interface PowerConfig<T>
    extends HandlerBehaviour
    Behavior for handling port power configurations. Power operations act on a network port and a component thereof. Supported components are either the full directed port (Direction) or a wavelength on a port (OchSignal). Power levels are specified with a long and unit .01 dBm.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.Optional<java.lang.Double> currentInputPower​(PortNumber port, T component)
      Get the current input power on the component.
      java.util.Optional<java.lang.Double> currentPower​(PortNumber port, T component)
      Get the current output power on the component.
      default java.util.Optional<com.google.common.collect.Range<java.lang.Double>> getInputPowerRange​(PortNumber port, T component)
      Get the expected input power range for the component, as optical components have different working input power ranges.
      default java.util.List<PortNumber> getPorts​(T component)
      Get the ports, which support PowerConfig operations for the specified component.
      java.util.Optional<java.lang.Double> getTargetPower​(PortNumber port, T component)
      Get the target power on the component.
      default java.util.Optional<com.google.common.collect.Range<java.lang.Double>> getTargetPowerRange​(PortNumber port, T component)
      Get the acceptable target power range for setTargetPower, as optical components have different configurable output power ranges.
      void setTargetPower​(PortNumber port, T component, double power)
      Set the target power on the component.
    • Method Detail

      • getTargetPower

        java.util.Optional<java.lang.Double> getTargetPower​(PortNumber port,
                                                            T component)
        Get the target power on the component.
        Parameters:
        port - the port
        component - the port component
        Returns:
        target power in .01 dBm
      • setTargetPower

        void setTargetPower​(PortNumber port,
                            T component,
                            double power)
        Set the target power on the component.
        Parameters:
        port - the port
        component - the port component
        power - target power in .01 dBm
      • currentPower

        java.util.Optional<java.lang.Double> currentPower​(PortNumber port,
                                                          T component)
        Get the current output power on the component.
        Parameters:
        port - the port
        component - the port component
        Returns:
        power power in .01 dBm
      • currentInputPower

        default java.util.Optional<java.lang.Double> currentInputPower​(PortNumber port,
                                                                       T component)
        Get the current input power on the component.
        Parameters:
        port - the port
        component - the port component
        Returns:
        power in .01 dBm
      • getTargetPowerRange

        default java.util.Optional<com.google.common.collect.Range<java.lang.Double>> getTargetPowerRange​(PortNumber port,
                                                                                                          T component)
        Get the acceptable target power range for setTargetPower, as optical components have different configurable output power ranges.
        Parameters:
        port - the port
        component - the port component
        Returns:
        the accepted target power range, null if the component's power is not configurable. For example the port target power can only be set on TX ports.
      • getInputPowerRange

        default java.util.Optional<com.google.common.collect.Range<java.lang.Double>> getInputPowerRange​(PortNumber port,
                                                                                                         T component)
        Get the expected input power range for the component, as optical components have different working input power ranges.
        Parameters:
        port - the port
        component - the port component
        Returns:
        the expected input power range, null if the component does not have a specified input power range. For example input power range only applies to RX ports.
      • getPorts

        default java.util.List<PortNumber> getPorts​(T component)
        Get the ports, which support PowerConfig operations for the specified component.
        Parameters:
        component - the port component
        Returns:
        a set of power config ports