X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8fb3c55ee009a11db5e1c08a4cfb286979412745..a13795fc34cd1e74f94695d35253c3d00abec9bc:/GroupInterface.cpp?ds=sidebyside diff --git a/GroupInterface.cpp b/GroupInterface.cpp index b42e7a0..bfeb1ff 100644 --- a/GroupInterface.cpp +++ b/GroupInterface.cpp @@ -129,6 +129,32 @@ bool GroupInterface::canConnectFrom(AbstractInterface *iface) { 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; }