/*
*******************************************************************************
* Copyright (c) 1996-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 copyright work  Digi   International *
* Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is *
* strictly prohibited.                                                        *
*                                                                             *
* Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc. *
* Confidential  when   combined   with   the   aggregated  modules  for  this *
* product) OBJECT CODE ONLY SOURCE MATERIALS                                  *
*                                                                             *
* (C) COPYRIGHT Digi International Inc. 1996-97                               *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************

// FRLineStatView.cpp : implementation file
//

Revision History:

   $History: FRLineStatView.cpp $
 * 
 * *****************  Version 15  *****************
 * User: Mikez        Date: 7/11/97    Time: 5:02p
 * Branched in $/Components/Windows/NT/Sync/Build/Diag
 * 
 * *****************  Version 14  *****************
 * User: Rodgerb      Date: 1/27/97    Time: 1:18p
 * Updated in $/Components/Windows/NT/Sync/rev2diag
 * 1) documentation
 * 2) added some new params to Physical layer stats
*/

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

#include "DataSource.h"
#include "FRLineStatView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFRLineStatView

IMPLEMENT_DYNCREATE(CFRLineStatView, CTracePage)

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

CFRLineStatView::~CFRLineStatView()
{
}

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


BEGIN_MESSAGE_MAP(CFRLineStatView, CTracePage)
	//{{AFX_MSG_MAP(CFRLineStatView)
	ON_WM_ERASEBKGND()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFRLineStatView message handlers

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

		DDX_Text(&dx, IDC_IPTx, (DWORD&)td->IP[0]);
		DDX_Text(&dx, IDC_IPXTx, (DWORD&)td->IPX[0]);
		DDX_Text(&dx, IDC_EthernetTx, (DWORD&)td->Ethernet[0]);
		DDX_Text(&dx, IDC_FRF9Tx, (DWORD&)td->FRF9[0]);
		DDX_Text(&dx, IDC_OtherTx, (DWORD&)td->Other[0]);

		DDX_Text(&dx, IDC_BECNFTx, (DWORD&)td->BECN[0]);
		DDX_Text(&dx, IDC_DEFTx, (DWORD&)td->DE[0]);
		DDX_Text(&dx, IDC_FECNFTx, (DWORD&)td->FECN[0]);
		DDX_Text(&dx, IDC_LMISMTX, (DWORD&)td->LMISM[0]);
		DDX_Text(&dx, IDC_LMISETx, (DWORD&)td->LMISE[0]);
		DDX_Text(&dx, IDC_LMIUSTx, (DWORD&)td->LMIUS[0]);

		DDX_Text(&dx, IDC_IPRx, (DWORD&)td->IP[1]);
		DDX_Text(&dx, IDC_IPXRx, (DWORD&)td->IPX[1]);
		DDX_Text(&dx, IDC_EthernetRx, (DWORD&)td->Ethernet[1]);
		DDX_Text(&dx, IDC_FRF9Rx, (DWORD&)td->FRF9[1]);
		DDX_Text(&dx, IDC_OtherRx, (DWORD&)td->Other[1]);

		DDX_Text(&dx, IDC_BECNFRx, (DWORD&)td->BECN[1]);
		DDX_Text(&dx, IDC_DEFRx, (DWORD&)td->DE[1]);
		DDX_Text(&dx, IDC_FECNFRx, (DWORD&)td->FECN[1]);
		DDX_Text(&dx, IDC_LMISMRx, (DWORD&)td->LMISM[1]);
		DDX_Text(&dx, IDC_LMISERx, (DWORD&)td->LMISE[1]);
		DDX_Text(&dx, IDC_LMIUSRx, (DWORD&)td->LMIUS[1]);
		}
}
