Commit b3cd6d5f authored by Pavel Vaynerman's avatar Pavel Vaynerman

minor fixes..

parent 1473a804
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Name: uniset Name: uniset
Version: 0.96 Version: 0.96
Release: eter26 Release: eter28
Summary: UniSet Summary: UniSet
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
......
...@@ -275,8 +275,11 @@ class UniversalInterface ...@@ -275,8 +275,11 @@ class UniversalInterface
bool info( UniSetTypes::InfoMessage& msg, UniSetTypes::ObjectId messenger); bool info( UniSetTypes::InfoMessage& msg, UniSetTypes::ObjectId messenger);
bool alarm( UniSetTypes::AlarmMessage& msg, UniSetTypes::ObjectId messenger); bool alarm( UniSetTypes::AlarmMessage& msg, UniSetTypes::ObjectId messenger);
bool waitReady( UniSetTypes::ObjectId id, int msec, int pause=5000 ); // used exist bool waitReady( UniSetTypes::ObjectId id, int msec, int pause=5000,
bool waitWorking( UniSetTypes::ObjectId id, int msec, int pause=3000 ); // used getState UniSetTypes::ObjectId node = UniSetTypes::conf->getLocalNode() ); // used exist
bool waitWorking( UniSetTypes::ObjectId id, int msec, int pause=3000,
UniSetTypes::ObjectId node = UniSetTypes::conf->getLocalNode() ); // used getState
inline void setCacheMaxSize( unsigned int newsize) inline void setCacheMaxSize( unsigned int newsize)
{ {
......
...@@ -2913,7 +2913,7 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l ...@@ -2913,7 +2913,7 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
throw UniSetTypes::TimeOut(set_err("UI(askSensorSeq): TimeOut ",sid,conf->getLocalNode())); throw UniSetTypes::TimeOut(set_err("UI(askSensorSeq): TimeOut ",sid,conf->getLocalNode()));
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmsec ) bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmsec, ObjectId node )
{ {
PassiveTimer ptReady(msec); PassiveTimer ptReady(msec);
bool ready = false; bool ready = false;
...@@ -2921,7 +2921,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse ...@@ -2921,7 +2921,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse
{ {
try try
{ {
ready = isExist(id); ready = isExist(id,node);
if( ready ) if( ready )
break; break;
} }
...@@ -2933,7 +2933,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse ...@@ -2933,7 +2933,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse
return ready; return ready;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
bool UniversalInterface::waitWorking( UniSetTypes::ObjectId id, int msec, int pmsec ) bool UniversalInterface::waitWorking( UniSetTypes::ObjectId id, int msec, int pmsec, ObjectId node )
{ {
PassiveTimer ptReady(msec); PassiveTimer ptReady(msec);
bool ready = false; bool ready = false;
...@@ -2942,7 +2942,7 @@ bool UniversalInterface::waitWorking( UniSetTypes::ObjectId id, int msec, int pm ...@@ -2942,7 +2942,7 @@ bool UniversalInterface::waitWorking( UniSetTypes::ObjectId id, int msec, int pm
{ {
try try
{ {
getState(id); getState(id,node);
ready = true; ready = true;
break; break;
} }
......
...@@ -892,26 +892,41 @@ string Configuration::getPort() ...@@ -892,26 +892,41 @@ string Configuration::getPort()
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ObjectId Configuration::getSensorID( const std::string name ) ObjectId Configuration::getSensorID( const std::string name )
{ {
if( name.empty() )
return DefaultObjectId;
return oind->getIdByName(conf->getSensorsSection()+"/"+name); return oind->getIdByName(conf->getSensorsSection()+"/"+name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ObjectId Configuration::getControllerID( const std::string name ) ObjectId Configuration::getControllerID( const std::string name )
{ {
if( name.empty() )
return DefaultObjectId;
return oind->getIdByName(conf->getControllersSection()+"/"+name); return oind->getIdByName(conf->getControllersSection()+"/"+name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ObjectId Configuration::getObjectID( const std::string name ) ObjectId Configuration::getObjectID( const std::string name )
{ {
if( name.empty() )
return DefaultObjectId;
return oind->getIdByName(conf->getObjectsSection()+"/"+name); return oind->getIdByName(conf->getObjectsSection()+"/"+name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ObjectId Configuration::getServiceID( const std::string name ) ObjectId Configuration::getServiceID( const std::string name )
{ {
if( name.empty() )
return DefaultObjectId;
return oind->getIdByName(conf->getServicesSection()+"/"+name); return oind->getIdByName(conf->getServicesSection()+"/"+name);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
UniSetTypes::ObjectId Configuration::getNodeID( const std::string name, std::string alias ) UniSetTypes::ObjectId Configuration::getNodeID( const std::string name, std::string alias )
{ {
if( name.empty() )
return DefaultObjectId;
if( alias.empty() ) if( alias.empty() )
alias = name; alias = name;
// return oind->getNodeId( oind->mkFullNodeName(name,alias) ); // return oind->getNodeId( oind->mkFullNodeName(name,alias) );
......
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