Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

91 lines
2.4 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 30/06/2002
// PROJECT:
// SUBSYSTEM:
// FILE: LgRemoteInterfaceBR.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of LgRemoteInterfaceBR.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "..\Version.h"
#include "LgRemoteInterfaceBR.h"
CLgRemoteInterfaceBR::CLgRemoteInterfaceBR()
{
m_Link.SetData( this );
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceBR::CLgRemoteInterfaceBR" );
}
CLgRemoteInterfaceBR::~CLgRemoteInterfaceBR()
{
UnlinkRemoteInterfaceBR();
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceBR::~CLgRemoteInterfaceBR" );
}
BOOL CLgRemoteInterfaceBR::LinkRemoteInterfaceBR( CLgRemoteInterfaceBR *pInterface )
{
if( !pInterface )
return FALSE;
return m_Link.Link( &pInterface->m_Link );
}
void CLgRemoteInterfaceBR::UnlinkRemoteInterfaceBR()
{
m_Link.UnlinkAll();
}
BOOL CLgRemoteInterfaceBR::DoRemoteBRGetChannelProperties()
{
CLgLocker Lock( &m_Link );
if( !m_Link.GetCount() )
return FALSE;
CLgRemoteInterfaceBR *pInterface = (CLgRemoteInterfaceBR*)m_Link[0]->GetData();
return pInterface->DoRemoteBRGetChannelProperties();
}
BOOL CLgRemoteInterfaceBR::OnRemoteBRGetChannelProperties( INT nChannelCount, LG_TCP_PACKET_BOARD_RECEIVER::PCHANNEL_PROPERTIES pProperties )
{
CLgLocker Lock( &m_Link );
if( !m_Link.GetCount() )
return FALSE;
CLgRemoteInterfaceBR *pInterface = (CLgRemoteInterfaceBR*)m_Link[0]->GetData();
return pInterface->OnRemoteBRGetChannelProperties( nChannelCount, pProperties );
}
BOOL CLgRemoteInterfaceBR::DoRemoteBRChannelConnect( INT nChannel )
{
CLgLocker Lock( &m_Link );
if( !m_Link.GetCount() )
return FALSE;
CLgRemoteInterfaceBR *pInterface = (CLgRemoteInterfaceBR*)m_Link[0]->GetData();
return pInterface->DoRemoteBRChannelConnect( nChannel );
}
BOOL CLgRemoteInterfaceBR::OnRemoteBRChannelConnect( INT nChannel, BOOL bResult )
{
CLgLocker Lock( &m_Link );
if( !m_Link.GetCount() )
return FALSE;
CLgRemoteInterfaceBR *pInterface = (CLgRemoteInterfaceBR*)m_Link[0]->GetData();
return pInterface->OnRemoteBRChannelConnect( nChannel, bResult );
}