Package org.onosproject.net.behaviour
Interface PowerConfig<T>
-
- All Superinterfaces:
Behaviour
,HandlerBehaviour
@Beta public interface PowerConfig<T> extends HandlerBehaviour
-
-
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 supportPowerConfig
operations for the specifiedcomponent
.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.-
Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour
handler, setHandler
-
-
-
-
Method Detail
-
getTargetPower
java.util.Optional<java.lang.Double> getTargetPower(PortNumber port, T component)
Get the target power on the component.- Parameters:
port
- the portcomponent
- 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 portcomponent
- the port componentpower
- 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 portcomponent
- 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 portcomponent
- 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 portcomponent
- 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 portcomponent
- 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 supportPowerConfig
operations for the specifiedcomponent
.- Parameters:
component
- the port component- Returns:
- a set of power config ports
-
-