COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_rtc_cacao.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2019 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 // Distributed under GNU - LGPL
7 //
8 // COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
9 // General Public License as published by the Free Software Foundation, either version 3 of the License,
10 // or any later version.
11 //
12 // COMPASS: End-to-end AO simulation tool using GPU acceleration
13 // The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.
14 //
15 // The final product includes a software package for simulating all the critical subcomponents of AO,
16 // particularly in the context of the ELT and a real-time core based on several control approaches,
17 // with performances consistent with its integration into an instrument. Taking advantage of the specific
18 // hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to
19 // conduct large simulation campaigns called to the ELT.
20 //
21 // The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components
22 // of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and
23 // various systems configurations such as multi-conjugate AO.
24 //
25 // COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
26 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 // See the GNU Lesser General Public License for more details.
28 //
29 // You should have received a copy of the GNU Lesser General Public License along with COMPASS.
30 // If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
31 // -----------------------------------------------------------------------------
32 
41 
42 
43 #ifndef SUTRA_RTC_CACAO_H_
44 #define SUTRA_RTC_CACAO_H_
45 
46 #include <Cacao.h>
47 
48 #include <sutra_rtc.h>
49 #include <sutra_target.h>
50 #include <sutra_wfs.h>
51 
52 template <typename Tin, typename Tcomp, typename Tout>
53 class SutraRtcCacao : public SutraRtc<Tin, Tcomp, Tout> {
54  private:
55  std::shared_ptr<ipc::Cacao<Tin>> interface_raw_frame_;
56  std::shared_ptr<ipc::Cacao<float>> interface_cal_frame_;
57  std::shared_ptr<ipc::Cacao<Tcomp>> interface_loop_frame_;
58  std::shared_ptr<ipc::Cacao<Tout>> interface_commands_;
59 
60  std::string interface_raw_frame_name_;
61  std::string interface_cal_frame_name_;
62  std::string interface_loop_frame_name_;
63  std::string interface_commands_name_;
64 
65  long framecounter_;
66 
67  int nslp_;
68  int ncmd_;
69  int nvalid_;
70 
71  bool is_initialised_;
72 
73  public:
74  SutraRtcCacao(std::string interface_cal_frame_name, std::string interface_loop_frame_name);
76 
77  void publish();
78 
79  private:
80  void allocate_buffers();
81 };
82 
83 #endif /* SUTRA_RTC_CACAO_H_ */
SutraRtcCacao::SutraRtcCacao
SutraRtcCacao(std::string interface_cal_frame_name, std::string interface_loop_frame_name)
sutra_target.h
SutraRtcCacao::~SutraRtcCacao
~SutraRtcCacao()
sutra_rtc.h
SutraRtcCacao::publish
void publish()
sutra_wfs.h
SutraRtcCacao
this class provides the rtc_cacao features to COMPASS
Definition: sutra_rtc_cacao.h:53
SutraRtc
this class provides the rtc features to COMPASS
Definition: sutra_rtc.h:60