fnss.netconfig.delays.set_delays_constant — FNSS 0.1.0 documentation

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.1.0 documentation »
- API Reference »
- Functions »

# fnss.netconfig.delays.set_delays_constant

`set_delays_constant`(topology, delay=1.0, delay_unit='ms', links=None)

  Assign a constant delay to all selected links

  Parameters : | topology : Topology The topology on which delays are applied. delay : float, optional The constant delay to be applied to all links delay_unit : string, optional The unit of delays. Supported units are: “us” (microseconds), “ms” (milliseconds) and “s” (seconds) links : list, optional List of selected links on which weights are applied. If it is None, all links are selected

  Examples

      >>> import fnss
      >>> topology = fnss.Topology()
      >>> topology.add_path([1, 2, 4, 5, 8])
      >>> fnss.set_delays_constant(topology, 5.0, 'ms', links=[(1,2), (5,8), (4,5)])
      >>> delay = fnss.get_delays(topology)
      >>> delay[(1, 2)]
      5.0

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.1.0 documentation »
- API Reference »
- Functions »