Commit e487a448 authored by Pavel Vainerman's avatar Pavel Vainerman

(RSExchange): попытка исправить задержку возникающую при обмене.

parent 322d5009
...@@ -145,7 +145,7 @@ void MBTCPMaster::poll_thread() ...@@ -145,7 +145,7 @@ void MBTCPMaster::poll_thread()
{ {
try try
{ {
if( sidExchangeMode != DefaultObjectId && force_out ) if( sidExchangeMode != DefaultObjectId && force )
exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode); exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode);
} }
catch(...){} catch(...){}
......
...@@ -157,15 +157,12 @@ void RTUExchange::step() ...@@ -157,15 +157,12 @@ void RTUExchange::step()
{ {
try try
{ {
if( sidExchangeMode != DefaultObjectId && force_out ) if( sidExchangeMode != DefaultObjectId && force )
exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode); exchangeMode = shm->localGetValue(aitExchangeMode,sidExchangeMode);
} }
catch(...){} catch(...){}
{ poll();
uniset_mutex_lock l(pollMutex,2000);
poll();
}
MBExchange::step(); MBExchange::step();
} }
......
...@@ -65,8 +65,8 @@ class UniSetTimer ...@@ -65,8 +65,8 @@ class UniSetTimer
static const timeout_t WaitUpTime = TIMEOUT_INF; static const timeout_t WaitUpTime = TIMEOUT_INF;
/*! Минимальное время срабатывания. Задается в мсек. */ /*! Минимальное время срабатывания. Задается в мсек. */
static const timeout_t MinQuantityTime = 30; static const timeout_t MinQuantityTime = 10;
static const timeout_t MIN_QUANTITY_TIME_MS = 30; /*< устарело, не использовать! */ static const timeout_t MIN_QUANTITY_TIME_MS = 10; /*< устарело, не использовать! */
}; };
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
/*! \class PassiveTimer /*! \class PassiveTimer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment