X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/1b7818e18ed7bcf3464e307b97c6e0e6d72cc69b..a13795fc34cd1e74f94695d35253c3d00abec9bc:/GroupInterface.cpp?ds=inline diff --git a/GroupInterface.cpp b/GroupInterface.cpp index 5f292b6..bfeb1ff 100644 --- a/GroupInterface.cpp +++ b/GroupInterface.cpp @@ -122,13 +122,39 @@ bool GroupInterface::canConnectFrom(AbstractInterface *iface) { if ((direction == Input) && (iface->getDirection() == Input) && (purpose == iface->getPurpose())) return true; if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true; } - else if ((getOwner()->isTopGroupBlock()) && (iface->getOwner()->isSourceBlock())) { + else if ((getOwner()->isTopGroupBlock()) && (iface->getOwner()->isStimuliBlock())) { if ((direction == Input) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true; } return false; } +int GroupInterface::getClockDomain() throw(Exception) { + + int idClock = -1; + + GroupInterface* iface = NULL; + if (clkIfaceType == ClockName) { + iface = AI_TO_GRP(getClockIface()); + } + else if ((direction == Input) && (purpose == Clock)) { + iface = this; + } + + if ( iface != NULL) { + + QString name = iface->getName(); + name.remove(0,8); + bool ok; + idClock = name.toInt(&ok); + if (!ok) throw(Exception(IFACE_INVALID_CLKFREQ,this)); + + } + + return idClock; +} + + void GroupInterface::connectionsValidation(QStack *interfacetoValidate, QList *validatedInterfaces) throw(Exception) { cout << "group interface connection validation" << endl; }