Ignore:
Timestamp:
11/28/16 14:02:54 (8 years ago)
Author:
rlacroix
Message:

The workflow is now triggered when using xios_recv_field for fields in read mode received from the servers.

Previously the workflow was triggered upon receiving the data which could cause deadlocks since there are no garanties that clients are receiving data at the same time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/garbage_collector.hpp

    r639 r1006  
    55#include <set> 
    66 
    7 #include "input_pin.hpp" 
     7#include "date.hpp" 
    88 
    99namespace xios 
    1010{ 
     11  /*! 
     12   * Interface shared by all objects that might need to invalidate packets. 
     13   */ 
     14  struct InvalidableObject 
     15  { 
     16    /*! 
     17     * Removes all pending packets which are older than the specified timestamp. 
     18     * 
     19     * \param timestamp the timestamp used for invalidation 
     20     */ 
     21    void virtual invalidate(Time timestamp) = 0; 
     22  }; // struct InvalidableObject 
     23 
    1124  /*! 
    1225   * A basic garbage collector which ensures no old packets linger in the filter graph. 
     
    2235 
    2336      /*! 
    24        * Registers a filter for a specified timestamp. 
     37       * Registers an object for a specified timestamp. 
    2538       * 
    26        * \param inputPin the input pin of the filter to register 
    27        * \param timestamp the timestamp for which the filter is registered 
     39       * \param object the object to register 
     40       * \param timestamp the timestamp for which the object is registered 
    2841       */ 
    29       void registerFilter(CInputPin* inputPin, Time timestamp); 
     42      void registerObject(InvalidableObject* object, Time timestamp); 
    3043 
    3144      /*! 
    32        * Removes a filter previously registered for a specified timestamp. 
     45       * Removes a object previously registered for a specified timestamp. 
    3346       * 
    34        * \param inputPin the input pin of the filter to unregister 
    35        * \param timestamp the timestamp for which the filter is unregistered 
     47       * \param object the object to unregister 
     48       * \param timestamp the timestamp for which the object is unregistered 
    3649       */ 
    37       void unregisterFilter(CInputPin* inputPin, Time timestamp); 
     50      void unregisterObject(InvalidableObject* object, Time timestamp); 
    3851 
    3952      /*! 
    40        * Ensures all registered filters invalidate packets older than the specified timestamp. 
     53       * Ensures all registered objects invalidate packets older than the specified timestamp. 
    4154       * 
    4255       * \param timestamp the timestamp used for invalidation 
     
    4861      CGarbageCollector& operator=(const CGarbageCollector&); 
    4962 
    50       std::map<Time, std::set<CInputPin*> > registeredFilters; //!< Currently registered filters 
     63      std::map<Time, std::set<InvalidableObject*> > registeredObjects; //!< Currently registered objects 
    5164  }; // class CGarbageCollector 
    5265} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.