Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
SpCclSpeadStreamer.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef SKA_CHEETAH_EXPORTERS_SPCCLSPEADSTREAMER_H
25 #define SKA_CHEETAH_EXPORTERS_SPCCLSPEADSTREAMER_H
26 
27 #ifdef ENABLE_SPEAD
28 #include "SpCclSpeadStreamerConfig.h"
29 #include "detail/SpCclSpeadStreamTraits.h"
30 #include "cheetah/data/SpCcl.h"
31 #include <panda/ChannelId.h>
32 #include <panda/ConnectionTraits.h>
33 #include <panda/Connection.h>
34 #include <spead2/common_defines.h>
35 #include <spead2/common_flavour.h>
36 #include <spead2/send_heap.h>
37 #include <spead2/send_udp.h>
38 
39 namespace ska {
40 namespace cheetah {
41 namespace exporters {
42 
48 class SpCclSpeadStreamer : public SpCclSpeadStreamTraits
49 {
50  typedef panda::ConnectionTraits<panda::Udp> ConnectionTraits;
51 
52  public:
53  SpCclSpeadStreamer(SpCclSpeadStreamerConfig const&, panda::Engine&);
54  SpCclSpeadStreamer(SpCclSpeadStreamer const&) = delete;
55  ~SpCclSpeadStreamer();
56 
57  template<typename NumericalRep>
58  SpCclSpeadStreamer& operator<<(data::SpCcl<NumericalRep> const&);
59 
60  private:
61  SpCclSpeadStreamerConfig const& _config;
62  spead2::flavour _sp_flavour;
63  spead2::send::heap _sp_end;
64  spead2::send::udp_stream _sp_stream;
65  spead2::descriptor _tf_data_desc;
66  spead2::descriptor _ft_data_desc;
67  spead2::descriptor _data_start_time_desc;
68  spead2::descriptor _data_number_of_channels_desc;
69  spead2::descriptor _data_sammple_interval;
70  spead2::descriptor _data_channel_1;
71  spead2::descriptor _data_channel_width;
72  spead2::descriptor _candidate_start_time_desc;
73  spead2::descriptor _candidate_dm_desc;
74  spead2::descriptor _candidate_width_desc;
75  spead2::descriptor _candidate_sigma_desc;
76  spead2::descriptor _candidate_duration_desc;
77 };
78 
79 } // namespace exporters
80 } // namespace cheetah
81 } // namespace ska
82 
83 #include "detail/SpCclSpeadStreamer.cpp"
84 #endif // ENABLE_SPEAD
85 
86 #endif // SKA_CHEETAH_EXPORTERS_SPCCLSPEADSTREAMER_H
Some limits and constants for FLDO.
Definition: Brdz.h:35