API
 
Loading...
Searching...
No Matches
dm_test.hpp
Go to the documentation of this file.
2#include "../../MagAOXApp.hpp"
3#include "../dm.hpp"
4#include "../shmimMonitor.hpp"
5
6// LCOV_EXCL_START
7
8#ifndef XWCTEST_NAMESPACE
9 #define MAPPNS MagAOX::app::dev
10#else
11 #define MAPPNS MagAOX::app::dev::XWCTEST_NAMESPACE
12
13#endif
14
15namespace dm_tests
16{
17
18#ifdef XWCTEST_NAMESPACE
19namespace XWCTEST_NAMESPACE
20{
21#endif
22
23/// Test harness for dev::dm
24/**
25 * \ingroup dm_tests
26 */
27struct dmTest : public MagAOX::app::MagAOXApp<false>,
28 public MAPPNS::dm<dmTest, float>,
29 public MAPPNS::shmimMonitor<dmTest>
30{
31
32 friend class MAPPNS::dm<dmTest, float>;
33
34 typedef MAPPNS::dm<dmTest, float> dmT;
35
36 dmTest( const std::string &git_sha1, const bool git_modified )
37 : MagAOX::app::MagAOXApp<false>( git_sha1, git_modified )
38 {
39 m_configName = "dmtest";
40 m_calibDir = "/tmp/dmtest_calibs";
41 m_calibRelDir = "dmtest";
42 }
43
44 ~dmTest() noexcept
45 {
46 }
47
48 int setupConfig( mx::app::appConfigurator &config )
49 {
50 return dmT::setupConfig( config );
51 }
52
53 int loadConfig( mx::app::appConfigurator &config )
54 {
55 return dmT::loadConfig( config );
56 }
57
59 {
60 return dmT::appStartup();
61 }
62
64 {
65 return dmT::appLogic();
66 }
67
69 {
70 return dmT::appShutdown();
71 }
72
73 int initDM()
74 {
75 return 0;
76 }
77
78 int zeroDM()
79 {
80 return 0;
81 }
82
84 {
85 return 0;
86 }
87
88 void setSize( int w, int h, int d )
89 {
90 m_width = w;
91 m_height = h;
92 m_dataType = d;
93 }
94};
95
96#ifdef XWCTEST_NAMESPACE
97} // namespace XWCTEST_NAMESPACE
98#endif
99
100} // namespace dm_tests
101
102// LCOV_EXCL_STOP
The base-class for XWCTk applications.
Definition dm.hpp:19
Test harness for dev::dm.
Definition dm_test.hpp:30
dmTest(const std::string &git_sha1, const bool git_modified)
Definition dm_test.hpp:36
~dmTest() noexcept
Definition dm_test.hpp:44
int appLogic()
This is where derived applications implement their main FSM logic.
Definition dm_test.hpp:63
MAPPNS::dm< dmTest, float > dmT
Definition dm_test.hpp:34
int setupConfig(mx::app::appConfigurator &config)
Definition dm_test.hpp:48
int loadConfig(mx::app::appConfigurator &config)
Definition dm_test.hpp:53
int appShutdown()
Any tasks to perform after main loop exit go here.
Definition dm_test.hpp:68
int appStartup()
Any tasks to perform prior to the main event loop go here.
Definition dm_test.hpp:58
void setSize(int w, int h, int d)
Definition dm_test.hpp:88
#define XWCTEST_NAMESPACE