Ignore:
Timestamp:
07/02/19 11:42:27 (5 years ago)
Author:
yushan
Message:

MARK: Dynamic workflow graph developement. Branch up to date with trunk @1676. Using vis.js

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/filter/store_filter.cpp

    r1677 r1679  
    9090  void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data) 
    9191  { 
    92     if(CXios::isClient) std::cout<<"CStoreFilter onInputReady"<<std::endl; 
    9392 
    94     if(this->tag) 
     93    bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 
     94 
     95    if(building_graph) 
    9596    { 
    9697      this->filterID = InvalidableObject::filterIdGenerator++; 
     98      int edgeID = InvalidableObject::edgeIdGenerator++; 
    9799 
    98       if(CWorkflowGraph::mapFieldToFilters_ptr==0) CWorkflowGraph::mapFieldToFilters_ptr = new std::unordered_map <StdString, vector <int> >; 
    99       if(CWorkflowGraph::mapFilters_ptr==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>; 
     100      if(CWorkflowGraph::mapFieldToFilters_ptr_with_info==0) CWorkflowGraph::mapFieldToFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_edge >; 
     101      if(CWorkflowGraph::mapFilters_ptr_with_info==0) CWorkflowGraph::mapFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_node>; 
    100102 
    101       (*CWorkflowGraph::mapFilters_ptr)[this->filterID] = "Store Filter"; 
     103 
     104      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_name = "Store Filter"; 
     105      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_class = 4; 
     106      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_filled = 1; 
     107      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb = 1; 
     108      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].date = data[0]->date; 
     109      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].timestamp = data[0]->timestamp; 
    102110 
    103111      if(CXios::isClient) std::cout<<"CStoreFilter::apply filter tag = "<<this->tag<<std::endl; 
    104112 
    105       if(CXios::isClient)  
     113      if(CXios::isClient && CWorkflowGraph::build_begin)  
    106114      { 
    107         StdString str = data[0]->fieldID +" ts=" + to_string(data[0]->timestamp); 
    108         (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(data[0]->src_filterID); 
    109         (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(this->filterID);   
     115        CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]);; 
     116        (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; 
    110117      } 
     118      else CWorkflowGraph::build_begin = true; 
    111119    } 
    112120 
Note: See TracChangeset for help on using the changeset viewer.