/*
*******************************************************************************
* 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-2000                             *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************

// LAPBLineView.cpp : implementation file
//

*/

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

#include "DataSource.h"
#include "LAPBLineView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CLAPBLineView

IMPLEMENT_DYNCREATE(CLAPBLineView, CTracePage)

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

CLAPBLineView::~CLAPBLineView()
{
}

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


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

/////////////////////////////////////////////////////////////////////////////
// CLAPBLineView message handlers

void CLAPBLineView::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_DataTx, (DWORD&)td->LAPBData[0]);
		DDX_Text(&dx, IDC_DISCTx, (DWORD&)td->LAPBDISC[0]);
		DDX_Text(&dx, IDC_FRMRTx, (DWORD&)td->LAPBFRMR[0]);
		DDX_Text(&dx, IDC_RejectTx, (DWORD&)td->LAPBREJ[0]);
		DDX_Text(&dx, IDC_RNRTx, (DWORD&)td->LAPBRNR[0]);
		DDX_Text(&dx, IDC_RRTx, (DWORD&)td->LAPBRR[0]);
		DDX_Text(&dx, IDC_SABMETx, (DWORD&)td->LAPBSABME[0]);
		DDX_Text(&dx, IDC_SABMTx, (DWORD&)td->LAPBSABM[0]);
		DDX_Text(&dx, IDC_UATx, (DWORD&)td->LAPBUA[0]);
		DDX_Text(&dx, IDC_DMTx, (DWORD&)td->LAPBDM[0]);

		DDX_Text(&dx, IDC_DataRx, (DWORD&)td->LAPBData[1]);
		DDX_Text(&dx, IDC_DISCRx, (DWORD&)td->LAPBDISC[1]);
		DDX_Text(&dx, IDC_FRMRRx, (DWORD&)td->LAPBFRMR[1]);
		DDX_Text(&dx, IDC_RejectRx, (DWORD&)td->LAPBREJ[1]);
		DDX_Text(&dx, IDC_RNRRx, (DWORD&)td->LAPBRNR[1]);
		DDX_Text(&dx, IDC_RRRx, (DWORD&)td->LAPBRR[1]);
		DDX_Text(&dx, IDC_SABMERx, (DWORD&)td->LAPBSABME[1]);
		DDX_Text(&dx, IDC_SABMRx, (DWORD&)td->LAPBSABM[1]);
		DDX_Text(&dx, IDC_UARx, (DWORD&)td->LAPBUA[1]);
		DDX_Text(&dx, IDC_DMRx, (DWORD&)td->LAPBDM[1]);
		}
}
