Commit 0630856a authored by Pavel Vainerman's avatar Pavel Vainerman

add new fuction to MBSlave

parent cd99adbe
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.96
Release: eter34
Release: eter35
Summary: UniSet - library for building distributed industrial control systems
......
......@@ -282,7 +282,7 @@ void MBSlave::execute_rtu()
{
//
askCount = askCount>=numeric_limits<long>::max() ? 0 : askCount+1;
if( res!=ModbusRTU::erNoError )
if( res!=ModbusRTU::erNoError )
errmap[res]++;
prev = res;
......@@ -333,7 +333,7 @@ void MBSlave::execute_tcp()
{
//
askCount = askCount>=numeric_limits<long>::max() ? 0 : askCount+1;
if( res!=ModbusRTU::erNoError )
if( res!=ModbusRTU::erNoError )
errmap[res]++;
prev = res;
......
......@@ -56,6 +56,8 @@ class MBSlave:
friend std::ostream& operator<<( std::ostream& os, IOProperty& p );
};
inline long getAskCount(){ return askCount; }
protected:
/*! 0x01 */
......@@ -165,7 +167,7 @@ class MBSlave:
ModbusRTU::mbErrCode prev;
long askCount;
typedef std::map<ModbusRTU::mbErrCode,unsigned int> ExchangeErrorMap;
ExchangeErrorMap errmap; /*!< */
ExchangeErrorMap errmap; /*!< */
bool activated;
int activateTimeout;
......
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