Commit 49d0fa05 authored by Pavel Vainerman's avatar Pavel Vainerman

minor fixes: use for default "unsigned short" in Modbus

parent 0ebdd408
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 0.97 Version: 0.97
Release: eter29 Release: eter30
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
...@@ -178,6 +178,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -178,6 +178,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc %exclude %_pkgconfigdir/libUniSet.pc
%changelog %changelog
* Sun Oct 18 2009 Pavel Vainerman <pv@altlinux.ru> 0.97-eter29
- new build
* Fri Oct 09 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter28 * Fri Oct 09 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter28
- minor optimization - minor optimization
......
...@@ -1568,7 +1568,7 @@ void MBTCPMaster::updateRSProperty( RSProperty* p, bool write_only ) ...@@ -1568,7 +1568,7 @@ void MBTCPMaster::updateRSProperty( RSProperty* p, bool write_only )
IOBase::processingAsDI( p, r->mbval, shm, force ); IOBase::processingAsDI( p, r->mbval, shm, force );
} }
else else
IOBase::processingAsAI( p, (signed short)(r->mbval), shm, force ); IOBase::processingAsAI( p, (unsigned short)(r->mbval), shm, force );
} }
return; return;
} }
......
...@@ -1730,7 +1730,7 @@ void RTUExchange::updateRSProperty( RSProperty* p, bool write_only ) ...@@ -1730,7 +1730,7 @@ void RTUExchange::updateRSProperty( RSProperty* p, bool write_only )
IOBase::processingAsDI( p, r->mbval, shm, force ); IOBase::processingAsDI( p, r->mbval, shm, force );
} }
else else
IOBase::processingAsAI( p, (signed short)(r->mbval), shm, force ); IOBase::processingAsAI( p, (unsigned short)(r->mbval), shm, force );
} }
return; return;
} }
......
...@@ -16,16 +16,15 @@ std::ostream& operator<<( std::ostream& os, const VType& vt ) ...@@ -16,16 +16,15 @@ std::ostream& operator<<( std::ostream& os, const VType& vt )
VType str2type( const std::string s ) VType str2type( const std::string s )
{ {
if( s == "Byte" ) if( s == "Byte" || s == "byte" )
return vtByte; return vtByte;
if( s == "F2" || s == "f2" )
if( s == "F2" )
return vtF2; return vtF2;
if( s == "F4" ) if( s == "F4" || s == "f4" )
return vtF4; return vtF4;
if( s == "Unsigned" ) if( s == "Unsigned" || s == "unsigned" )
return vtUnsigned; return vtUnsigned;
if( s == "Signed" ) if( s == "Signed" || s == "signed" )
return vtSigned; return vtSigned;
return vtUnknown; return vtUnknown;
......
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