Commit 26590d30 authored by Pavel Vainerman's avatar Pavel Vainerman

(IOController): убрал функцию "не надёжной доставки сообщений" fastSetValue.

parent 4f790675
......@@ -68,9 +68,6 @@ interface IOController_i : UniSetManager_i
void setUndefinedState(in UniSetTypes::ObjectId sid, in boolean undefined, in UniSetTypes::ObjectId sup_id )
raises(NameNotFound);
// fast version (не вырабатывает исключения)
oneway void fastSetValue(in UniSetTypes::ObjectId sid, in long value, in UniSetTypes::ObjectId sup_id);
UniversalIO::IOType getIOType(in UniSetTypes::ObjectId sid) raises(NameNotFound);
// --- Интерфейс для конфигурирования ---
......
......@@ -507,7 +507,7 @@ UniSetTypes::SimpleInfo* <xsl:value-of select="$CLASSNAME"/>_SK::getInfo( CORBA:
if( logserv /* &amp;&amp; userparam &lt; 0 */ )
{
inf &lt;&lt; "LogServer: " &lt;&lt; logserv_host &lt;&lt; ":" &lt;&lt; logserv_port
&lt;&lt; ( logserv->isRunning() ? " [RUNNIG]" : " [FAILED]" ) &lt;&lt; endl;
&lt;&lt; ( logserv->isRunning() ? " [RUNNIG]" : " [STOPPED]" ) &lt;&lt; endl;
inf &lt;&lt; " " &lt;&lt; logserv->getShortInfo() &lt;&lt; endl;
}
......@@ -549,7 +549,7 @@ nlohmann::json <xsl:value-of select="$CLASSNAME"/>_SK::httpGet( const Poco::URI:
jdata["LogServer"] = {
{"host",logserv_host},
{"port",logserv_port},
{"state",( logserv->isRunning() ? "RUNNIG" : "FAILED" )}
{"state",( logserv->isRunning() ? "RUNNIG" : "STOPPED" )}
};
// logserv->getShortInfo()
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -117,7 +117,7 @@ using namespace UniSetTypes;
if( ic )
{
BEG_FUNC1(SMInterface::setValue)
ic->fastSetValue(id, value, myid);
ic->setValue(id, value, myid);
return;
END_FUNC(SMInterface::setValue)
}
......
......@@ -57,9 +57,6 @@ class IOController:
virtual void setValue( UniSetTypes::ObjectId sid, CORBA::Long value,
UniSetTypes::ObjectId sup_id = UniSetTypes::DefaultObjectId ) override;
virtual void fastSetValue( UniSetTypes::ObjectId sid, CORBA::Long value,
UniSetTypes::ObjectId sup_id = UniSetTypes::DefaultObjectId ) override;
// ----------------------------------------------------------------
virtual void setUndefinedState( UniSetTypes::ObjectId sid,
CORBA::Boolean undefined,
......
......@@ -413,7 +413,7 @@ void UInterface::fastSetValue( const IOController_i::SensorInfo& si, long value,
oref = resolve( si.id, si.node );
IOController_i_var iom = IOController_i::_narrow(oref);
iom->fastSetValue(si.id, value, sup_id);
iom->setValue(si.id, value, sup_id);
return;
}
catch( const CORBA::TRANSIENT& ) {}
......
......@@ -242,16 +242,6 @@ void IOController::localSetUndefinedState( IOStateList::iterator& li,
catch(...) {}
}
// ------------------------------------------------------------------------------------------
void IOController::fastSetValue( UniSetTypes::ObjectId sid, CORBA::Long value, UniSetTypes::ObjectId sup_id )
{
try
{
auto li = ioList.end();
localSetValueIt( li, sid, value, sup_id );
}
catch(...) {}
}
// ------------------------------------------------------------------------------------------
void IOController::setValue( UniSetTypes::ObjectId sid, CORBA::Long value, UniSetTypes::ObjectId sup_id )
{
auto li = ioList.end();
......@@ -320,9 +310,16 @@ long IOController::localSetValue( std::shared_ptr<USensorInfo>& usi,
retValue = usi->value;
// запоминаем время изменения
struct timespec tm = UniSetTypes::now_to_timespec();
usi->tv_sec = tm.tv_sec;
usi->tv_nsec = tm.tv_nsec;
try
{
struct timespec tm = UniSetTypes::now_to_timespec();
usi->tv_sec = tm.tv_sec;
usi->tv_nsec = tm.tv_nsec;
}
catch( std::exception& ex )
{
ucrit << myname << "(localSetValue): setValue (" << usi->si.id << ") ERROR: " << ex.what() << endl;
}
}
} // unlock
......
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