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

(MBExchage): minor refactoring

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