Last change
on this file since 1984 was
1984,
checked in by ymipsl, 3 years ago
|
intermediate commit for new tranformation engine?
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "client_to_server_store_filter.hpp" |
---|
2 | #include "exception.hpp" |
---|
3 | #include "field.hpp" |
---|
4 | #include "utils.hpp" |
---|
5 | #include "context_client.hpp" |
---|
6 | #include "timer.hpp" |
---|
7 | #include "field.hpp" |
---|
8 | #include "grid.hpp" |
---|
9 | |
---|
10 | namespace xios |
---|
11 | { |
---|
12 | CClientToServerStoreFilter::CClientToServerStoreFilter(CGarbageCollector& gc, CField* field, CContextClient* client) |
---|
13 | : CInputPin(gc, 1) |
---|
14 | , field_(field), client_(client) |
---|
15 | { |
---|
16 | if (!field) |
---|
17 | ERROR("CFileWriterFilter::CFileWriterFilter(CField* field)", |
---|
18 | "The field cannot be null."); |
---|
19 | } |
---|
20 | |
---|
21 | void CClientToServerStoreFilter::onInputReady(std::vector<CDataPacketPtr> data) |
---|
22 | { |
---|
23 | CTimer::get("Field : send data").resume(); |
---|
24 | CEventClient event(field_->getType(), CField::EVENT_ID_UPDATE_DATA); |
---|
25 | CMessage message ; |
---|
26 | message<<field_->getId() << data[0]->timestamp ; |
---|
27 | field_->getSentGrid()->getClientToServerConnector(client_)->transfer(data[0]->data, client_, event, message) ; |
---|
28 | CTimer::get("Field : send data").suspend(); |
---|
29 | } |
---|
30 | |
---|
31 | bool CClientToServerStoreFilter::mustAutoTrigger() const |
---|
32 | { |
---|
33 | return true; |
---|
34 | } |
---|
35 | |
---|
36 | bool CClientToServerStoreFilter::isDataExpected(const CDate& date) const |
---|
37 | { |
---|
38 | return true; |
---|
39 | } |
---|
40 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.