-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hard.h
82 lines (74 loc) · 2.79 KB
/
Hard.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
//---------------------------------------------------------------------------
#ifndef HardH
#define HardH
//---------------------------------------------------------------------------
#include "StdAfx.h"
//---------------------------------------------------------------------------
// Hard.h: interface for the CHard class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
class CHard
{
public:
CHard();
~CHard();//{}
//Attributes
public:
USHORT m_nDeviceIndex ;
USHORT m_nDeviceNum ;
//USHORT m_nComType ;//0:USB; 1:LAN
short* m_pSrcData[MAX_CH_NUM] ;//Ñ÷èòàííûå äàííûå ìèíóñ ïîëîæåíèå íóëåâîãî óðîâíÿ (-255 ~ 255)
//USHORT m_nCalLevel[CAL_LEVEL_LEN];//Cal Level
size_t m_nTimeDiv ;
USHORT m_nYTFormat ;
bool m_bCollect ;
CONTROLDATA m_stControl ;
RELAYCONTROL RelayControl ;
USHORT m_nTriggerMode ;
USHORT m_nTriggerSweep ;
USHORT m_nTriggerSlope ;
USHORT m_nLeverPos[MAX_CH_NUM] ;
COLORREF m_clrRGB[MAX_CH_NUM] ;
WORD m_nCHSet ;
bool flDbg1,flDbg2,flDbg3,flDbg4 ;
//WORD pAmpLevel[AMPCALI_Len] ;
double TimStrth ;// ðàñòÿæêà
double MultY[MAX_CH_NUM] ;
int m_nReadOK ;// Âåðíû ëè äàííûå, ïðî÷èòàííûå â ýòîò ðàç, 0, íåïðàâèëüíûå, íå 0, íåïðàâèëüíûå;
BOOL m_bStartNew ;// Ñòîèò ëè íà÷èíàòü íîâóþ êîëëåêöèþ
WORD m_nCHMod ;// 1,2,4 ??????????????
//Operations
public:
void Init() ;
void SetChnlParams(TChnlParams* params) ;
void SetLvl (int nCh,USHORT lvl) ;
void SetTrgT(int nCh,USHORT lvl) ;
void SetTrgV(int nCh,USHORT lvl) ;
bool SetTimeDiv(TTimeParams* timPrms) ;// âåðí¸ò "óñò. ðàñòÿæêà"
bool SetStrth(bool val) ;//{ TimStrth = val ;}
double GetTimStrth(void){ return TimStrth ;}
double GetTimDiv(void) ;
double GetVltDiv(void) ;
WORD CalcCHMode(void) ;
void SetTriggerMode (uint16_t val) ;
void SetTriggerSweep(uint16_t val) ;
void SetTriggerSlope(uint16_t val) ;
void SetTriggerSrc (uint16_t val) ;
int CntChnlW(void) ;// êîë-âî âêëþ÷åííûõ êàíàëîâ
ULONG BufferLen(void) { return m_stControl.nBufferLen ;}
double SamplingRate() ;
double SmplPerDiv(void) ;
USHORT CollectData() ;// âîçâðàùàþ m_nDeviceIndex (0xFF - óñòðîéñòâî íå îáíàðóæåíî)
bool FindeDev() ;
int ReadData() ;
void ReadSCANData() ;
void SourceToDisplay(USHORT* pData,ULONG nDataLen,USHORT nCH,int nOffset=0);
};
//---------------------------------------------------------------------------
const double TIME_STRETH = 0.1 ;// ðàñòÿæêà!!!
extern const double tblTimDiv[] ;
extern const size_t SIZE_TBL_TIM_DIV ;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif