Commit 6af32977 authored by Pavel Vainerman's avatar Pavel Vainerman

(ModbusMultiMaster): подправил текст ошибок.

parent 7f491151
......@@ -12,7 +12,7 @@
Name: libuniset2
Version: 2.0
Release: alt19
Release: alt20
Summary: UniSet - library for building distributed industrial control systems
......@@ -409,6 +409,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
# ..
%changelog
* Fri Mar 06 2015 Pavel Vainerman <pv@altlinux.ru> 2.0-alt20
- (modbustcpmaster): minor fixes in error messages
* Fri Mar 06 2015 Pavel Vainerman <pv@altlinux.ru> 2.0-alt19
- codegen: fixed bug (in previous commit)
- codegen: fixed warning (redefined mylog macroses)
......
......@@ -5,6 +5,7 @@
#include <Exceptions.h>
#include <UniSetTypes.h>
#include <extensions/Extensions.h>
#include <ORepHelpers.h>
#include "MBExchange.h"
// -----------------------------------------------------------------------------
using namespace std;
......@@ -2209,9 +2210,16 @@ bool MBExchange::initItem( UniXML::iterator& it )
{
if( p.nbit<0 && ri->slst.size() > 1 )
{
auto conf = uniset_conf();
ostringstream sl;
sl << "[ ";
for( auto& i: ri->slst )
sl << ORepHelpers::getShortName(conf->oind->getMapName(i.si.id)) << ",";
sl << "]";
dcrit << myname << "(initItem): FAILED! Sharing SAVE (not bit saving) to "
<< " tcp_mbreg=" << ModbusRTU::dat2str(ri->mbreg)
<< " for " << it.getProp("name") << endl;
<< " tcp_mbreg=" << ModbusRTU::dat2str(ri->mbreg) << "(" << (int)ri->mbreg << ")"
<< " conflict with sensors " << sl.str() << endl;
abort(); // ABORT PROGRAM!!!!
return false;
......@@ -2223,7 +2231,7 @@ bool MBExchange::initItem( UniXML::iterator& it )
if( it2->nbit < 0 )
{
dcrit << myname << "(initItem): FAILED! Sharing SAVE (mbreg="
<< ModbusRTU::dat2str(ri->mbreg) << " already used)!"
<< ModbusRTU::dat2str(ri->mbreg) << "(" << (int)ri->mbreg << ") already used)!"
<< " IGNORE --> " << it.getProp("name") << endl;
abort(); // ABORT PROGRAM!!!!
return false;
......
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