Commit c4d818e4 authored by Pavel Vainerman's avatar Pavel Vainerman

backported to p9 as 2.9.3-alt1.M90P.2 (with rpmbph script)

parents d08605e1 f228ac53
...@@ -1219,7 +1219,7 @@ int sinfo(const string& args, UInterface& ui ) ...@@ -1219,7 +1219,7 @@ int sinfo(const string& args, UInterface& ui )
if( it.si.node == DefaultObjectId ) if( it.si.node == DefaultObjectId )
it.si.node = conf->getLocalNode(); it.si.node = conf->getLocalNode();
IOController_i::SensorIOInfo_var sinf = ui.getSensorIOInfo(it.si); auto sinf = ui.getSensorIOInfo(it.si);
#if 0 #if 0
UniversalIO::IOType type; /*!< тип */ UniversalIO::IOType type; /*!< тип */
long priority; /*!< приоритет уведомления */ long priority; /*!< приоритет уведомления */
...@@ -1229,22 +1229,22 @@ int sinfo(const string& args, UInterface& ui ) ...@@ -1229,22 +1229,22 @@ int sinfo(const string& args, UInterface& ui )
const int w = 14; const int w = 14;
print_help(w, "id", std::to_string(it.si.id) + "\n", " ", " : "); print_help(w, "id", std::to_string(it.si.id) + "\n", " ", " : ");
print_help(w, "node", std::to_string(it.si.node) + "\n", " ", " : "); print_help(w, "node", std::to_string(it.si.node) + "\n", " ", " : ");
print_help(w, "value", std::to_string(sinf->value) + "\n", " ", " : "); print_help(w, "value", std::to_string(sinf.value) + "\n", " ", " : ");
print_help(w, "real_value", std::to_string(sinf->real_value) + "\n", " ", " : "); print_help(w, "real_value", std::to_string(sinf.real_value) + "\n", " ", " : ");
print_help(w, "frozen", std::to_string(sinf->frozen) + "\n", " ", " : "); print_help(w, "frozen", std::to_string(sinf.frozen) + "\n", " ", " : ");
print_help(w, "undefined", std::to_string(sinf->undefined) + "\n", " ", " : "); print_help(w, "undefined", std::to_string(sinf.undefined) + "\n", " ", " : ");
print_help(w, "blocked", std::to_string(sinf->blocked) + "\n", " ", " : "); print_help(w, "blocked", std::to_string(sinf.blocked) + "\n", " ", " : ");
if( sinf->depend_sid != DefaultObjectId ) if( sinf.depend_sid != DefaultObjectId )
print_help(w, "depend_sensor", "(" + to_string(sinf->depend_sid) + ")" + ORepHelpers::getShortName(conf->oind->getMapName(sinf->depend_sid)) + "\n", " ", " : "); print_help(w, "depend_sensor", "(" + to_string(sinf.depend_sid) + ")" + ORepHelpers::getShortName(conf->oind->getMapName(sinf.depend_sid)) + "\n", " ", " : ");
if( sinf->supplier == uniset::AdminID ) if( sinf.supplier == uniset::AdminID )
print_help(w, "supplier", "admin\n", " ", " : "); print_help(w, "supplier", "admin\n", " ", " : ");
else else
print_help(w, "supplier", ORepHelpers::getShortName(conf->oind->getMapName(sinf->supplier)) + "\n", " ", " : "); print_help(w, "supplier", ORepHelpers::getShortName(conf->oind->getMapName(sinf.supplier)) + "\n", " ", " : ");
ostringstream ts; ostringstream ts;
ts << dateToString(sinf->tv_sec) << " " << timeToString(sinf->tv_sec) << "." << sinf->tv_nsec << "\n"; ts << dateToString(sinf.tv_sec) << " " << timeToString(sinf.tv_sec) << "." << sinf.tv_nsec << "\n";
print_help(w, "changed", ts.str(), " ", " : "); print_help(w, "changed", ts.str(), " ", " : ");
} }
catch( const uniset::Exception& ex ) catch( const uniset::Exception& ex )
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
Name: libuniset2 Name: libuniset2
Version: 2.9.3 Version: 2.9.3
Release: alt0.M90P.0.2 Release: alt1.M90P.2
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: LGPL-2.1 License: LGPL-2.1
...@@ -194,13 +194,6 @@ Summary: CORBA object reference resolver based on http ...@@ -194,13 +194,6 @@ Summary: CORBA object reference resolver based on http
CORBA object reference resolver based on http CORBA object reference resolver based on http
%endif %endif
%package extension-wsgate
Group: Development/Tools
Summary: Websocket gate for uniset
%description extension-wsgate
Websocket gate for uniset
%if_enabled mysql %if_enabled mysql
%package extension-mysql %package extension-mysql
Group: Development/Databases Group: Development/Databases
...@@ -544,9 +537,6 @@ rm -f %buildroot%_docdir/%oname/html/*.md5 ...@@ -544,9 +537,6 @@ rm -f %buildroot%_docdir/%oname/html/*.md5
%_bindir/%oname-httpresolver* %_bindir/%oname-httpresolver*
%endif %endif
%files extension-wsgate
%_bindir/%oname-wsgate*
%files extension-common-devel %files extension-common-devel
%dir %_includedir/%oname/extensions %dir %_includedir/%oname/extensions
%_includedir/%oname/extensions/*.* %_includedir/%oname/extensions/*.*
...@@ -570,11 +560,14 @@ rm -f %buildroot%_docdir/%oname/html/*.md5 ...@@ -570,11 +560,14 @@ rm -f %buildroot%_docdir/%oname/html/*.md5
# history of current unpublished changes # history of current unpublished changes
%changelog %changelog
* Wed Jan 13 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.3-alt0.M90P.0.2 * Fri Feb 12 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.3-alt1.M90P.2
- backport to ALTLinux p9 (by rpmbph script) - backport to ALTLinux p9 (by rpmbph script)
* Wed Jan 13 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.3-alt0.1 * Sun Jan 31 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.3-alt2
- test build for websocketgate - fixed lib version
* Thu Jan 14 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.3-alt1
- minor fixes (supported old omniORB)
* Sat Jan 09 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.2-alt1 * Sat Jan 09 2021 Pavel Vainerman <pv@altlinux.ru> 2.9.2-alt1
- admin: added 'sinfo' function - admin: added 'sinfo' function
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# See doc: http://www.gnu.org/software/hello/manual/autoconf/Generic-Programs.html # See doc: http://www.gnu.org/software/hello/manual/autoconf/Generic-Programs.html
# AC_PREREQ(2.59) # AC_PREREQ(2.59)
AC_INIT([uniset2], [2.9.2], pv@etersoft.ru) AC_INIT([uniset2], [2.9.3], pv@etersoft.ru)
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
LIBVER=11:2:9 LIBVER=11:3:9
AC_SUBST(LIBVER) AC_SUBST(LIBVER)
# AC_CONFIG_MACRO_DIR([m4]) # AC_CONFIG_MACRO_DIR([m4])
......
...@@ -291,37 +291,37 @@ TEST_CASE("UInterface::getSensorIOInfo", "[UInterface][getSensorIOInfo]") ...@@ -291,37 +291,37 @@ TEST_CASE("UInterface::getSensorIOInfo", "[UInterface][getSensorIOInfo]")
REQUIRE_NOTHROW( ui->getSensorIOInfo(si) ); REQUIRE_NOTHROW( ui->getSensorIOInfo(si) );
auto inf = ui->getSensorIOInfo(si); auto inf = ui->getSensorIOInfo(si);
REQUIRE( inf->supplier == testOID ); REQUIRE( inf.supplier == testOID );
REQUIRE( inf->value == 200 ); REQUIRE( inf.value == 200 );
REQUIRE( inf->real_value == 200 ); REQUIRE( inf.real_value == 200 );
REQUIRE( inf->blocked == false ); REQUIRE( inf.blocked == false );
REQUIRE( inf->frozen == false ); REQUIRE( inf.frozen == false );
REQUIRE( inf->undefined == false ); REQUIRE( inf.undefined == false );
REQUIRE( inf->tv_sec > 0 ); REQUIRE( inf.tv_sec > 0 );
REQUIRE( inf->dbignore == false ); REQUIRE( inf.dbignore == false );
REQUIRE( inf->depend_sid == DefaultObjectId ); REQUIRE( inf.depend_sid == DefaultObjectId );
// freeze/unfreeze // freeze/unfreeze
REQUIRE_NOTHROW( ui->freezeValue(si, true, 10, testOID) ); REQUIRE_NOTHROW( ui->freezeValue(si, true, 10, testOID) );
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->frozen == true ); REQUIRE( inf.frozen == true );
REQUIRE( inf->supplier == testOID ); REQUIRE( inf.supplier == testOID );
REQUIRE_NOTHROW( ui->freezeValue(si, false, 10, testOID) ); REQUIRE_NOTHROW( ui->freezeValue(si, false, 10, testOID) );
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->frozen == false ); REQUIRE( inf.frozen == false );
REQUIRE( inf->supplier == testOID ); REQUIRE( inf.supplier == testOID );
// undef // undef
REQUIRE_NOTHROW( ui->setUndefinedState( si, true, testOID )); REQUIRE_NOTHROW( ui->setUndefinedState( si, true, testOID ));
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->undefined == true ); REQUIRE( inf.undefined == true );
REQUIRE( inf->supplier == testOID ); REQUIRE( inf.supplier == testOID );
REQUIRE_NOTHROW( ui->setUndefinedState( si, false, testOID )); REQUIRE_NOTHROW( ui->setUndefinedState( si, false, testOID ));
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->undefined == false ); REQUIRE( inf.undefined == false );
REQUIRE( inf->supplier == testOID ); REQUIRE( inf.supplier == testOID );
// depend // depend
si.id = 100; si.id = 100;
...@@ -330,14 +330,14 @@ TEST_CASE("UInterface::getSensorIOInfo", "[UInterface][getSensorIOInfo]") ...@@ -330,14 +330,14 @@ TEST_CASE("UInterface::getSensorIOInfo", "[UInterface][getSensorIOInfo]")
si.id = 101; si.id = 101;
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->blocked == true ); REQUIRE( inf.blocked == true );
REQUIRE( inf->depend_sid == 100 ); REQUIRE( inf.depend_sid == 100 );
si.id = 100; si.id = 100;
REQUIRE_NOTHROW( ui->setValue(si, 10, testOID) ); REQUIRE_NOTHROW( ui->setValue(si, 10, testOID) );
si.id = 101; si.id = 101;
inf = ui->getSensorIOInfo(si); inf = ui->getSensorIOInfo(si);
REQUIRE( inf->blocked == false ); REQUIRE( inf.blocked == false );
REQUIRE( inf->depend_sid == 100 ); REQUIRE( inf.depend_sid == 100 );
} }
...@@ -80,7 +80,7 @@ namespace uniset ...@@ -80,7 +80,7 @@ namespace uniset
IOController_i::SensorInfoSeq_var getSensorSeq( const uniset::IDList& lst ); IOController_i::SensorInfoSeq_var getSensorSeq( const uniset::IDList& lst );
//! Получение состояния информации о датчике //! Получение состояния информации о датчике
IOController_i::SensorIOInfo_var getSensorIOInfo( const IOController_i::SensorInfo& si ); IOController_i::SensorIOInfo getSensorIOInfo( const IOController_i::SensorInfo& si );
/*! Изменения состояния списка входов/выходов /*! Изменения состояния списка входов/выходов
\return Возвращает список не найденных идентификаторов */ \return Возвращает список не найденных идентификаторов */
......
...@@ -57,7 +57,7 @@ std::string uniset::Configuration::help() ...@@ -57,7 +57,7 @@ std::string uniset::Configuration::help()
{ {
ostringstream os; ostringstream os;
print_help(os, 25, "--confile", "Файл конфигурации. По умолчанию: configure.xml\n"); print_help(os, 25, "--confile", "Файл конфигурации. По умолчанию: configure.xml\n");
print_help(os, 25, "--uniport num", "использовать заданный порт (переопределяет 'port заданный в конф. файле в разделе <nodes><node.. port=''>)\n"); print_help(os, 25, "--uniset-port num", "использовать заданный порт (переопределяет 'port заданный в конф. файле в разделе <nodes><node.. port=''>)\n");
print_help(os, 25, "--localIOR {1,0}", "использовать локальные файлы для получения IOR (т.е. не использовать omniNames). Переопределяет параметр в конфигурационном файле.\n"); print_help(os, 25, "--localIOR {1,0}", "использовать локальные файлы для получения IOR (т.е. не использовать omniNames). Переопределяет параметр в конфигурационном файле.\n");
print_help(os, 25, "--transientIOR {1,0}", "использовать генерируемые IOR(не постоянные). Переопределяет параметр в конфигурационном файле. Default=0\n"); print_help(os, 25, "--transientIOR {1,0}", "использовать генерируемые IOR(не постоянные). Переопределяет параметр в конфигурационном файле. Default=0\n");
os << "\ndebug logs:\n"; os << "\ndebug logs:\n";
......
...@@ -2236,7 +2236,7 @@ namespace uniset ...@@ -2236,7 +2236,7 @@ namespace uniset
} }
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
IOController_i::SensorIOInfo_var UInterface::getSensorIOInfo( const IOController_i::SensorInfo& si ) IOController_i::SensorIOInfo UInterface::getSensorIOInfo( const IOController_i::SensorInfo& si )
{ {
if ( si.id == uniset::DefaultObjectId ) if ( si.id == uniset::DefaultObjectId )
throw uniset::ORepFailed("UI(getSensorIOInfo): error node=uniset::DefaultObjectId"); throw uniset::ORepFailed("UI(getSensorIOInfo): error node=uniset::DefaultObjectId");
......
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