/************************************************************************/
/*																		*/
/*	ＩＦ＿５０  ＡＰＩクラス定義ファイル								*/
/*																		*/
/*     Copyright(c) 2012  TEXIO TECHNOLOGY CORPORATION                  */
/************************************************************************/
#include "stdafx.h"

#include "IF_50API_Class.h"

/*  コンストラクタ  */
LW_IF::LW_IF()
{
	hAPI		= NULL;
	hLW_DeviceOpen			= NULL;
	hLW_DeviceClose			= NULL;
	hLW_SetTimeOut			= NULL;
	hLW_SetMainInput		= NULL;
	hLW_GetMainInput		= NULL;
	hLW_SetInputSelect		= NULL;
	hLW_GetInputSelect		= NULL;
	hLW_SetPresetNumber		= NULL;
	hLW_GetPresetNumber		= NULL;
	hLW_SavePreset			= NULL;
	hLW_GetMonitor			= NULL;
	hLW_SetMonitorSelect	= NULL;
	hLW_GetMonitorSelect	= NULL;
	hLW_SetDisplaySelect	= NULL;
	hLW_GetDisplaySelect	= NULL;
	hLW_SetLoadMode			= NULL;
	hLW_GetLoadMode			= NULL;
	hLW_SetLoadValue		= NULL;
	hLW_GetLoadValue		= NULL;
	hLW_SetSiemensValue		= NULL;
	hLW_GetSiemensValue		= NULL;
	hLW_SetCurrentLimit		= NULL;
	hLW_GetCurrentLimit		= NULL;
	hLW_SaveLoadValue		= NULL;
	hLW_SaveCurrentLimit	= NULL;
	hLW_SaveMemoryData		= NULL;
	hLW_SetSwSelect			= NULL;
	hLW_GetSwSelect			= NULL;
	hLW_SetSwFreq			= NULL;
	hLW_GetSwFreq			= NULL;
	hLW_SetSwDuty			= NULL;
	hLW_GetSwDuty			= NULL;
	hLW_SetSwTime			= NULL;
	hLW_GetSwTime			= NULL;
	hLW_SetSwMethod			= NULL;
	hLW_GetSwMethod			= NULL;
	hLW_SetDelayFunction	= NULL;
	hLW_GetDelayFunction	= NULL;
	hLW_SetDelayTime		= NULL;
	hLW_GetDelayTime		= NULL;
	hLW_SetTrackFunction	= NULL;
	hLW_GetTrackFunction	= NULL;
	hLW_SetTrackDirection	= NULL;
	hLW_GetTrackDirection	= NULL;
	hLW_SetTrackMode		= NULL;
	hLW_GetTrackMode		= NULL;
	hLW_SetTrackValue		= NULL;
	hLW_GetTrackValue		= NULL;
	hLW_ResetAlarm			= NULL;
	hLW_GetAlarm			= NULL;
	hLW_GetLimit			= NULL;
	hLW_SetOperationTimeOut	= NULL;
	hLW_GetOperationTimeOut	= NULL;
	hLW_SetLocal			= NULL;
	hLW_SetLocalLockOut		= NULL;
	hLW_GetLocalLockOut		= NULL;
	hLW_GetIdNumber			= NULL;
	hLW_GetChExist			= NULL;
}

/*  デストラクタ  */
LW_IF::~LW_IF()
{
	if(hAPI != NULL){
		FreeLibrary( hAPI );
	}
}

/************************************************************************/
/*  ＡＰＩクラスメンバー関数											*/
/************************************************************************/

/*  ハンドルの初期化  */
BOOL LW_IF::Initialize()
{
	hAPI = LoadLibrary( (LPCSTR)"IF_50.dll" );
	if( hAPI == NULL ){
		return FALSE;
	}

	hLW_DeviceOpen = ( long ( __stdcall* )(int,int,int,int) )
						GetProcAddress( hAPI , "LW_DeviceOpen" );
	if( hLW_DeviceOpen == NULL ){
		return FALSE;
	}

	hLW_DeviceClose = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_DeviceClose" );
	if( hLW_DeviceClose == NULL ){
		return FALSE;
	}

	hLW_SetTimeOut = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetTimeOut" );
	if( hLW_SetTimeOut == NULL ){
		return FALSE;
	}

	hLW_SetMainInput = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetMainInput" );
	if( hLW_SetMainInput == NULL ){
		return FALSE;
	}

	hLW_GetMainInput = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetMainInput" );
	if( hLW_GetMainInput == NULL ){
		return FALSE;
	}

	hLW_SetInputSelect = ( int ( __stdcall* )(long,int,int) )
						GetProcAddress( hAPI , "LW_SetInputSelect" );
	if( hLW_SetInputSelect == NULL ){
		return FALSE;
	}

	hLW_GetInputSelect = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_GetInputSelect" );
	if( hLW_GetInputSelect == NULL ){
		return FALSE;
	}

	hLW_SetPresetNumber = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetPresetNumber" );
	if( hLW_SetPresetNumber == NULL ){
		return FALSE;
	}

	hLW_GetPresetNumber = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetPresetNumber" );
	if( hLW_GetPresetNumber == NULL ){
		return FALSE;
	}

	hLW_SavePreset = ( int ( __stdcall* )(long,int,int) )
						GetProcAddress( hAPI , "LW_SavePreset" );
	if( hLW_SavePreset == NULL ){
		return FALSE;
	}

	hLW_GetMonitor = ( int ( __stdcall* )(long,int,struct MONITOR_DATA*) )
						GetProcAddress( hAPI , "LW_GetMonitor" );
	if( hLW_GetMonitor == NULL ){
		return FALSE;
	}

	hLW_SetMonitorSelect = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetMonitorSelect" );
	if( hLW_SetMonitorSelect == NULL ){
		return FALSE;
	}

	hLW_GetMonitorSelect = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetMonitorSelect" );
	if( hLW_GetMonitorSelect == NULL ){
		return FALSE;
	}

	hLW_SetDisplaySelect = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetDisplaySelect" );
	if( hLW_SetDisplaySelect == NULL ){
		return FALSE;
	}

	hLW_GetDisplaySelect = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetDisplaySelect" );
	if( hLW_GetDisplaySelect == NULL ){
		return FALSE;
	}

	hLW_SetLoadMode = ( int ( __stdcall* )(long,int,int,int,int) )
						GetProcAddress( hAPI , "LW_SetLoadMode" );
	if( hLW_SetLoadMode == NULL ){
		return FALSE;
	}

	hLW_GetLoadMode = ( int ( __stdcall* )(long,int,int,struct MODE_DATA*) )
						GetProcAddress( hAPI , "LW_GetLoadMode" );
	if( hLW_GetLoadMode == NULL ){
		return FALSE;
	}

	hLW_SetLoadValue = ( int ( __stdcall* )(long,int,int,double) )
						GetProcAddress( hAPI , "LW_SetLoadValue" );
	if( hLW_SetLoadValue == NULL ){
		return FALSE;
	}

	hLW_GetLoadValue = ( int ( __stdcall* )(long,int,int,double*) )
						GetProcAddress( hAPI , "LW_GetLoadValue" );
	if( hLW_GetLoadValue == NULL ){
		return FALSE;
	}

	hLW_SetSiemensValue = ( int ( __stdcall* )(long,int,int,long) )
						GetProcAddress( hAPI , "LW_SetSiemensValue" );
	if( hLW_SetSiemensValue == NULL ){
		return FALSE;
	}

	hLW_GetSiemensValue = ( int ( __stdcall* )(long,int,int,long*) )
						GetProcAddress( hAPI , "LW_GetSiemensValue" );
	if( hLW_GetSiemensValue == NULL ){
		return FALSE;
	}

	hLW_SetCurrentLimit = ( int ( __stdcall* )(long,int,int,double) )
						GetProcAddress( hAPI , "LW_SetCurrentLimit" );
	if( hLW_SetCurrentLimit == NULL ){
		return FALSE;
	}

	hLW_GetCurrentLimit = ( int ( __stdcall* )(long,int,int,double*) )
						GetProcAddress( hAPI , "LW_GetCurrentLimit" );
	if( hLW_GetCurrentLimit == NULL ){
		return FALSE;
	}

	hLW_SaveLoadValue = ( int ( __stdcall* )(long,int,int) )
						GetProcAddress( hAPI , "LW_SaveLoadValue" );
	if( hLW_SaveLoadValue == NULL ){
		return FALSE;
	}

	hLW_SaveCurrentLimit = ( int ( __stdcall* )(long,int,int) )
						GetProcAddress( hAPI , "LW_SaveCurrentLimit" );
	if( hLW_SaveCurrentLimit == NULL ){
		return FALSE;
	}

	hLW_SaveMemoryData = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SaveMemoryData" );
	if( hLW_SaveMemoryData == NULL ){
		return FALSE;
	}

	hLW_SetSwSelect = ( int ( __stdcall* )(long,int,int) )
						GetProcAddress( hAPI , "LW_SetSwSelect" );
	if( hLW_SetSwSelect == NULL ){
		return FALSE;
	}

	hLW_GetSwSelect = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_GetSwSelect" );
	if( hLW_GetSwSelect == NULL ){
		return FALSE;
	}

	hLW_SetSwFreq = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetSwFreq" );
	if( hLW_SetSwFreq == NULL ){
		return FALSE;
	}

	hLW_GetSwFreq = ( int ( __stdcall* )(long,int*) )
						GetProcAddress( hAPI , "LW_GetSwFreq" );
	if( hLW_GetSwFreq == NULL ){
		return FALSE;
	}

	hLW_SetSwDuty = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetSwDuty" );
	if( hLW_SetSwDuty == NULL ){
		return FALSE;
	}

	hLW_GetSwDuty = ( int ( __stdcall* )(long,int*) )
						GetProcAddress( hAPI , "LW_GetSwDuty" );
	if( hLW_GetSwDuty == NULL ){
		return FALSE;
	}

	hLW_SetSwTime = ( int ( __stdcall* )(long,double,double) )
						GetProcAddress( hAPI , "LW_SetSwTime" );
	if( hLW_SetSwTime == NULL ){
		return FALSE;
	}

	hLW_GetSwTime = ( int ( __stdcall* )(long,struct TIME_DATA*) )
						GetProcAddress( hAPI , "LW_GetSwTime" );
	if( hLW_GetSwTime == NULL ){
		return FALSE;
	}

	hLW_SetSwMethod = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetSwMethod" );
	if( hLW_SetSwMethod == NULL ){
		return FALSE;
	}

	hLW_GetSwMethod = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetSwMethod" );
	if( hLW_GetSwMethod == NULL ){
		return FALSE;
	}

	hLW_SetDelayFunction = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetDelayFunction" );
	if( hLW_SetDelayFunction == NULL ){
		return FALSE;
	}

	hLW_GetDelayFunction = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetDelayFunction" );
	if( hLW_GetDelayFunction == NULL ){
		return FALSE;
	}

	hLW_SetDelayTime = ( int ( __stdcall* )(long,int,double) )
						GetProcAddress( hAPI , "LW_SetDelayTime" );
	if( hLW_SetDelayTime == NULL ){
		return FALSE;
	}

	hLW_GetDelayTime = ( int ( __stdcall* )(long,int,double*) )
						GetProcAddress( hAPI , "LW_GetDelayTime" );
	if( hLW_GetDelayTime == NULL ){
		return FALSE;
	}

	hLW_SetTrackFunction = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetTrackFunction" );
	if( hLW_SetTrackFunction == NULL ){
		return FALSE;
	}

	hLW_GetTrackFunction = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetTrackFunction" );
	if( hLW_GetTrackFunction == NULL ){
		return FALSE;
	}

	hLW_SetTrackDirection = ( int ( __stdcall* )(long,int,int,int,int) )
						GetProcAddress( hAPI , "LW_SetTrackDirection" );
	if( hLW_SetTrackDirection == NULL ){
		return FALSE;
	}

	hLW_GetTrackDirection = ( int ( __stdcall* )(long,struct TRACK_DATA*) )
						GetProcAddress( hAPI , "LW_GetTrackDirection" );
	if( hLW_GetTrackDirection == NULL ){
		return FALSE;
	}

	hLW_SetTrackMode = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetTrackMode" );
	if( hLW_SetTrackMode == NULL ){
		return FALSE;
	}

	hLW_GetTrackMode = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetTrackMode" );
	if( hLW_GetTrackMode == NULL ){
		return FALSE;
	}

	hLW_SetTrackValue = ( int ( __stdcall* )(long,double) )
						GetProcAddress( hAPI , "LW_SetTrackValue" );
	if( hLW_SetTrackValue == NULL ){
		return FALSE;
	}

	hLW_GetTrackValue = ( int ( __stdcall* )(long,double*) )
						GetProcAddress( hAPI , "LW_GetTrackValue" );
	if( hLW_GetTrackValue == NULL ){
		return FALSE;
	}

	hLW_ResetAlarm = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_ResetAlarm" );
	if( hLW_ResetAlarm == NULL ){
		return FALSE;
	}

	hLW_GetAlarm = ( int ( __stdcall* )(long,struct ALARM_DATA*) )
						GetProcAddress( hAPI , "LW_GetAlarm" );
	if( hLW_GetAlarm == NULL ){
		return FALSE;
	}

	hLW_GetLimit = ( int ( __stdcall* )(long,struct LIMIT_DATA*) )
						GetProcAddress( hAPI , "LW_GetLimit" );
	if( hLW_GetLimit == NULL ){
		return FALSE;
	}

	hLW_SetOperationTimeOut = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetOperationTimeOut" );
	if( hLW_SetOperationTimeOut == NULL ){
		return FALSE;
	}

	hLW_GetOperationTimeOut = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetOperationTimeOut" );
	if( hLW_GetOperationTimeOut == NULL ){
		return FALSE;
	}

	hLW_SetLocal = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_SetLocal" );
	if( hLW_SetLocal == NULL ){
		return FALSE;
	}

	hLW_SetLocalLockOut = ( int ( __stdcall* )(long,int) )
						GetProcAddress( hAPI , "LW_SetLocalLockOut" );
	if( hLW_SetLocalLockOut == NULL ){
		return FALSE;
	}

	hLW_GetLocalLockOut = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetLocalLockOut" );
	if( hLW_GetLocalLockOut == NULL ){
		return FALSE;
	}

	hLW_GetIdNumber = ( int ( __stdcall* )(long) )
						GetProcAddress( hAPI , "LW_GetIdNumber" );
	if( hLW_GetIdNumber == NULL ){
		return FALSE;
	}

	hLW_GetChExist = ( int ( __stdcall* )(long,struct CH_DATA*) )
						GetProcAddress( hAPI , "LW_GetChExist" );
	if( hLW_GetChExist == NULL ){
		return FALSE;
	}

	return TRUE;
} 

/*  デバイスオープン  */
long LW_IF::DeviceOpen( int Class, int BoardAdrs, int PcAdrs, int SysAdrs )
{
	if(hLW_DeviceOpen == NULL){
		return HANDLE_ERR;
	}
	return hLW_DeviceOpen( Class, BoardAdrs, PcAdrs, SysAdrs );
}

/*  デバイスクローズ  */
int LW_IF::DeviceClose( long DeviceId )
{
	if( hLW_DeviceClose == NULL ){
		return HANDLE_ERR;
	}
	return hLW_DeviceClose( DeviceId );
}

/*  タイムアウト設定  */
int LW_IF::SetTimeOut( long DeviceId, int Time )
{
	if( hLW_SetTimeOut == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetTimeOut( DeviceId, Time );
}

/*  ＭＡＩＮ＿ＩＮＰＵＴ制御  */
int LW_IF::SetMainInput( long DeviceId, int Flag )
{
	if( hLW_SetMainInput == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetMainInput( DeviceId, Flag );
}

/*  ＭＡＩＮ＿ＩＮＰＵＴ状態取得  */
int LW_IF::GetMainInput( long DeviceId )
{
	if( hLW_GetMainInput == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetMainInput( DeviceId );
}

/*  ＩＮＰＵＴ＿ＳＥＬＥＣＴ制御  */
int LW_IF::SetInputSelect( long DeviceId, int Ch, int Flag )
{
	if( hLW_SetInputSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetInputSelect( DeviceId, Ch, Flag );
}

/*  ＩＮＰＵＴ＿ＳＥＬＥＣＴ状態取得  */
int LW_IF::GetInputSelect( long DeviceId, int Ch )
{
	if( hLW_GetInputSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetInputSelect( DeviceId, Ch );
}

/*  プリセット制御  */
int LW_IF::SetPresetNumber( long DeviceId, int Preset )
{
	if( hLW_SetPresetNumber == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetPresetNumber( DeviceId, Preset );
}

/*  プリセット状態取得  */
int LW_IF::GetPresetNumber( long DeviceId )
{
	if( hLW_GetPresetNumber == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetPresetNumber( DeviceId );
}

/*  プリセットデータセーブ  */
int LW_IF::SavePreset( long DeviceId, int Src, int Dest )
{
	if( hLW_SavePreset == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SavePreset( DeviceId, Src, Dest );
}

/*  モニターデータ取得  */
int LW_IF::GetMonitor( long DeviceId, int Ch, struct MONITOR_DATA *Monitor )
{
	if( hLW_GetMonitor == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetMonitor( DeviceId, Ch, Monitor );
}

/*  モニター選択制御  */
int LW_IF::SetMonitorSelect( long DeviceId, int Flag )
{
	if( hLW_SetMonitorSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetMonitorSelect( DeviceId, Flag );
}

/*  モニター選択状態取得  */
int LW_IF::GetMonitorSelect( long DeviceId )
{
	if( hLW_GetMonitorSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetMonitorSelect( DeviceId );
}

/*  ＤＩＳＰＬＡＹ＿ＳＥＬＥＣＴ制御  */
int LW_IF::SetDisplaySelect( long DeviceId, int Ch )
{
	if( hLW_SetDisplaySelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetDisplaySelect( DeviceId, Ch );
}

/*  ＤＩＳＰＬＡＹ＿ＳＥＬＥＣＴ状態取得  */
int LW_IF::GetDisplaySelect( long DeviceId )
{
	if( hLW_GetDisplaySelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetDisplaySelect( DeviceId );
}

/*  放電負荷モード設定  */
int LW_IF::SetLoadMode( long DeviceId, int Preset, int Ch, int Mode, int Ref )
{
	if( hLW_SetLoadMode == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetLoadMode( DeviceId, Preset, Ch, Mode, Ref );
}

/*  放電負荷モード状態取得  */
int LW_IF::GetLoadMode( long DeviceId, int Preset, int Ch, struct MODE_DATA *ModeData )
{
	if( hLW_GetLoadMode == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetLoadMode( DeviceId, Preset, Ch, ModeData );
}

/*  放電負荷設定値ロード  */
int LW_IF::SetLoadValue( long DeviceId, int Preset, int Ch, double Value )
{
	if( hLW_SetLoadValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetLoadValue( DeviceId, Preset, Ch, Value );
}

/*  放電負荷設定値取得  */
int LW_IF::GetLoadValue( long DeviceId, int Preset, int Ch, double *Data )
{
	if( hLW_GetLoadValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetLoadValue( DeviceId, Preset, Ch, Data );
}

/*  放電負荷設定値（シーメンス）ロード  */
int LW_IF::SetSiemensValue( long DeviceId, int Preset, int Ch, long Value )
{
	if( hLW_SetSiemensValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSiemensValue( DeviceId, Preset, Ch, Value );
}

/*  放電負荷設定値（シーメンス）取得  */
int LW_IF::GetSiemensValue( long DeviceId, int Preset, int Ch, long *Data )
{
	if( hLW_GetSiemensValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSiemensValue( DeviceId, Preset, Ch, Data );
}

/*  電流リミット設定値ロード  */
int LW_IF::SetCurrentLimit( long DeviceId, int Preset, int Ch, double Data )
{
	if( hLW_SetCurrentLimit == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetCurrentLimit( DeviceId, Preset, Ch, Data );
}

/*  電流リミット設定値取得  */
int LW_IF::GetCurrentLimit( long DeviceId, int Preset, int Ch, double *Data )
{
	if( hLW_GetCurrentLimit == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetCurrentLimit( DeviceId, Preset, Ch, Data );
}

/*  放電負荷設定値セーブ  */
int LW_IF::SaveLoadValue( long DeviceId, int Preset, int Ch )
{
	if( hLW_SaveLoadValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SaveLoadValue( DeviceId, Preset, Ch );
}

/*  電流リミット設定値セーブ  */
int LW_IF::SaveCurrentLimit( long DeviceId, int Preset, int Ch )
{
	if( hLW_SaveCurrentLimit == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SaveCurrentLimit( DeviceId, Preset, Ch );
}

/*  各種設定セーブ  */
int LW_IF::SaveMemoryData( long DeviceId, int Object )
{
	if( hLW_SaveMemoryData == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SaveMemoryData( DeviceId, Object );
}

/*  ＳＷ＿ＳＥＬＥＣＴ制御  */
int LW_IF::SetSwSelect( long DeviceId, int Ch, int Flag )
{
	if( hLW_SetSwSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSwSelect( DeviceId, Ch, Flag );
}

/*  ＳＷ＿ＳＥＬＥＣＴ状態取得  */
int LW_IF::GetSwSelect( long DeviceId, int Ch )
{
	if( hLW_GetSwSelect == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSwSelect( DeviceId, Ch );
}

/*  ＳＷ周波数設定  */
int LW_IF::SetSwFreq( long DeviceId, int Freq )
{
	if( hLW_SetSwFreq == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSwFreq( DeviceId, Freq );
}

/*  ＳＷ周波数設定値取得  */
int LW_IF::GetSwFreq( long DeviceId, int *Freq )
{
	if( hLW_GetSwFreq == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSwFreq( DeviceId, Freq );
}

/*  ＳＷデューティ設定  */
int LW_IF::SetSwDuty( long DeviceId, int Duty )
{
	if( hLW_SetSwDuty == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSwDuty( DeviceId, Duty );
}

/*  ＳＷデューティ設定値取得  */
int LW_IF::GetSwDuty( long DeviceId, int *Duty )
{
	if( hLW_GetSwDuty == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSwDuty( DeviceId, Duty );
}

/*  ＳＷ時間設定  */
int LW_IF::SetSwTime( long DeviceId, double Ta, double Tb )
{
	if( hLW_SetSwTime == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSwTime( DeviceId, Ta, Tb );
}

/*  ＳＷ時間設定  */
int LW_IF::GetSwTime( long DeviceId, struct TIME_DATA *Time )
{
	if( hLW_GetSwTime == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSwTime( DeviceId, Time );
}

/*  ＳＷ設定方法の設定  */
int LW_IF::SetSwMethod( long DeviceId, int Flag )
{
	if( hLW_SetSwMethod == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetSwMethod( DeviceId, Flag );
}

/*  ＳＷ設定方法の取得  */
int LW_IF::GetSwMethod( long DeviceId )
{
	if( hLW_GetSwMethod == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetSwMethod( DeviceId );
}

/*  ディレイ機能制御  */
int LW_IF::SetDelayFunction( long DeviceId, int Flag )
{
	if( hLW_SetDelayFunction == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetDelayFunction( DeviceId, Flag );
}

/*  ディレイ機能状態の取得  */
int LW_IF::GetDelayFunction( long DeviceId )
{
	if( hLW_GetDelayFunction == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetDelayFunction( DeviceId );
}

/*  ディレイ時間設定  */
int LW_IF::SetDelayTime( long DeviceId, int Ch, double Time )
{
	if( hLW_SetDelayTime == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetDelayTime( DeviceId, Ch, Time );
}

/*  ディレイ時間設定値の取得  */
int LW_IF::GetDelayTime( long DeviceId, int Ch, double *Time )
{
	if( hLW_GetDelayTime == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetDelayTime( DeviceId, Ch, Time );
}

/*  オンライントラッキング機能制御  */
int LW_IF::SetTrackFunction( long DeviceId, int Flag )
{
	if( hLW_SetTrackFunction == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetTrackFunction( DeviceId, Flag );
}

/*  オンライントラッキング機能状態取得  */
int LW_IF::GetTrackFunction( long DeviceId )
{
	if( hLW_GetTrackFunction == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetTrackFunction( DeviceId );
}

/*  トラッキング方向設定  */
int LW_IF::SetTrackDirection( long DeviceId, int ChA, int ChB, int ChC, int ChD )
{
	if( hLW_SetTrackDirection == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetTrackDirection( DeviceId, ChA, ChB, ChC, ChD );
}

/*  トラッキング方向設定の取得  */
int LW_IF::GetTrackDirection( long DeviceId, struct TRACK_DATA *Track )
{
	if( hLW_GetTrackDirection == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetTrackDirection( DeviceId, Track );
}

/*  トラッキングモード設定  */
int LW_IF::SetTrackMode( long DeviceId, int Mode )
{
	if( hLW_SetTrackMode == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetTrackMode( DeviceId, Mode );
}

/*  トラッキングモードの取得  */
int LW_IF::GetTrackMode( long DeviceId )
{
	if( hLW_GetTrackMode == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetTrackMode( DeviceId );
}

/*  トラッキング設定値のロード  */
int LW_IF::SetTrackValue( long DeviceId, double Data )
{
	if( hLW_SetTrackValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetTrackValue( DeviceId, Data );
}

/*  トラッキング設定値の取得  */
int LW_IF::GetTrackValue( long DeviceId, double *Data )
{
	if( hLW_GetTrackValue == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetTrackValue( DeviceId, Data );
}

/*  アラームリセット  */
int LW_IF::ResetAlarm( long DeviceId )
{
	if( hLW_ResetAlarm == NULL ){
		return HANDLE_ERR;
	}
	return hLW_ResetAlarm( DeviceId );
}

/*  アラーム情報の取得  */
int LW_IF::GetAlarm( long DeviceId, struct ALARM_DATA *Alarm )
{
	if( hLW_GetAlarm == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetAlarm( DeviceId, Alarm );
}

/*  リミット情報の取得  */
int LW_IF::GetLimit( long DeviceId, struct LIMIT_DATA *Limit )
{
	if( hLW_GetLimit == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetLimit( DeviceId, Limit );
}

/*  操作タイムアウト設定値のロード  */
int LW_IF::SetOperationTimeOut( long DeviceId, int Time )
{
	if( hLW_SetOperationTimeOut == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetOperationTimeOut( DeviceId, Time );
}

/*  操作タイムアウト設定値の取得  */
int LW_IF::GetOperationTimeOut( long DeviceId )
{
	if( hLW_GetOperationTimeOut == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetOperationTimeOut( DeviceId );
}

/*  ローカル切り替え  */
int LW_IF::SetLocal( long DeviceId )
{
	if( hLW_SetLocal == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetLocal( DeviceId );
}

/*  ローカルロックアウト制御  */
int LW_IF::SetLocalLockOut( long DeviceId, int Flag )
{
	if( hLW_SetLocalLockOut == NULL ){
		return HANDLE_ERR;
	}
	return hLW_SetLocalLockOut( DeviceId, Flag );
}

/*  ローカルロックアウト状態の取得  */
int LW_IF::GetLocalLockOut( long DeviceId )
{
	if( hLW_GetLocalLockOut == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetLocalLockOut( DeviceId );
}

/*  ＩＤ番号の取得  */
int LW_IF::GetIdNumber( long DeviceId )
{
	if( hLW_GetIdNumber == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetIdNumber( DeviceId );
}

/*  ＣＨ実装情報の取得  */
int LW_IF::GetChExist( long DeviceId, struct CH_DATA *ChData )
{
	if( hLW_GetChExist == NULL ){
		return HANDLE_ERR;
	}
	return hLW_GetChExist( DeviceId, ChData );
}
;
/* IF_50API_Class.cpp の終わり */