#pragma once

#ifndef DLL_API
#define DLL_API extern "C" __declspec(dllimport)
#endif
#define WIN_API __stdcall

typedef struct _ST_TRIG
{
	
	unsigned short nEdgeSignal;	
	unsigned short nEdgeSlope;
	short Intr_Range;
	unsigned long Range_Max;
	unsigned long Range_Min;
	unsigned long Range_Sh;	
	unsigned short Range_Mo;
	short Intr_Time;
	unsigned long Time_Max;
	unsigned long Time_Min;
	unsigned short Time_Mo;
	short Intr_Equ;
	unsigned long Equ_Sh;
	unsigned long Equ_Dat;
	unsigned short Equ_So;
}TRIG,*PTRIG;

DLL_API bool WINAPI DevConnect(unsigned short nDevIndex);

DLL_API bool WINAPI InitDevice(unsigned short nDevIndex);

DLL_API bool WINAPI SetCmdLA(unsigned short nDevIndex);

DLL_API bool WINAPI ReadSrcData(unsigned short nDevIndex,unsigned long* pDataBuf,unsigned long nLen,unsigned short PrT);

DLL_API bool WINAPI ReadLogicData(unsigned short nDevIndex,unsigned long* pLogicData);

DLL_API unsigned long WINAPI ReadCollectStatus(unsigned short nDevIndex);

DLL_API short WINAPI Set_Sample_Rate(unsigned short nDevIndex,unsigned short Sel);

DLL_API short WINAPI Set_SampleDepth(unsigned short nDevIndex,unsigned long Sampledepth);

DLL_API short WINAPI Set_PWMV(unsigned short nDevIndex,double AV,double BV);

DLL_API short WINAPI Set_Pre_Tri(unsigned short nDevIndex,unsigned short PrT);

DLL_API short WINAPI Set_Trig_En(unsigned short nDevIndex,short EnA,short EnB);

DLL_API short WINAPI Set_Tri_Logic(unsigned short nDevIndex,unsigned short Logic);

DLL_API short WINAPI Set_Trig_Parameter(unsigned short nDevIndex,unsigned short Num,TRIG* pTrig);



