/*++
*******************************************************************************
* Copyright (c) 1999-2000 Digi International Inc., All Rights Reserved        *
*                                                                             *
* This software contains proprietary and confidential information of Digi     *
* International Inc.  By accepting transfer of this copy, Recipient agrees    *
* to retain this software in confidence, to prevent disclosure to others,     *
* and to make no use of this software other than that for which it was        *
* delivered.  This is an unpublished copyrighted work of Digi International   *
* Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly   *
* prohibited.                                                                 *
*                                                                             *
* Restricted Rights Legend                                                    *
*                                                                             *
* Use, duplication, or disclosure by the Government is subject to             *
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in         *
* Technical Data and Computer Software clause at DFARS 252.227-7031 or        *
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -          *
* Restricted Rights at 48 CFR 52.227-19, as applicable.                       *
*                                                                             *
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343          *
*                                                                             *
*******************************************************************************

Module Name:

	X25LineStatView.cpp

Abstract:

	X25 trace Line statistics propertysheet view.

--*/

#include "stdafx.h"
#include "Diagnostic.h"

#include "DataSource.h"
#include "X25LineStatView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CX25LineStatView

IMPLEMENT_DYNCREATE(CX25LineStatView, CTracePage)

CX25LineStatView::CX25LineStatView() : CTracePage(CX25LineStatView::IDD)
{
	//{{AFX_DATA_INIT(CX25LineStatView)
	//}}AFX_DATA_INIT
}

CX25LineStatView::~CX25LineStatView()
{
}

void CX25LineStatView::DoDataExchange(CDataExchange* pDX)
{
	CTracePage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CX25LineStatView)
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CX25LineStatView, CTracePage)
	//{{AFX_MSG_MAP(CX25LineStatView)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CX25LineStatView message handlers

void CX25LineStatView::OnUpdate(WPARAM lHint) 
{
	// TODO: Add your specialized code here and/or call the base class
	if (lHint == uavTraceFasterPeriod) {
		const CX25TraceData *td = (const CX25TraceData *)GetTraceData();
		CDataExchange dx(this, FALSE);

		DDX_Text(&dx, IDC_CallAcTx, (DWORD&)td->X25CallAc[0]);
		DDX_Text(&dx, IDC_CallRqTx, (DWORD&)td->X25CallRq[0]);
		DDX_Text(&dx, IDC_ClrCfTx, (DWORD&)td->X25ClrCf[0]);
		DDX_Text(&dx, IDC_ClrRqTx, (DWORD&)td->X25ClrRq[0]);
		DDX_Text(&dx, IDC_DataTx, (DWORD&)td->X25Data[0]);
		DDX_Text(&dx, IDC_DiagTx, (DWORD&)td->X25Diag[0]);
		DDX_Text(&dx, IDC_IntCfTx, (DWORD&)td->X25IntCf[0]);
		DDX_Text(&dx, IDC_IntTx, (DWORD&)td->X25Int[0]);
		DDX_Text(&dx, IDC_RejectTx, (DWORD&)td->X25Reject[0]);
		DDX_Text(&dx, IDC_RNRTx, (DWORD&)td->X25RNR[0]);
		DDX_Text(&dx, IDC_RRTx, (DWORD&)td->X25RR[0]);
		DDX_Text(&dx, IDC_RrtCfTx, (DWORD&)td->X25RrtCf[0]);
		DDX_Text(&dx, IDC_RrtRqTx, (DWORD&)td->X25RrtRq[0]);
		DDX_Text(&dx, IDC_RstCfTx, (DWORD&)td->X25RstCf[0]);
		DDX_Text(&dx, IDC_RstRqTx, (DWORD&)td->X25RstRq[0]);

		DDX_Text(&dx, IDC_CallAcRx, (DWORD&)td->X25CallAc[1]);
		DDX_Text(&dx, IDC_CallRqRx, (DWORD&)td->X25CallRq[1]);
		DDX_Text(&dx, IDC_ClrCfRx, (DWORD&)td->X25ClrCf[1]);
		DDX_Text(&dx, IDC_ClrRqRx, (DWORD&)td->X25ClrRq[1]);
		DDX_Text(&dx, IDC_DataRx, (DWORD&)td->X25Data[1]);
		DDX_Text(&dx, IDC_DiagRx, (DWORD&)td->X25Diag[1]);
		DDX_Text(&dx, IDC_IntCfRx, (DWORD&)td->X25IntCf[1]);
		DDX_Text(&dx, IDC_IntRx, (DWORD&)td->X25Int[1]);
		DDX_Text(&dx, IDC_RejectRx, (DWORD&)td->X25Reject[1]);
		DDX_Text(&dx, IDC_RNRRx, (DWORD&)td->X25RNR[1]);
		DDX_Text(&dx, IDC_RRRx, (DWORD&)td->X25RR[1]);
		DDX_Text(&dx, IDC_RrtCfRx, (DWORD&)td->X25RrtCf[1]);
		DDX_Text(&dx, IDC_RrtRqRx, (DWORD&)td->X25RrtRq[1]);
		DDX_Text(&dx, IDC_RstCfRx, (DWORD&)td->X25RstCf[1]);
		DDX_Text(&dx, IDC_RstRqRx, (DWORD&)td->X25RstRq[1]);
		}
}
