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.
|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: VideoDevice.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of VideoDevice.cpp
//----------------------------------------------------------------------------
// VideoDevice.cpp: implementation of the CVideoDevice class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
//#include "chicago.h"
#include "VideoDevice.h"
#include "..\..\LgLib\Version.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVideoDevice::CVideoDevice(){ m_nOutput = 0; m_pOutput = NULL;
m_nInput = 0; m_pInput = NULL;
m_pSensorArray = NULL;
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CVideoDevice::CVideoDevice") );}
CVideoDevice::~CVideoDevice(){ Destroy();
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CVideoDevice::~CVideoDevice") );}
void CVideoDevice::Destroy(){ if( m_pInput ) { delete [] m_pInput; m_pInput = NULL; } if( m_pOutput ) { delete [] m_pOutput; m_pOutput = NULL; } m_nOutput = 0; m_nInput = 0;}
void CVideoDevice::SetIOCount( int nInput, int nOutput ){ Destroy();
m_nOutput = nOutput; if( m_nOutput ) { m_pOutput = new CVideoPin[ m_nOutput ]; for( int i = 0; i < m_nOutput; i++ ) { m_pOutput[ i ].SetPinDir( CVideoPin::PD_OUTPUT ); m_pOutput[ i ].SetVideoDevice( this, i ); } }
m_nInput = nInput; if( m_nInput ) { m_pInput = new CVideoPin[ m_nInput ]; for( int i = 0; i < m_nInput; i++ ) { m_pInput[ i ].SetPinDir( CVideoPin::PD_INPUT ); m_pInput[ i ].SetVideoDevice( this, i ); } }}
|