// AVDS2MATLAB.h: interface for the CAVDS2MATLAB class.
//
//////////////////////////////////////////////////////////////////////

/*
 * AVDS2MATLAB.h
 *      
 *          Copyright (C) 2000 RasSimTech Ltd. 
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version. 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details. 
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 */


#if !defined(AFX_AVDS2MATLAB_H__786C3501_9678_44E7_A49B_128D38DBD780__INCLUDED_)
#define AFX_AVDS2MATLAB_H__786C3501_9678_44E7_A49B_128D38DBD780__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <afxwin.h>

#include "ElapsedTime.h"

class CAVDS2MATLAB : public CElapsedTime  
{
public:
	CAVDS2MATLAB();
	virtual ~CAVDS2MATLAB();

public:
	void CloseConnection();
	BOOL bSendData(double const * const pdSendData);
	BOOL bReceiveData(double* pdReceiveData);
	BOOL bOpenConnection(int iToAVDSID,int iNumberToAVDS,int iToMATLABID,int iNumberToMATLAB);
	BOOL bGetConnectionOpen(){return(m_bConnectionOpen);};
	int iGetNumberToAVDS(){return(m_iNumberToAVDS);};
	int iGetNumberToMATLAB(){return(m_iNumberToMATLAB);};

	BOOL& bGetUseRealTimeFlag(){return(m_bUseRealTimeFlag);};
	const BOOL& bGetUseRealTimeFlag()const{return(m_bUseRealTimeFlag);};
protected:
	BOOL m_bConnectionOpen;
	int m_iIndexToAVDS;
	int m_iIndexToMATLAB;
	int m_iNumberToAVDS;
	int m_iNumberToMATLAB;
	BOOL m_bUseRealTimeFlag;
};

#endif // !defined(AFX_AVDS2MATLAB_H__786C3501_9678_44E7_A49B_128D38DBD780__INCLUDED_)
