Last change
on this file since 1883 was
1883,
checked in by ymipsl, 4 years ago
|
XIOS coupling branch
Adopt infrastructure based on filter for reading data on server side and sending it to the client, in a similar way on what is done for other case.
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
877 bytes
|
Line | |
---|
1 | #include "file_server_reader_filter.hpp" |
---|
2 | #include "grid.hpp" |
---|
3 | #include "field.hpp" |
---|
4 | #include "exception.hpp" |
---|
5 | #include "calendar_util.hpp" |
---|
6 | #include <limits> |
---|
7 | |
---|
8 | namespace xios |
---|
9 | { |
---|
10 | CFileServerReaderFilter::CFileServerReaderFilter(CGarbageCollector& gc, CField* field) : COutputPin(gc), field_(field) |
---|
11 | { |
---|
12 | |
---|
13 | } |
---|
14 | |
---|
15 | void CFileServerReaderFilter::streamData(CDate date, const CArray<double, 1>& data) |
---|
16 | { |
---|
17 | CDataPacketPtr packet(new CDataPacket); |
---|
18 | packet->date = date; |
---|
19 | packet->timestamp = date; |
---|
20 | packet->status = CDataPacket::NO_ERROR; |
---|
21 | packet->data.reference(data.copy()) ; |
---|
22 | onOutputReady(packet); |
---|
23 | } |
---|
24 | |
---|
25 | void CFileServerReaderFilter::signalEndOfStream(CDate date) |
---|
26 | { |
---|
27 | CDataPacketPtr packet(new CDataPacket); |
---|
28 | packet->date = date; |
---|
29 | packet->timestamp = date; |
---|
30 | packet->status = CDataPacket::END_OF_STREAM; |
---|
31 | onOutputReady(packet); |
---|
32 | } |
---|
33 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.