X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/7af5c69c22148510cf8f042552018c9b966860cd..2019e5afdaf7fd0ad21607848710348bbc3be256:/FunctionalBlock.h diff --git a/FunctionalBlock.h b/FunctionalBlock.h index 2cf9a5a..6f47a00 100644 --- a/FunctionalBlock.h +++ b/FunctionalBlock.h @@ -31,6 +31,10 @@ public: // getters inline ReferenceBlock* getReference() { return reference; } inline QList getProductionCounter() { return productionCounter; } + inline QMap* > getConsumptionPattern() { return consumptionPattern; } + inline QMap* > getProductionPattern() { return productionPattern; } + inline int getConsumptionPatternLength() { return lengthCP; } + inline int getProductionPatternLength() { return lengthPP; } inline int getDelta() { return delta; } // setters @@ -57,8 +61,13 @@ public: bool createConsumptionPattern(); // initialize a QList for each interface from patterns defined in implementation bool createProductionPattern(); // initialize a QList for each interface from patterns defined in implementation bool createProductionCounter(); // initialize a QList from counter defined in implementation + bool createAdmittance(int nbExec); // initialize a QList from consumption pattern and delta void clearConsumptionPattern(); void clearProductionPattern(); + void createInputPattern(); + void clearInputPattern(); + int getNumberOfExecution(); // compute number of block execution from inputPattern and delta + bool checkInputPatternCompatibility(); bool computeOutputPattern(int nbExec = -1); private: @@ -126,12 +135,17 @@ private: void shiftRightPattern(const QMap* >& pattern, int offset); QMap* > consumptionPattern; - QMap admittance; // the admittance expressed as prologue-cyclic part-eppilogue - QMap* > admittanceExpanded; // the admittance expanded by taking into account nb exec. + QMap admittanceCyclic; // the admittance expressed as prologue-cyclic part-eppilogue, deduced from admittance + QMap* > admittance; // the admittance taking into account nb exec. QMap* > productionPattern; + QMap* > inputPattern; QMap* > outputPattern; // CAUTION: the QList* must also be stored in the outputPattern attributes of AbstractInterface QList productionCounter; //! only usefull for control output interfaces - + int lengthIP; // for convenience, set in createInputPattern() + int lengthCP; // for convenience, set in createConsumptionPattern() + int lengthAP; // for convenience, set in createAdmittance() + int lengthPP; // for convenience, set in createProductionPattern() + int lengthOP; // for convenience, set in computeOutputPattern() int delta; ArithmeticEvaluator* evaluator;