forked from NOVACProject/NOVACProgram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeControlInfo.h
More file actions
51 lines (48 loc) · 1.74 KB
/
NodeControlInfo.h
File metadata and controls
51 lines (48 loc) · 1.74 KB
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
#pragma once
#include <afxtempl.h>
class CNodeControlInfo
{
class CControlInfo
{
public:
int m_mainIndex;
int m_mode;
CString m_spectrometerID;
CString m_cfgFilePath;
CControlInfo(void);
~CControlInfo(void);
CControlInfo(int mainIndex,int mode,CString spectrometerID,CString cfgFilePath);
};
public:
//-------------------------public functions---------------------//
//--------------------------------------------------------------//
//--------------------------------------------------------------//
CNodeControlInfo(void);
~CNodeControlInfo(void);
/**get the total number of nodes
*return total number of nodes
*/
int GetNodeSum();
/**get node status - run , off, sleep, run in special mode
*@param mainIndex - the index in the array , also in the configuration file
*return the status number
*/
int GetNodeStatus(int mainIndex);
void GetNodeCfgFilePath(int mainIndex,CString& filePath);
/**set node status - run , off, sleep, run in special mode
*@param mainIndex - the index in the array , also in the configuration file
*@param status - the node operating status
*@param filePath - the file to be uploaded
*/
void SetNodeStatus(int mainIndex,int status, CString& filePath);
/**fill node info into the private array*/
void FillinNodeInfo(int mainIndex,int mode,const CString spectrometerID,CString cfgFilePath);
int GetMainIndex(CString spectrometerID);
private:
//-------------------------private variables---------------------//
//--------------------------------------------------------------//
//--------------------------------------------------------------//
CArray<CControlInfo*,CControlInfo*> m_controlInfoArray;
/**total number of nodes*/
int m_totalNodeNum;
};