]> AND Private Git Repository - blast.git/blobdiff - FunctionalBlock.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
added admittance computation
[blast.git] / FunctionalBlock.h
index 2cf9a5afc01929f78b88f7abc352f5403fcce4b7..6f47a008033b7747ed9d7508c3dd6e4c158dd9cd 100644 (file)
@@ -31,6 +31,10 @@ public:
   // getters\r
   inline ReferenceBlock* getReference() { return reference; }\r
   inline QList<int> getProductionCounter() { return productionCounter; }\r
+  inline QMap<AbstractInterface*, QList<char>* > getConsumptionPattern() { return consumptionPattern; }\r
+  inline QMap<AbstractInterface*, QList<char>* > getProductionPattern() { return productionPattern; }\r
+  inline int getConsumptionPatternLength() { return lengthCP; }\r
+  inline int getProductionPatternLength() { return lengthPP; }\r
   inline int getDelta() { return delta; }\r
   \r
   // setters\r
@@ -57,8 +61,13 @@ public:
   bool createConsumptionPattern(); // initialize a QList<char> for each interface from patterns defined in implementation\r
   bool createProductionPattern(); // initialize a QList<char> for each interface from patterns defined in implementation\r
   bool createProductionCounter(); // initialize a QList<int> from counter defined in implementation\r
+  bool createAdmittance(int nbExec); // initialize a QList<char> from consumption pattern and delta\r
   void clearConsumptionPattern();\r
   void clearProductionPattern();\r
+  void createInputPattern();\r
+  void clearInputPattern();\r
+  int getNumberOfExecution(); // compute number of block execution from inputPattern and delta\r
+  bool checkInputPatternCompatibility();\r
   bool computeOutputPattern(int nbExec = -1);\r
   \r
 private:  \r
@@ -126,12 +135,17 @@ private:
   void shiftRightPattern(const QMap<AbstractInterface*, QList<char>* >& pattern, int offset);\r
 \r
   QMap<AbstractInterface*, QList<char>* > consumptionPattern;\r
-  QMap<AbstractInterface*, QString > admittance; // the admittance expressed as prologue-cyclic part-eppilogue\r
-  QMap<AbstractInterface*, QList<char>* > admittanceExpanded; // the admittance expanded by taking into account nb exec.\r
+  QMap<AbstractInterface*, QString > admittanceCyclic; // the admittance expressed as prologue-cyclic part-eppilogue, deduced from admittance\r
+  QMap<AbstractInterface*, QList<char>* > admittance; // the admittance taking into account nb exec.\r
   QMap<AbstractInterface*, QList<char>* > productionPattern;\r
+  QMap<AbstractInterface*,QList<char>* > inputPattern;\r
   QMap<AbstractInterface*, QList<char>* > outputPattern; // CAUTION: the QList<char>* must also be stored in the outputPattern attributes of AbstractInterface\r
   QList<int> productionCounter; //! only usefull for control output interfaces\r
-  \r
+  int lengthIP; // for convenience, set in createInputPattern()\r
+  int lengthCP; // for convenience, set in createConsumptionPattern()\r
+  int lengthAP; // for convenience, set in createAdmittance()\r
+  int lengthPP;  // for convenience, set in createProductionPattern()\r
+  int lengthOP;  // for convenience, set in computeOutputPattern()\r
   int delta;\r
     \r
   ArithmeticEvaluator* evaluator;\r