Commit 7e7e7f4b authored by Pavel Vainerman's avatar Pavel Vainerman

(MBExchage): minor refactoring

parent f468aff2
......@@ -58,7 +58,7 @@ namespace uniset
exchangeMode(emNone),
activated(false),
noQueryOptimization(false),
no_extimer(false),
notUseExchangeTimer(false),
prefix(prefix),
poll_count(0),
prop_prefix(""),
......@@ -411,7 +411,7 @@ namespace uniset
}
// ------------------------------------------------------------------------------------------
MBExchange::DeviceType MBExchange::getDeviceType( const std::string& dtype )
MBExchange::DeviceType MBExchange::getDeviceType( const std::string& dtype ) noexcept
{
if( dtype.empty() )
return dtUnknown;
......@@ -3250,7 +3250,7 @@ namespace uniset
{
if( tm->id == tmExchange )
{
if( no_extimer )
if( notUseExchangeTimer )
askTimer(tm->id, 0);
else
step();
......@@ -3448,7 +3448,7 @@ namespace uniset
// -----------------------------------------------------------------------------
void MBExchange::execute()
{
no_extimer = true;
notUseExchangeTimer = true;
try
{
......
......@@ -94,7 +94,7 @@ namespace uniset
dtRTU188 /*!< RTU188 (Fastwell) */
};
static DeviceType getDeviceType( const std::string& dtype );
static DeviceType getDeviceType( const std::string& dtype ) noexcept;
friend std::ostream& operator<<( std::ostream& os, const DeviceType& dt );
struct RTUDevice;
......@@ -352,7 +352,7 @@ namespace uniset
std::atomic_bool activated = { false };
timeout_t activateTimeout = { 20000 }; // msec
bool noQueryOptimization = { false };
bool no_extimer = { false };
bool notUseExchangeTimer = { false };
std::string prefix;
......
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