Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
UdpStream.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_RCPT_STREAM_H
25 #define SKA_CHEETAH_RCPT_STREAM_H
26 
27 #include "cheetah/rcpt/Config.h"
28 #include "cheetah/rcpt/BeamFormerDataTraits.h"
29 #include <panda/PacketStream.h>
30 #include <panda/ResourceManager.h>
31 
32 namespace ska {
33 namespace cheetah {
34 namespace rcpt {
35 
46 template<typename Producer>
47 class UdpStreamTmpl : public panda::PacketStream<UdpStreamTmpl<Producer>, panda::ConnectionTraits<panda::Udp>, BeamFormerDataTraits, Producer>
48 {
49  typedef panda::ConnectionTraits<panda::Udp> ConnectionTraits;
50  typedef panda::PacketStream<UdpStreamTmpl<Producer>, ConnectionTraits, BeamFormerDataTraits, Producer> BaseT;
51 
52  public:
53  UdpStreamTmpl(Config const& config);
54  ~UdpStreamTmpl();
55 
59  void init();
60 
61  //void deserialise_packet(typename BaseT::ContextPtr& context, typename BeamFormerDataTraits::Packet const& packet);
62 
63  // initialise the chunk (size etc.)
64  template<typename DataType>
65  std::shared_ptr<DataType> get_chunk(unsigned sequence_number, BeamFormerPacketInspector const& p);
66 
67  private:
68  unsigned _n_channels;
69  unsigned _n_samples;
70 };
71 
72 class UdpStream : public UdpStreamTmpl<UdpStream>
73 {
74  public:
75  UdpStream(Config const& config);
76  ~UdpStream();
77 
78 };
79 
80 } // namespace rcpt
81 } // namespace cheetah
82 } // namespace ska
83 #include "cheetah/rcpt/detail/UdpStream.cpp"
84 
85 #endif // SKA_CHEETAH_RCPT_STREAM_H
Traits describing the BeamFormer Data Stream to the panda::PacketSream system.
BeamFormerPacket inspection and data extraction.
Some limits and constants for FLDO.
Definition: Brdz.h:35
The UDP stream from the BeamFormer.
Definition: UdpStream.h:47
void init()
post construction initialisation (called by Producer)
Definition: UdpStream.cpp:50
configurable parameters for the rcpt
Definition: Config.h:42