Changeset 756
- Timestamp:
- 10/23/15 10:49:19 (9 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/filter/source_filter.cpp
r650 r756 2 2 #include "grid.hpp" 3 3 #include "exception.hpp" 4 #include "calendar_util.hpp" 4 5 5 6 namespace xios 6 7 { 7 CSourceFilter::CSourceFilter(CGrid* grid )8 CSourceFilter::CSourceFilter(CGrid* grid, const CDuration offset /*= NoneDu*/) 8 9 : grid(grid) 10 , offset(offset) 9 11 { 10 12 if (!grid) … … 16 18 void CSourceFilter::streamData(CDate date, const CArray<double, N>& data) 17 19 { 20 date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 21 18 22 CDataPacketPtr packet(new CDataPacket); 19 23 packet->date = date; … … 33 37 void CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data) 34 38 { 39 date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter 40 35 41 CDataPacketPtr packet(new CDataPacket); 36 42 packet->date = date; -
XIOS/trunk/src/filter/source_filter.hpp
r643 r756 20 20 * 21 21 * \param grid the grid to which the data is attached 22 * \param offset the offset applied to the timestamp of all packets 22 23 */ 23 CSourceFilter(CGrid* grid );24 CSourceFilter(CGrid* grid, const CDuration offset = NoneDu); 24 25 25 26 /*! … … 53 54 private: 54 55 CGrid* grid; //!< The grid attached to the data the filter can accept 56 const CDuration offset; //!< The offset applied to the timestamp of all packets 55 57 }; // class CSourceFilter 56 58 } // namespace xios -
XIOS/trunk/src/node/field.cpp
r746 r756 611 611 // Check if the data is to be read from a file 612 612 else if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read) 613 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(grid)); 613 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(grid, 614 freq_offset.isEmpty() ? NoneDu : freq_offset)); 614 615 else // The data might be passed from the model 615 616 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(grid));
Note: See TracChangeset
for help on using the changeset viewer.