Last change
on this file since 2146 was
1704,
checked in by yushan, 5 years ago
|
Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.
|
File size:
1.7 KB
|
Rev | Line | |
---|
[638] | 1 | #ifndef __XIOS_CFileWriterFilter__ |
---|
| 2 | #define __XIOS_CFileWriterFilter__ |
---|
| 3 | |
---|
| 4 | #include "input_pin.hpp" |
---|
[1704] | 5 | #include "file.hpp" |
---|
| 6 | #include "duration.hpp" |
---|
[638] | 7 | |
---|
| 8 | namespace xios |
---|
| 9 | { |
---|
| 10 | class CField; |
---|
| 11 | |
---|
| 12 | /*! |
---|
| 13 | * A terminal filter which transmits the packets it receives to a field for writting in a file. |
---|
| 14 | */ |
---|
| 15 | class CFileWriterFilter : public CInputPin |
---|
| 16 | { |
---|
| 17 | public: |
---|
[1704] | 18 | int tag; |
---|
| 19 | Time start_graph; |
---|
| 20 | Time end_graph; |
---|
| 21 | CField* field; //<! The associated field |
---|
| 22 | int filterID; |
---|
| 23 | int distance; |
---|
| 24 | |
---|
[638] | 25 | /*! |
---|
[639] | 26 | * Constructs the filter (with one input slot) associated to the specified field |
---|
| 27 | * and a garbage collector. |
---|
[638] | 28 | * |
---|
[639] | 29 | * \param gc the associated garbage collector |
---|
[638] | 30 | * \param field the associated field |
---|
| 31 | */ |
---|
[639] | 32 | CFileWriterFilter(CGarbageCollector& gc, CField* field); |
---|
[638] | 33 | |
---|
[1704] | 34 | inline StdString GetName(void) {return "File writer filter";}; |
---|
| 35 | |
---|
| 36 | |
---|
[1158] | 37 | /*! |
---|
[1358] | 38 | * Tests if the filter must auto-trigger. |
---|
| 39 | * |
---|
| 40 | * \return true if the filter must auto-trigger |
---|
| 41 | */ |
---|
| 42 | bool virtual mustAutoTrigger() const; |
---|
| 43 | |
---|
| 44 | /*! |
---|
[1158] | 45 | * Tests whether data is expected for the specified date. |
---|
| 46 | * |
---|
| 47 | * \param date the date associated to the data |
---|
| 48 | */ |
---|
| 49 | bool virtual isDataExpected(const CDate& date) const; |
---|
| 50 | |
---|
[638] | 51 | protected: |
---|
| 52 | /*! |
---|
| 53 | * Callbacks a field to write a packet to a file. |
---|
| 54 | * |
---|
| 55 | * \param data a vector of packets corresponding to each slot |
---|
| 56 | */ |
---|
| 57 | void virtual onInputReady(std::vector<CDataPacketPtr> data); |
---|
[1704] | 58 | void virtual buildGraph(std::vector<CDataPacketPtr> data); |
---|
[638] | 59 | |
---|
| 60 | private: |
---|
| 61 | std::map<Time, CDataPacketPtr> packets; //<! The stored packets |
---|
| 62 | }; // class CFileWriterFilter |
---|
| 63 | } // namespace xios |
---|
| 64 | |
---|
| 65 | #endif //__XIOS_CFileWriterFilter__ |
---|
Note: See
TracBrowser
for help on using the repository browser.