Attribute VB_Name = "DeclareFunctions"
Option Explicit

'Functions for software
Public Declare Function sdMainPanelDrawGrid Lib "SDK5200.dll" (ByVal hdc As Long, view_data As PictureRange) As Integer
Public Declare Function sdDisplayDataXYMode Lib "SDK5200.dll" (ByVal hdc As Long, view_data As PictureRange, ByVal isLine As Integer, data_tab_ch1 As Integer, data_tab_ch2 As Integer) As Integer
Public Declare Function sdGetDisplayData Lib "SDK5200.dll" (Controlstate As ControlData, chdisplaydata As Integer, chbufferdata As Integer) As Integer
Public Declare Function sdDisplayData Lib "SDK5200.dll" (ByVal hdc As Long, view_data As PictureRange, ByVal isLine As Integer, data_tab_ch1 As Integer, CH_color As LineColor) As Integer
Public Declare Function sdChannelDataBuffer Lib "SDK5200.dll" (Controlstate As ControlData, ByVal InterpolationLineMode As Integer, chbufferdata As Integer, chhardwaredata As Integer) As Integer
Public Declare Function sdChannelInGND Lib "SDK5200.dll" (ByVal ChPosition As Integer, data_gra_chx As Integer) As Integer

Public Declare Function sdAutoset Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, Controlstate As ControlData, AutosetData As AutosetDataStruct, FiltAndTrigger As StateStruct, levers As LeversData, level As Integer) As Integer

Public Declare Function sdGetScrollData Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, Controlstate As ControlData, levers As LeversData, TimeState As TimeStruct, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, Ch1ScrollData As Integer, Ch2ScrollData As Integer, Ch1DisplayData As Integer, Ch2DispalyData As Integer, ByVal TriggerPosition As Integer, ByVal Ch1InGND As Boolean, ByVal Ch2InGND As Boolean) As Integer
Public Declare Function sdDisplaySampling Lib "SDK5200.dll" (ByVal Ch1Enabled As Boolean, ByVal Ch2Enabled As Boolean, ByVal ETS As Integer, ByVal TriggerSource As Integer, ByVal Timebase As Integer, ByVal BufferSize As Integer, Time As Double) As Double



'Functions for hardware
Public Declare Function sdSearchDevice Lib "SDK5200.dll" (ByVal DeviceIndex As Integer) As Integer
Public Declare Function sdSetOffset Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, levers As LeversData, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, ByVal TriggerSource As Integer, level As Integer) As Boolean
Public Declare Function sdSetTriggerAndSampleRate Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, ByVal Trigger_Slope As Integer, ByVal ETS As Integer, Controlstate As ControlData, ByVal PulseTrigger As Integer, ByVal PulseTriggerMode As Integer, ByVal PulseWidth As Long) As Long
Public Declare Function sdSetFilt Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, FiltAndTrigger As StateStruct) As Long
Public Declare Function sdSetVoltageAndCoupling Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, ByVal Ch1_Voltage As Integer, ByVal Ch2_Voltage As Integer, ByVal Ch1_ACDC As Integer, ByVal Ch2_ACDC As Integer, Controlstate As ControlData) As Long
Public Declare Function sdCaptureStart Lib "SDK5200.dll" (ByVal DeviceIndex As Integer) As Long
Public Declare Function sdTriggerEnabled Lib "SDK5200.dll" (ByVal DeviceIndex As Integer) As Long
Public Declare Function sdGetLevel Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, level As Integer) As Integer
Public Declare Function sdGetData Lib "SDK5200.dll" (ByVal DeviceIndex As Integer, ByVal Ch1Voltage As Integer, ByVal Ch2Voltage As Integer, Ch1HardwareData As Integer, Ch2HardwareData As Integer, Controlstate As ControlData, FiltAndTrigger As StateStruct, levers As LeversData, level As Integer, ByVal StartCapture As Integer, ByVal PulseTrigger As Integer, ByVal PulseTriggerMode As Integer, ByVal PulseWidth As Long) As Integer
Public Declare Function sdForceTrigger Lib "SDK5200.dll" (ByVal DeviceIndex As Integer) As Boolean
