pairConnectIO method
A simplified version of connectIO for PairInterfaces where by only
specifying the role
, the input and output tags can be inferred.
Implementation
void pairConnectIO(
Module module, Interface<PairDirection> srcInterface, PairRole role,
{String Function(String original)? uniquify}) {
Set<PairDirection> inputTags;
Set<PairDirection> outputTags;
switch (role) {
case PairRole.consumer:
inputTags = {
PairDirection.sharedInputs,
PairDirection.fromProvider,
};
outputTags = {
PairDirection.fromConsumer,
};
break;
case PairRole.provider:
inputTags = {
PairDirection.sharedInputs,
PairDirection.fromConsumer,
};
outputTags = {
PairDirection.fromProvider,
};
break;
}
connectIO(module, srcInterface,
inputTags: inputTags, outputTags: outputTags, uniquify: uniquify);
}