Commit 65441f29 authored by Pavel Vainerman's avatar Pavel Vainerman

Исправил ошибку не позволявщую задать ObjectId=0.

Хотя это разрешено.
parent b0310ae3
......@@ -8,7 +8,7 @@
Name: libuniset
Version: 1.8
Release: alt1
Release: alt2
Summary: UniSet - library for building distributed industrial control systems
......@@ -336,6 +336,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Thu Nov 13 2014 Pavel Vainerman <pv@altlinux.ru> 1.8-alt2
- fixed bug: Now ObjectID=0 does not cause an error
* Thu Oct 30 2014 Pavel Vainerman <pv@altlinux.ru> 1.8-alt1
- (IOBase): added the ability to override the basic settings using the prefix.
- (SQLiteInterface): fixed bug in SQLiteResult
......
......@@ -158,7 +158,10 @@
</nodes>
<!-- ************************ Датчики ********************** -->
<sensors name="Sensors">
<item id="0" iotype="DI" name="ZeroInput1_S" priority="Medium" textname="Команда 0"/>
<item db_ignore="1" default="1" id="1" iotype="DI" name="Input1_S" priority="Medium" textname="Команда 1"/>
<item id="200" iotype="DI" mbaddr="0x01" mbfunc="0x04" mbreg="0" mbtype="rtu" name="MBREG0_S" nbit="11" priority="Medium" rs="5" textname="mbreg=0"/>
<item id="2" iotype="DI" mbaddr="0x01" mbfunc="0x06" mbreg="0x02" mbtype="rtu" name="Input2_S" nbit="11" priority="Medium" rs="4" textname="Команда 2"/>
<item id="3" iotype="DI" mbtcp="1" mbtcp_mbaddr="0x02" mbtcp_mbfunc="0x03" mbtcp_mbreg="0x02" mbtcp_mbtype="rtu" name="Input3_S" priority="Medium" textname="Команда 3"/>
<item id="4" iotype="DI" mbaddr="0x02" mbfunc="0x04" mbreg="0x02" mbtype="rtu" name="Input4_S" priority="Medium" rs="2" textname="Команда 4"/>
......
......@@ -131,9 +131,9 @@ void ObjectIndex_idXML::read_section( UniXML& xml, const std::string& sec )
for( ;it.getCurrent(); it.goNext() )
{
ObjectInfo inf;
inf.id = it.getIntProp("id");
inf.id = it.getPIntProp("id",DefaultObjectId);
if( inf.id <= 0 )
if( inf.id == DefaultObjectId )
{
ostringstream msg;
msg << "(ObjectIndex_idXML::build): НЕ УКАЗАН id для " << it.getProp("name")
......
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