Last change
on this file since 1930 was
1930,
checked in by ymipsl, 4 years ago
|
Big update on on going work related to data distribution and transfer between clients and servers.
Revisite of the source and store filter using "connectors".
YM
|
-
Property svn:executable set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | #ifndef __XIOS_CLIENT_FROM_SERVER_SOURCE_FILTER__ |
---|
2 | #define __XIOS_CLIENT_FROM_SERVER_SOURCE_FILTER__ |
---|
3 | |
---|
4 | #include <map> |
---|
5 | |
---|
6 | #include "output_pin.hpp" |
---|
7 | #include "event_server.hpp" |
---|
8 | #include "calendar_util.hpp" |
---|
9 | |
---|
10 | |
---|
11 | namespace xios |
---|
12 | { |
---|
13 | class CGrid; |
---|
14 | class CField; |
---|
15 | |
---|
16 | /*! |
---|
17 | * A source filter is the entry point of the data in the graph of filters. |
---|
18 | */ |
---|
19 | class CClientFromServerSourceFilter : public COutputPin |
---|
20 | { |
---|
21 | public: |
---|
22 | /*! |
---|
23 | * Constructs a source filter accepting data attached to the specified grid. |
---|
24 | * |
---|
25 | * \param gc the garbage collector associated with this filter |
---|
26 | * \param field associated to the filter |
---|
27 | */ |
---|
28 | CClientFromServerSourceFilter(CGarbageCollector& gc, CField* field); |
---|
29 | |
---|
30 | /*! |
---|
31 | * Transforms the data received from the model into a packet and send it |
---|
32 | * in the filter graph. The array containing the data can safely be reused |
---|
33 | * immediately after this method returns. |
---|
34 | * |
---|
35 | * \param event the event coming from server with the associated data |
---|
36 | */ |
---|
37 | void streamData(CEventServer& event); |
---|
38 | bool isDataLate(void) ; |
---|
39 | bool isEOF() {return isEOF_ ;} |
---|
40 | |
---|
41 | private: |
---|
42 | CGrid* grid_; //!< The grid attached to the data the filter can accept |
---|
43 | CDuration freqOp_ ; |
---|
44 | CDuration offset_ ; |
---|
45 | |
---|
46 | bool wasDataAlreadyReceived_= false ; |
---|
47 | CDate lastDateReceived_ ; |
---|
48 | bool isEOF_ = false ; |
---|
49 | CDate dateEOF_ ; |
---|
50 | }; // class CClientFromServerSourceFilter |
---|
51 | } // namespace xios |
---|
52 | |
---|
53 | #endif //__XIOS_CLIENT_FROM_SERVER_SOURCE_FILTER__ |
---|
Note: See
TracBrowser
for help on using the repository browser.