For DOS Protected Mode version of sensor core software
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.
 
 
 
 

36 lines
987 B

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: Protocol.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of Protocol.cpp
//----------------------------------------------------------------------------
#include "..\stdafx.h"
#ifdef __BORLANDC__
#include "..\LgLib\version.h"
#include "..\LgLib\Comm\Protocol.h"
#else
#include "..\version.h"
#include "Protocol.h"
#endif
bool CProtocol::Transaction( PBYTE pRequest, int16_t nRequest, PBYTE *ppResponse, PINT pResponse, DWORD dwTimeout, int16_t nRetryCount, bool bHost )
{
for( int i = 0; i < nRetryCount; i++ )
{
if( !Write( pRequest, nRequest, dwTimeout, bHost ) )
return false;
if( Read( ppResponse, pResponse, dwTimeout, bHost ) )
return true;
}
return false;
}