// RemoteTestDlg.h :  Header file
//

#if !defined(AFX_REMOTETESTDLG_H__1D18E7B9_924B_4294_B281_38740367E94F__INCLUDED_)
#define AFX_REMOTETESTDLG_H__1D18E7B9_924B_4294_B281_38740367E94F__INCLUDED_

#include "VAIBO.h"
#include "SenTPDlg.h"
#include "ITPDlg.h"
#include "ATPDlg.h"
#include "FTPDlg.h"
#include "MRIDlg.h"
#include "WalkDlg.h"
#include "PostureDlg.h"
#include "KickDlg.h"
#include "MtnDlg.h"
#include "3DDlg.h"
#include "ContentsDlg.h"
#include "AutonomyDlg.h"
#include "ClockDlg.h"
#include "EtcDlg.h"
#include "TTSDlg.h"
#include "ProductIDDlg.h"
#include "VPRDlg.h"


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CRemoteTestDlg  dialog

class CRemoteTestDlg : public CDialog
{
public:
	CRemoteTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CRemoteTestDlg)
	enum { IDD = IDD_REMOTETEST_DIALOG };
	CIPAddressCtrl	m_ipAddress;
	//}}AFX_DATA

	//{{AFX_VIRTUAL(CRemoteTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

//  Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CRemoteTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	afx_msg void OnBtnConnect();
	afx_msg void OnBtnControl();
	afx_msg void OnBtnControl2();
	afx_msg void OnBtnUPnP();
	virtual void OnOK();
	afx_msg void OnBtnSenTPDlg();
	afx_msg void OnBtnITPDlg();
	afx_msg void OnBtnATPDlg();
	afx_msg void OnBtnShutDown();
	afx_msg void OnBtnReboot();
	afx_msg void OnBtnFTPDlg();
	afx_msg void OnBtnWalkDlg();
	afx_msg void OnBtnKickDlg();
	afx_msg void OnBtnPostureDlg();
	afx_msg void OnBtnMtnDlg();
	afx_msg void OnBtn3DDlg();
	afx_msg void OnBtnContents();
	afx_msg void OnBtnAutonomy();
	afx_msg void OnBtnClock();
	afx_msg void OnBtnBattery();
	afx_msg void OnBtnIsconnect();
	afx_msg void OnBtnTTS();
	afx_msg void OnBtnMRI();
	afx_msg void OnButtonProductID();
	afx_msg void OnButtonIdpwd();
	afx_msg void OnButtonVPR();
	//}}AFX_MSG
	afx_msg LRESULT OnVAIBOConnect( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBODisconnect( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOSemantics( WPARAM msg, LPARAM data );
	afx_msg LRESULT OnVAIBOInputSemantics( WPARAM msg, LPARAM data );
	afx_msg LRESULT OnVAIBOSensorData( WPARAM numOfData, LPARAM recArray );
	afx_msg LRESULT OnVAIBOClientUpdate( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOProductID( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOBatteryLevel( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBORemoteNotify( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnMMFTPSending( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnITPImageUpdate( WPARAM wParam, LPARAM recvLen );
	afx_msg LRESULT OnATPWaveUpdate( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnAibo3DMove( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOLock( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOSensorEnable( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnVAIBOSensorDisable( WPARAM wParam, LPARAM lParam );
	DECLARE_MESSAGE_MAP()

	CButton& buttonConnect() { return *(CButton*) GetDlgItem( IDC_BTN_CONNECT ); };
	CButton& buttonControl() { return *(CButton*) GetDlgItem( IDC_BTN_CONTROL ); };
	CButton& buttonControl2() { return *(CButton*) GetDlgItem( IDC_BTN_CONTROL2 ); };
	CButton& buttonAutonomyDlg() { return *(CButton*) GetDlgItem( IDC_BTN_BM ); };
	CButton& buttonFTPDlg() { return *(CButton*) GetDlgItem( IDC_BTN_FTPDLG ); };
	CButton& buttonSENTPDlg() { return *(CButton*) GetDlgItem( IDC_BTN_SENTPDLG ); };
	CButton& buttonITPDlg() { return *(CButton*) GetDlgItem( IDC_BTN_ITPDLG ); };
	CButton& buttonATPDlg() { return *(CButton*) GetDlgItem( IDC_BTN_ATPDLG ); };
	CButton& buttonWalkDlg() { return *(CButton*) GetDlgItem( IDC_BTN_WALKDLG ); };
	CButton& buttonKickDlg() { return *(CButton*) GetDlgItem( IDC_BTN_KICKDLG ); };
	CButton& buttonPostureDlg() { return *(CButton*) GetDlgItem( IDC_BTN_POSTUREDLG ); };
	CButton& buttonMtnDlg() { return *(CButton*) GetDlgItem( IDC_BTN_MTNDLG ); };
	CButton& button3DDlg() { return *(CButton*) GetDlgItem( IDC_BTN_3DDLG ); };
	CButton& buttonClockDlg() { return *(CButton*) GetDlgItem( IDC_BTN_CLOCK ); };
	CButton& buttonContentsDlg() { return *(CButton*) GetDlgItem( IDC_BTN_CONTENTS ); };
	CButton& buttonBatteryDlg() { return *(CButton*) GetDlgItem( IDC_BTN_BATTERY ); };
	CButton& buttonTTSDlg() { return *(CButton*) GetDlgItem( IDC_BUTTON_TTS ); };
	CButton& buttonMRIDlg() { return *(CButton*) GetDlgItem( IDC_BTN_MRI ); };
	CButton& buttonShutdown() { return *(CButton*) GetDlgItem( IDC_BTN_SHUTDOWN ); };
	CButton& buttonReboot() { return *(CButton*) GetDlgItem( IDC_BTN_REBOOT ); };
	CButton& buttonIsConnect() { return *(CButton*) GetDlgItem( IDC_BTN_ISCONNECT ); };
	CButton& buttonProductID() { return *(CButton*) GetDlgItem( IDC_BUTTON_PRODUCTID ); };
	CButton& buttonVPR() { return *(CButton*) GetDlgItem( IDC_BUTTON_VPR ); };

private:
	int	 Exchange3DPosture( int vaiboPosture );
	void DisplayInputSemantics( void );
	void DisplaySemanticsMessage( WPARAM msg, LPARAM data );
	void DisplayStatusMessage();
	BOOL			m_bConnected;
	bool			m_isControl;
	int				m_aiboID;
	BOOL			m_ftpDoneF;
	BOOL			m_isSentpStart;
	WORD			m_status;
	WORD			m_posture;

public:
	int     SensorGetSkipRate();
	void    SensorTransferStart( void );
	void    SensorTransferStop( void );
	void    SensorSetSkipRate( int skip );
	bool	IsAiboControl() { return m_isControl; }
	void	SetControlFlag( bool isControl );

	CVAIBO			*m_vaibo;
	CSenTPDlg		*m_senTPDlg;
	CITPDlg			*m_imageTPDlg;
	CATPDlg			*m_audioTPDlg;
	CFTPDlg			*m_fileTPDlg;
	CMRIDlg			*m_mriDlg;
	CWalkDlg		*m_walkDlg;
	CPostureDlg		*m_postureDlg;
	CMtnDlg			*m_mtnDlg;
	CKickDlg		*m_kickDlg;
	C3DDlg			*m_3DDlg;
	CContentsDlg	*m_contentsDlg;
	CAutonomyDlg	*m_AutonomyDlg;
	CClockDlg		*m_ClockDlg;
	CEtcDlg			*m_EtcDlg;
	CTTSDlg			*m_TTSDlg;
	CProductIDDlg	*m_ProductIDDlg;
	CVPRDlg			*m_VPRDlg;
};

//{{AFX_INSERT_LOCATION}}

#endif // !defined(AFX_REMOTETESTDLG_H__1D18E7B9_924B_4294_B281_38740367E94F__INCLUDED_)
