Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
CubeDataThreadTester.h
1 #ifndef CubeDataThreadTester_h
2 #define CubeDataThreadTester_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <QThread>
11 
12 template<typename T> class QList;
13 template<typename A, typename B> struct QPair;
14 
15 namespace Isis {
16  class Brick;
17  class CubeDataThread;
18 
25  class CubeDataThreadTester : public QThread {
26  Q_OBJECT
27 
28  public:
30  virtual ~CubeDataThreadTester();
31 
34  return p_numTestsDone;
35  }
36 
39  return p_cubeDataThread;
40  }
41 
42  void Connect();
43  void ReadCubeTest(int);
44  void ReadCubeTest2(int, int);
45  void ReadCubeTest3(int);
46  void WriteCubeTest(int);
47  void WriteCubeTest2(int, int);
48  void WriteCubeTest3(int);
50  void NotifyChangeTest(int);
51 
52  public slots:
53  void ReadBrick(void *requester, int cubeId, const Isis::Brick *data);
54  void ReadWriteBrick(void *requester, int cubeId, Isis::Brick *data);
55  void BrickChanged(int cubeId, const Isis::Brick *data);
56 
57  signals:
69  void RequestReadCube(int cubeId, int startSample, int startLine,
70  int endSample, int endLine, int band, void *caller);
71 
72 
84  void RequestReadWriteCube(int cubeId, int startSample, int startLine,
85  int endSample, int endLine, int band, void *caller);
86 
87 
92  void NotifyDoneWithData(int, const Isis::Brick *);
93 
94  private:
96  void run();
97 
100 
103 
106 
109 
112  };
113 
114 };
115 
116 
117 #endif
Isis::CubeDataThreadTester::p_numTestsDone
int p_numTestsDone
The count of completed tests.
Definition: CubeDataThreadTester.h:99
Isis::CubeDataThreadTester::p_cubeDataThread
CubeDataThread * p_cubeDataThread
The data thread being tested.
Definition: CubeDataThreadTester.h:102
Isis::CubeDataThreadTester::BrickChanged
void BrickChanged(int cubeId, const Isis::Brick *data)
This is called when a brick is written.
Definition: CubeDataThreadTester.cpp:360
Isis::CubeDataThreadTester::run
void run()
This thread is centered completely around its event loop.
Definition: CubeDataThreadTester.cpp:89
Isis::CubeDataThreadTester::ReadCubeTest2
void ReadCubeTest2(int, int)
This tests two basic reads with no conflicts.
Definition: CubeDataThreadTester.cpp:111
Isis::CubeDataThreadTester::CubeDataThreadTester
CubeDataThreadTester(CubeDataThread *)
This initializes a CubeDataThreadTester.
Definition: CubeDataThreadTester.cpp:33
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::CubeDataThreadTester::DataThread
CubeDataThread * DataThread()
Returns the cube data thread being tested.
Definition: CubeDataThreadTester.h:38
Isis::CubeDataThreadTester::NumberOfTestsDone
int NumberOfTestsDone()
Returns the number of tests done (testing methods count as several)
Definition: CubeDataThreadTester.h:33
Isis::CubeDataThreadTester::RequestReadCube
void RequestReadCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask for a brick for reading.
Isis::CubeDataThreadTester::NotifyDoneWithData
void NotifyDoneWithData(int, const Isis::Brick *)
Let the cube data thread know we're no longer working with a particular brick.
Isis::CubeDataThreadTester::p_cachedDoneBricks
QVector< QPair< int, const Isis::Brick * > > * p_cachedDoneBricks
A list of bricks we haven't send the done signal for.
Definition: CubeDataThreadTester.h:111
Isis::CubeDataThreadTester::ReadCubeTest
void ReadCubeTest(int)
This tests a basic read.
Definition: CubeDataThreadTester.cpp:99
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::CubeDataThreadTester::WriteCubeTest
void WriteCubeTest(int)
This tests a basic write.
Definition: CubeDataThreadTester.cpp:141
Isis::CubeDataThread
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:59
Isis::CubeDataThreadTester
Definition: CubeDataThreadTester.h:25
Isis::CubeDataThreadTester::p_notifyDone
bool p_notifyDone
True if we will notify done on the next brick received for R/W.
Definition: CubeDataThreadTester.h:108
Isis::CubeDataThreadTester::~CubeDataThreadTester
virtual ~CubeDataThreadTester()
This cleans up the cube data thread.
Definition: CubeDataThreadTester.cpp:78
Isis::CubeDataThreadTester::NotifyChangeTest
void NotifyChangeTest(int)
This test tests this automatic change notifications.
Definition: CubeDataThreadTester.cpp:206
Isis::CubeDataThreadTester::ReadCubeTest3
void ReadCubeTest3(int)
This tests an overlapping read.
Definition: CubeDataThreadTester.cpp:126
Isis::CubeDataThreadTester::p_execStarted
bool p_execStarted
True if this thread is started.
Definition: CubeDataThreadTester.h:105
Isis::CubeDataThreadTester::ReadWriteBrick
void ReadWriteBrick(void *requester, int cubeId, Isis::Brick *data)
This is called when a brick is given for R/W.
Definition: CubeDataThreadTester.cpp:283
Isis::CubeDataThreadTester::WriteCubeTest3BreakDeadlock
void WriteCubeTest3BreakDeadlock()
This test breaks the deadlock caused by the third write test.
Definition: CubeDataThreadTester.cpp:186
QThread
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::CubeDataThreadTester::ReadBrick
void ReadBrick(void *requester, int cubeId, const Isis::Brick *data)
This is called when a brick is read.
Definition: CubeDataThreadTester.cpp:228
Isis::CubeDataThreadTester::Connect
void Connect()
This connects this class' signals and slots with CubeDataThread's signals and slots.
Definition: CubeDataThreadTester.cpp:52
Isis::CubeDataThreadTester::RequestReadWriteCube
void RequestReadWriteCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask for a brick for reading and writing.
Isis::CubeDataThreadTester::WriteCubeTest2
void WriteCubeTest2(int, int)
This tests two non-conflicting writes.
Definition: CubeDataThreadTester.cpp:154
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeDataThreadTester::WriteCubeTest3
void WriteCubeTest3(int)
This tests two conflicting* writes.
Definition: CubeDataThreadTester.cpp:172

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:21