/*++
*******************************************************************************
* Copyright (c) 1990-98 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:

   

Abstract:

   DataFire PRIme adapter data source.

Author:

   Michael Zarns

--*/

class CPrimeDataSource : public CDataSource
{
	CString m_Protocol;

	virtual CTracer *CreateTracer();
	virtual CTraceData *CreateTraceData( DWORD, CDWordArray& );

	CIfaceState m_IfaceState;	// IfaceState defines Alarms, loopback, etc.
	CRfc1406    m_Rfc1406;		// Defines DS1 Near End group, ie Errored seconds, etc.

public:
	CPrimeDataSource(const HKEY hkLine, const CString& DeviceName, const CString& Protocol );

// Attributes
	virtual const CSXB_USER_IOCTL * GetStatType(const type_info&, int = -1) const;
	virtual CRuntimeClass *GetStatDocClass() {return NULL;}

	virtual LPCSTR GetProtocol() const { return m_Protocol; }
	virtual eSourceType GetDefaultFirmwareDevice() {return stT1;}
	virtual BOOL UpdateDataSourceStats();

// Operations
	virtual void LoadSummaryInfo(const CString&);
	virtual void LoadConfigCircuits() {}
	virtual eDataSourceStatus GetStatus(eSourceType FirmwareDevice = stT1) {return CDataSource::GetStatus( FirmwareDevice );}
};


class CPrimeTraceData : public CIsdnTraceData
{
public:
	CPrimeTraceData() : CIsdnTraceData() {};
	CPrimeTraceData(DWORD baud, CDWordArray& circuits) : CIsdnTraceData( baud, circuits ) {};
	virtual double TimeInSeconds(DWORD t) const {return (t - m_FirstTimeStamp) / 50.0f;}
};