Important Update:
- DeviceCore: - Allow adjustable reply timeout with SetWaitForReply()
This commit is contained in:
@@ -432,6 +432,7 @@ bool CDeviceCore::SetPollParam( int pPollInterval )
|
||||
|
||||
bool CDeviceCore::SetReplyParam( int pReplyTimeout, int pMaxRetries )
|
||||
{
|
||||
DefReplyTimeout = pReplyTimeout;
|
||||
ReplyTimeout = pReplyTimeout;
|
||||
MaxRetries = pMaxRetries;
|
||||
return true;
|
||||
@@ -456,12 +457,13 @@ bool CDeviceCore::DeviceOnline( TDevice * Device, bool Online )
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void CDeviceCore::SetWaitForReply()
|
||||
void CDeviceCore::SetWaitForReply( int CustomTimeout )
|
||||
{
|
||||
// Start timer
|
||||
SetStartTime( &PollWait );
|
||||
|
||||
// Set flag
|
||||
ReplyTimeout = (CustomTimeout >= 0)? CustomTimeout : DefReplyTimeout;
|
||||
WaitingForReply = true;
|
||||
InvalidReply = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user