// pc-dasDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "ClrButton.h"
#include "Serial.h"
#include "Kearfott.h"
#include "Reson7K.h"

// CpcdasDlg dialog
class CpcdasDlg : public CDialog
{
// Construction
public:
	CpcdasDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_PCDAS_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedparosciPortSet();
	afx_msg void OnBnClickedkftPortSet();
	afx_msg void OnBnClickedwfPortSet();
	afx_msg void OnEnChangekftmode();
	afx_msg void OnEnChangekftdepthloopopen();
protected:
	CClrButton _kearfottBtn, _parosciBtn, _winfrogBtn, _resonAddrBtn, _rockAddrBtn;
	CButton _gpsAidEnableCBox, _dopAidEnableCBox, _dopPingEnableCBox, _latLonCBox;
	CListCtrl *_gpsList, *_parosciList, *_winfrogList;
	BOOL _kearfottConnected, _parosciConnected, _winfrogConnected, _resonConnected, _rockConnected;
	CSerial _kearfottPort, _parosciPort, _winfrogPort;
	Kearfott *_kearfott;
	Reson7K *_reson7K;
	SimpleSocket *_rockSocket, *_parosciSocket;
	UINT_PTR _timerId;
	void OnTimer(UINT nIDEvent);
	void CpcdasDlg::updateKearfottGUI();
	void CpcdasDlg::updateReson7k();
	void CpcdasDlg::updateRock();
	BOOL CpcdasDlg::getParosciData();
	BOOL CpcdasDlg::getWinfrogData();
	BOOL _usblValid;
	double _usblLat, _usblLon;
	char _usblData[256];
	BOOL _pressureValid;
	double _pressureDepth;
	BOOL _salinityValid;
	double _salinity;
	BOOL _gpsAidEnable, _dopAidEnable, _dopPingEnable;
public:
	afx_msg void OnBnClickedresonAddrSet(), OnBnClickedRockAddrSet();
	afx_msg void OnBnClickedOk();
};
