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.
44 lines
1.0 KiB
44 lines
1.0 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(){
|
|
Destroy();
|
|
};
|
|
|
|
CRelay::~CRelay(){
|
|
Destroy();
|
|
};
|
|
|
|
bool CRelay::Create( CBoard *pBoard, LGS::PRELAY_PARAMETERS pParameters ){
|
|
Destroy();
|
|
if( !pParameters || !pBoard ) return false;
|
|
// store parameters
|
|
memcpy( &m_RelayParameters, pParameters, sizeof( LGS::PRELAY_PARAMETERS ) );
|
|
m_pBoard = pBoard;
|
|
// initiate relay
|
|
SetRelay( false );
|
|
return true;
|
|
};
|
|
|
|
void CRelay::Destroy(){
|
|
// reset pointer
|
|
m_pBoard = NULL;
|
|
memset( &m_RelayParameters, 0, sizeof( LGS::PRELAY_PARAMETERS ) );
|
|
m_dwAutoDelayTime = 0;
|
|
m_lAutoDelayTimeout = 0;
|
|
m_bOutput = 0;
|
|
};
|
|
|