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.
58 lines
1.2 KiB
58 lines
1.2 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: relay_.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of relay_.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "Relay.h"
|
|
|
|
CRelay::CRelay()
|
|
{
|
|
m_pBoard = NULL;
|
|
memset( &m_RelayParameters, 0, sizeof( m_RelayParameters ) );
|
|
m_dwAutoDelayTime = 0;
|
|
m_lAutoDelayTimeout = 0;
|
|
m_bOutput = 0;
|
|
}
|
|
|
|
CRelay::~CRelay()
|
|
{
|
|
Destroy();
|
|
}
|
|
|
|
BOOL CRelay::Create( CBoard *pBoard, LGS::PRELAY_PARAMETERS pParameters )
|
|
{
|
|
Destroy();
|
|
|
|
if( !pParameters || !pBoard )
|
|
return FALSE;
|
|
|
|
// store parameters
|
|
m_RelayParameters = *pParameters;
|
|
m_pBoard = pBoard;
|
|
|
|
// initiate relay
|
|
SetRelay( FALSE );
|
|
return TRUE;
|
|
}
|
|
|
|
void CRelay::Destroy()
|
|
{
|
|
// reset pointer
|
|
m_pBoard = NULL;
|
|
|
|
// reset prameters
|
|
memset( &m_RelayParameters, 0, sizeof( m_RelayParameters ) );
|
|
m_dwAutoDelayTime = 0;
|
|
m_lAutoDelayTimeout = 0;
|
|
m_bOutput = 0;
|
|
}
|
|
|