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 Detail

      • getTargetPower

        Optional<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

        Optional<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 Optional<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 Optional<com.google.common.collect.Range<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 Optional<com.google.common.collect.Range<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 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