Ignore:
Timestamp:
01/10/17 14:36:29 (7 years ago)
Author:
oabramkina
Message:

Intermeadiate version for merging with new server functionalities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/filter/input_pin.hpp

    r639 r1021  
    55#include <map> 
    66 
     7#include "garbage_collector.hpp" 
    78#include "data_packet.hpp" 
    89 
    910namespace xios 
    1011{ 
    11   class CGarbageCollector; 
     12  class COutputPin; 
    1213 
    1314  /*! 
    1415   * An input pin handles the data packets received by a filter. 
    1516   */ 
    16   class CInputPin 
     17  class CInputPin : public InvalidableObject 
    1718  { 
    1819    public: 
     
    2728 
    2829      /*! 
     30       * Sets the trigger for a specific input slot. 
     31       * 
     32       * \param inputSlot the input slot number 
     33       * \param trigger the corresponding trigger 
     34       */ 
     35      void virtual setInputTrigger(size_t inputSlot, COutputPin* trigger); 
     36 
     37      /*! 
    2938       * Receives a data packet from an upstream filter on 
    3039       * the specified input slot. 
     
    3746 
    3847      /*! 
     48       * Triggers the input of any buffered packet for the specified timestamp. 
     49       * 
     50       * \param timestamp the timestamp for which we are triggering the input 
     51       */ 
     52      void virtual trigger(Time timestamp); 
     53 
     54      /*! 
     55       * Tests if the pin can be triggered. 
     56       * 
     57       * \return true if the pin can be triggered 
     58       */ 
     59      bool virtual canBeTriggered() const; 
     60 
     61      /*! 
    3962       * Removes all pending packets which are older than the specified timestamp. 
    4063       * 
     
    4467 
    4568    protected: 
    46       CGarbageCollector& gc; //!< The garbage collector associated to the input pin 
    47  
    4869      /*! 
    4970       * Function triggered when all slots have been filled for a specific timestamp. 
     
    7596      }; 
    7697 
     98      CGarbageCollector& gc; //!< The garbage collector associated to the input pin 
     99 
    77100      size_t slotsCount; //!< The number of slots 
    78101 
    79102      //! Input buffer, store the packets until all slots are full for a timestep 
    80103      std::map<Time, InputBuffer> inputs; 
     104 
     105      //! Store the triggers corresponding to the input slots 
     106      std::vector<COutputPin*> triggers; 
     107 
     108      //! Whether some triggers have been set 
     109      bool hasTriggers; 
    81110  }; // class CInputPin 
    82111} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.