Commit bf8ca4b1 authored by Pavel Vainerman's avatar Pavel Vainerman

(UDPNet): увеличил разрешённое количество датчиков передаваемых по сети (600…

(UDPNet): увеличил разрешённое количество датчиков передаваемых по сети (600 аналоговых и 600 дискретных). И сделал "вылет" процесса, если количество оказывается больше..
parent 1fca344a
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 1.4
Release: alt9
Release: alt10
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -211,6 +211,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Wed Aug 29 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt10
- (UDPNet): increase the resolution of the sensors over the network (600 analog, 600 digital)
* Mon Aug 20 2012 Pavel Vainerman <pv@altlinux.ru> 1.4-alt9
- fixed bug in previous commit (bug in UniXML::iterator::find)
......
......@@ -41,8 +41,8 @@ namespace UniSetUDP
friend std::ostream& operator<<( std::ostream& os, UDPAData& p );
}__attribute__((packed));
static const size_t MaxACount = 200;
static const size_t MaxDCount = 400;
static const size_t MaxACount = 600;
static const size_t MaxDCount = 600;
static const size_t MaxDDataCount = MaxDCount / sizeof(unsigned char);
struct UDPPacket
......
......@@ -292,6 +292,8 @@ bool UNetSender::initItem( UniXML_iterator& it )
dlog[Debug::CRIT] << myname
<< "(readItem): OVERFLOW! MAX UDP DIGITAL DATA LIMIT! max="
<< UniSetUDP::MaxDCount << endl;
raise(SIGTERM);
return false;
}
}
......@@ -303,6 +305,7 @@ bool UNetSender::initItem( UniXML_iterator& it )
dlog[Debug::CRIT] << myname
<< "(readItem): OVERFLOW! MAX UDP ANALOG DATA LIMIT! max="
<< UniSetUDP::MaxACount << endl;
raise(SIGTERM);
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