@Beta public interface PowerConfig<T> extends HandlerBehaviour
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.Long> |
currentPower(PortNumber port,
T component)
Get the current power on the component.
|
default java.util.Optional<com.google.common.collect.Range<java.lang.Long>> |
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.Long> |
getTargetPower(PortNumber port,
T component)
Get the target power on the component.
|
default java.util.Optional<com.google.common.collect.Range<java.lang.Long>> |
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,
long power)
Set the target power on the component.
|
handler, setHandler
java.util.Optional<java.lang.Long> getTargetPower(PortNumber port, T component)
port
- the portcomponent
- the port componentvoid setTargetPower(PortNumber port, T component, long power)
port
- the portcomponent
- the port componentpower
- target power in .01 dBmjava.util.Optional<java.lang.Long> currentPower(PortNumber port, T component)
port
- the portcomponent
- the port componentdefault java.util.Optional<com.google.common.collect.Range<java.lang.Long>> getTargetPowerRange(PortNumber port, T component)
port
- the portcomponent
- the port componentdefault java.util.Optional<com.google.common.collect.Range<java.lang.Long>> getInputPowerRange(PortNumber port, T component)
port
- the portcomponent
- the port componentdefault java.util.List<PortNumber> getPorts(T component)
PowerConfig
operations for the specified
component
.component
- the port component