-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmtrk_objects.h
91 lines (70 loc) · 2.02 KB
/
mtrk_objects.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef mtrk_objects_h
#define mtrk_objects_h 1
#include "cJSON.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/libRT.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/sREADOUT.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/sRF_PULSE.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/sGRAD_PULSE.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/sSYNC.h"
#include "MrServers/MrMeasSrv/SeqIF/libRT/sFREQ_PHASE.h"
#include "MrServers/MrMeasSrv/MeasUtils/NLSStatus.h"
namespace SEQ_NAMESPACE
{
class mtrk_state;
class mtrk_api;
class mtrk_object
{
public:
enum {
INVALID=-1,
GRAD=0,
RF=1,
ADC=2,
SYNC=3
};
enum {
SYNC_INVALID=0,
SYNC_OSC,
SYNC_EXTTRIGGER
};
mtrk_object();
virtual ~mtrk_object();
void clear();
bool prepare(cJSON* entry);
bool prepareRF(cJSON* entry);
bool prepareADC(cJSON* entry);
bool prepareGrad(cJSON* entry);
bool prepareSync(cJSON* entry);
void calcNCOReset();
bool updateMDH(cJSON* entry);
bool getMDHValue(cJSON* field, int& value, int& index);
bool getMDHValue(cJSON* field, bool& value);
int type;
int duration;
int tailDuration;
int syncClass;
sGRAD_PULSE_ARB* eventGrad;
sSYNC* eventSync;
sREADOUT* eventADC;
sRF_PULSE_ARB* eventRF;
sFREQ_PHASE* eventNCOSet;
sFREQ_PHASE* eventNCOReset;
cJSON* object;
//int getDuration(bool includeOverhang);
};
class mtrk_objects
{
public:
mtrk_objects();
virtual ~mtrk_objects();
void setMapiInstance(mtrk_api* pointer);
void clear();
bool prepare(cJSON* section);
mtrk_object* getObject(char* name);
mtrk_object* getObject(int index);
mtrk_object** eventObjects;
cJSON* objects;
int count;
};
}
#endif