tieOffInterface method

void tieOffInterface(
  1. InterfaceReference<PairInterface> intfRef, {
  2. dynamic value = 0,
  3. bool fill = false,
})

Tie off input ports of intfRef from to value.

Implementation

void tieOffInterface(InterfaceReference intfRef,
    {dynamic value = 0, bool fill = false}) {
  final intf = intfRef.interface;
  final intfRole = intfRef.role;

  final portNames = intf
      .getPorts(intfRole == PairRole.consumer
          ? [PairDirection.fromProvider]
          : [PairDirection.fromConsumer])
      .keys;

  for (final portName in portNames) {
    intfRef.port(portName).tieOff(value: value, fill: fill);
  }
}