receiveOther method
Makes this signals tagged with tags be driven by other.
In addition to the base Interface.receiveOther functionality, this also
handles receiving signals from all subInterfaces hierarchically when
other is a PairInterface, considering reverse.
Implementation
@override
void receiveOther(
Interface<PairDirection> other, Iterable<PairDirection> tags) {
super.receiveOther(other, tags);
if (other is PairInterface) {
subInterfaces.forEach((subIntfName, subInterface) {
if (!other.subInterfaces.containsKey(subIntfName)) {
throw InterfaceTypeException(
other, 'missing a sub-interface named $subIntfName');
}
if (_subInterfaces[subIntfName]!.reverse) {
subInterface.driveOther(other.subInterfaces[subIntfName]!, tags);
} else {
subInterface.receiveOther(other.subInterfaces[subIntfName]!, tags);
}
});
}
}