Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
36bcf8dc
Commit
36bcf8dc
authored
Dec 23, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(UniversalInterface): исправил баг с вылавливанием исключений
"IOBadParam" не вылавливалось..
parent
d9869cf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
235 additions
and
107 deletions
+235
-107
libuniset.spec
conf/libuniset.spec
+4
-1
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+231
-106
No files found.
conf/libuniset.spec
View file @
36bcf8dc
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 1.0
Version: 1.0
Release: alt6
1
Release: alt6
2
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++
...
@@ -213,6 +213,9 @@ rm -f %buildroot%_libdir/*.la
...
@@ -213,6 +213,9 @@ rm -f %buildroot%_libdir/*.la
%changelog
%changelog
* Fri Dec 23 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt62
- fixed bug in UniversalInterface
* Fri Dec 23 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt61
* Fri Dec 23 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt61
- minor fixes in LogicProcessor
- minor fixes in LogicProcessor
...
...
src/Interfaces/UniversalInterface.cc
View file @
36bcf8dc
...
@@ -163,22 +163,27 @@ bool UniversalInterface::getState(ObjectId name, ObjectId node)
...
@@ -163,22 +163,27 @@ bool UniversalInterface::getState(ObjectId name, ObjectId node)
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(getState): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getState): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getState): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getState): ORepFailed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getState): ORepFailed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getState): method no implemented"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getState): method no implemented"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getState): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getState): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -256,23 +261,28 @@ long UniversalInterface::getValue(ObjectId name, ObjectId node)
...
@@ -256,23 +261,28 @@ long UniversalInterface::getValue(ObjectId name, ObjectId node)
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(getValue): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getValue): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getValue): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getValue): ORepFailed"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getValue): ORepFailed"
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getValue): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getValue): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getValue): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getValue): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -340,23 +350,28 @@ void UniversalInterface::setState(ObjectId name, bool state, ObjectId node)
...
@@ -340,23 +350,28 @@ void UniversalInterface::setState(ObjectId name, bool state, ObjectId node)
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
set_err
(
"UI(setState):"
+
string
(
ex
.
err
),
name
,
node
)
);
throw
UniSetTypes
::
NameNotFound
(
set_err
(
"UI(setState):"
+
string
(
ex
.
err
),
name
,
node
)
);
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(setState): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(setState): ORepFailed"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setState): ORepFailed"
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setState): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setState): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setState): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setState): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
)
catch
(
CORBA
::
COMM_FAILURE
)
{
{
...
@@ -441,6 +456,11 @@ void UniversalInterface::fastSetState( IOController_i::SensorInfo& si, bool stat
...
@@ -441,6 +456,11 @@ void UniversalInterface::fastSetState( IOController_i::SensorInfo& si, bool stat
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(fastSetState):"
+
string
(
ex
.
err
),
si
.
id
,
si
.
node
)
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(fastSetState):"
+
string
(
ex
.
err
),
si
.
id
,
si
.
node
)
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(fastSetState): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -511,6 +531,11 @@ void UniversalInterface::setUndefinedState( IOController_i::SensorInfo& si, bool
...
@@ -511,6 +531,11 @@ void UniversalInterface::setUndefinedState( IOController_i::SensorInfo& si, bool
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState):"
+
string
(
ex
.
err
),
si
.
id
,
si
.
node
)
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState):"
+
string
(
ex
.
err
),
si
.
id
,
si
.
node
)
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(setUndefinedState): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -581,23 +606,28 @@ void UniversalInterface::setValue(ObjectId name, long value, ObjectId node)
...
@@ -581,23 +606,28 @@ void UniversalInterface::setValue(ObjectId name, long value, ObjectId node)
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
set_err
(
"UI(setValue): NameNotFound для объекта"
,
name
,
node
));
throw
UniSetTypes
::
NameNotFound
(
set_err
(
"UI(setValue): NameNotFound для объекта"
,
name
,
node
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(setValue): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(setValue): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setValue): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setValue): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setValue): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setValue): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setValue): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -681,6 +711,11 @@ void UniversalInterface::fastSetValue( IOController_i::SensorInfo& si, long valu
...
@@ -681,6 +711,11 @@ void UniversalInterface::fastSetValue( IOController_i::SensorInfo& si, long valu
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(fastSetValue): NameNotFound для объекта"
,
si
.
id
,
si
.
node
)
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(fastSetValue): NameNotFound для объекта"
,
si
.
id
,
si
.
node
)
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(fastSetValue): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -740,7 +775,7 @@ void UniversalInterface::askRemoteState( ObjectId name, UniversalIO::UIOCommand
...
@@ -740,7 +775,7 @@ void UniversalInterface::askRemoteState( ObjectId name, UniversalIO::UIOCommand
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askRemoteState): Unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askRemoteState): Unknown back ID"
);
if
(
name
==
DefaultObjectId
)
if
(
name
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(askRemoteState): id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(askRemoteState): id=UniSetTypes::DefaultObjectId"
);
...
@@ -783,23 +818,28 @@ void UniversalInterface::askRemoteState( ObjectId name, UniversalIO::UIOCommand
...
@@ -783,23 +818,28 @@ void UniversalInterface::askRemoteState( ObjectId name, UniversalIO::UIOCommand
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(askState): "
+
string
(
ex
.
err
)
);
throw
UniSetTypes
::
NameNotFound
(
"UI(askState): "
+
string
(
ex
.
err
)
);
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askState): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(askState): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askState): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askState): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askState): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askState): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askState): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -835,7 +875,7 @@ void UniversalInterface::askRemoteSensor( ObjectId name, UniversalIO::UIOCommand
...
@@ -835,7 +875,7 @@ void UniversalInterface::askRemoteSensor( ObjectId name, UniversalIO::UIOCommand
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askRemoteSensor): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askRemoteSensor): unknown back ID"
);
if
(
name
==
DefaultObjectId
)
if
(
name
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(askRemoteSensor): id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(askRemoteSensor): id=UniSetTypes::DefaultObjectId"
);
...
@@ -878,23 +918,28 @@ void UniversalInterface::askRemoteSensor( ObjectId name, UniversalIO::UIOCommand
...
@@ -878,23 +918,28 @@ void UniversalInterface::askRemoteSensor( ObjectId name, UniversalIO::UIOCommand
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(askSensor): "
+
string
(
ex
.
err
)
);
throw
UniSetTypes
::
NameNotFound
(
"UI(askSensor): "
+
string
(
ex
.
err
)
);
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askSensor): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(askSensor): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensor): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askSensor): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensor): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askSensor): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensor): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -946,7 +991,7 @@ void UniversalInterface::askRemoteValue( ObjectId sensid, UniversalIO::UIOComman
...
@@ -946,7 +991,7 @@ void UniversalInterface::askRemoteValue( ObjectId sensid, UniversalIO::UIOComman
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askRemoteValue): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askRemoteValue): unknown back ID"
);
if
(
sensid
==
DefaultObjectId
)
if
(
sensid
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(askRemoteValue): id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(askRemoteValue): id=UniSetTypes::DefaultObjectId"
);
...
@@ -990,22 +1035,27 @@ void UniversalInterface::askRemoteValue( ObjectId sensid, UniversalIO::UIOComman
...
@@ -990,22 +1035,27 @@ void UniversalInterface::askRemoteValue( ObjectId sensid, UniversalIO::UIOComman
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
NameNotFound
(
"UI(askValue): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(askValue): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
sensid
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askValue): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askValue): resolve failed "
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askValue): resolve failed "
,
sensid
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askValue): method no implement"
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askValue): method no implement"
,
sensid
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askValue): object not exist"
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askValue): object not exist"
,
sensid
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1042,7 +1092,7 @@ void UniversalInterface::askRemoteOutput( ObjectId sensid, UniversalIO::UIOComma
...
@@ -1042,7 +1092,7 @@ void UniversalInterface::askRemoteOutput( ObjectId sensid, UniversalIO::UIOComma
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askRemoteOutput): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askRemoteOutput): unknown back ID"
);
if
(
sensid
==
DefaultObjectId
)
if
(
sensid
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(askRemoteOutput): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(askRemoteOutput): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
@@ -1086,22 +1136,27 @@ void UniversalInterface::askRemoteOutput( ObjectId sensid, UniversalIO::UIOComma
...
@@ -1086,22 +1136,27 @@ void UniversalInterface::askRemoteOutput( ObjectId sensid, UniversalIO::UIOComma
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
NameNotFound
(
"UI(askOutput): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(askOutput): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
sensid
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askOutput): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askOutput): resolve failed "
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askOutput): resolve failed "
,
sensid
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askOutput): method no implement"
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askOutput): method no implement"
,
sensid
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
sensid
,
node
);
rcache
.
erase
(
sensid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askOutput): object not exist"
,
sensid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askOutput): object not exist"
,
sensid
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1139,7 +1194,7 @@ void UniversalInterface::askTimer( UniSetTypes::TimerId timerid, CORBA::Long tim
...
@@ -1139,7 +1194,7 @@ void UniversalInterface::askTimer( UniSetTypes::TimerId timerid, CORBA::Long tim
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askTimer): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askTimer): unknown back ID"
);
try
try
{
{
...
@@ -1201,17 +1256,17 @@ void UniversalInterface::askTimer( UniSetTypes::TimerId timerid, CORBA::Long tim
...
@@ -1201,17 +1256,17 @@ void UniversalInterface::askTimer( UniSetTypes::TimerId timerid, CORBA::Long tim
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askTimer): resolve failed "
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askTimer): resolve failed "
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askTimer): method no implement"
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askTimer): method no implement"
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getTimerService
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askTimer): object not exist"
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askTimer): object not exist"
,
uconf
->
getTimerService
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1241,7 +1296,7 @@ void UniversalInterface::askMessage( UniSetTypes::MessageCode mid, UniversalIO::
...
@@ -1241,7 +1296,7 @@ void UniversalInterface::askMessage( UniSetTypes::MessageCode mid, UniversalIO::
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askMessage): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askMessage): unknown back ID"
);
try
try
{
{
...
@@ -1280,22 +1335,22 @@ void UniversalInterface::askMessage( UniSetTypes::MessageCode mid, UniversalIO::
...
@@ -1280,22 +1335,22 @@ void UniversalInterface::askMessage( UniSetTypes::MessageCode mid, UniversalIO::
ostringstream
err
;
ostringstream
err
;
err
<<
"UI(askMessage): неизвестный код сообщения "
<<
ex
.
bad_code
;
err
<<
"UI(askMessage): неизвестный код сообщения "
<<
ex
.
bad_code
;
// unideb[Debug::WARN] << err.str() << endl;
// unideb[Debug::WARN] << err.str() << endl;
throw
NameNotFound
(
err
.
str
());
throw
UniSetTypes
::
NameNotFound
(
err
.
str
());
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(askMessage): resolve failed "
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessage): resolve failed "
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askMessage): method no implement"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessage): method no implement"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askMessage): object not exist"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessage): object not exist"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1326,7 +1381,7 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
...
@@ -1326,7 +1381,7 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"Ul(askMessageRange): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"Ul(askMessageRange): unknown back ID"
);
try
try
{
{
...
@@ -1365,7 +1420,7 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
...
@@ -1365,7 +1420,7 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
ostringstream
err
;
ostringstream
err
;
err
<<
"UI(askMessage): неизвестный код сообщения "
<<
ex
.
bad_code
;
err
<<
"UI(askMessage): неизвестный код сообщения "
<<
ex
.
bad_code
;
// unideb[Debug::WARN] << err.str() << endl;
// unideb[Debug::WARN] << err.str() << endl;
throw
NameNotFound
(
err
.
str
());
throw
UniSetTypes
::
NameNotFound
(
err
.
str
());
}
}
catch
(
InfoServer_i
::
MsgBadRange
)
catch
(
InfoServer_i
::
MsgBadRange
)
{
{
...
@@ -1376,17 +1431,17 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
...
@@ -1376,17 +1431,17 @@ void UniversalInterface::askMessageRange( UniSetTypes::MessageCode from, UniSetT
{
{
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(askMessageRange): resolve failed "
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessageRange): resolve failed "
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askMessageRange): method no implement"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessageRange): method no implement"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
rcache
.
erase
(
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askMessageRange): object not exist"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askMessageRange): object not exist"
,
uconf
->
getInfoServer
(),
uconf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1445,23 +1500,28 @@ IOTypes UniversalInterface::getIOType(ObjectId name, ObjectId node)
...
@@ -1445,23 +1500,28 @@ IOTypes UniversalInterface::getIOType(ObjectId name, ObjectId node)
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(getIOType): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getIOType): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getIOType): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getIOType): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getIOType): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getIOType): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getIOType): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getIOType): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getIOType): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1523,17 +1583,17 @@ ObjectType UniversalInterface::getType(ObjectId name, ObjectId node)
...
@@ -1523,17 +1583,17 @@ ObjectType UniversalInterface::getType(ObjectId name, ObjectId node)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getType): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getType): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getType): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getType): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getType): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getType): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1809,17 +1869,17 @@ void UniversalInterface::send( ObjectId name, TransportMessage& msg, ObjectId no
...
@@ -1809,17 +1869,17 @@ void UniversalInterface::send( ObjectId name, TransportMessage& msg, ObjectId no
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(send): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(send): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(send): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(send): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(send): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(send): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1888,22 +1948,27 @@ bool UniversalInterface::saveValue(ObjectId name, long value, IOTypes type, Obje
...
@@ -1888,22 +1948,27 @@ bool UniversalInterface::saveValue(ObjectId name, long value, IOTypes type, Obje
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(saveValue): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(saveValue): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(saveValue): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveValue): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveValue): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveValue): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveValue): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveValue): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveValue): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -1989,6 +2054,11 @@ void UniversalInterface::fastSaveValue( IOController_i::SensorInfo& si, long val
...
@@ -1989,6 +2054,11 @@ void UniversalInterface::fastSaveValue( IOController_i::SensorInfo& si, long val
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
"UI(saveValue): "
<<
ex
.
err
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
"UI(saveValue): "
<<
ex
.
err
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(saveValue): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -2066,22 +2136,27 @@ bool UniversalInterface::saveState(ObjectId name, bool state, IOTypes type, Obje
...
@@ -2066,22 +2136,27 @@ bool UniversalInterface::saveState(ObjectId name, bool state, IOTypes type, Obje
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
"UI(saveState): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(saveState): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(saveState): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveState): resolve failed "
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveState): resolve failed "
,
name
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveState): method no implement"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveState): method no implement"
,
name
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(saveState): object not exist"
,
name
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(saveState): object not exist"
,
name
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
)
catch
(
CORBA
::
COMM_FAILURE
)
{
{
...
@@ -2167,6 +2242,11 @@ void UniversalInterface::fastSaveState( IOController_i::SensorInfo& si, bool sta
...
@@ -2167,6 +2242,11 @@ void UniversalInterface::fastSaveState( IOController_i::SensorInfo& si, bool sta
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
"UI(fastSaveState): "
<<
ex
.
err
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
"UI(fastSaveState): "
<<
ex
.
err
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(fastSaveState): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -2240,6 +2320,11 @@ IOController_i::ShortIOInfo UniversalInterface::getChangedTime( UniSetTypes::Obj
...
@@ -2240,6 +2320,11 @@ IOController_i::ShortIOInfo UniversalInterface::getChangedTime( UniSetTypes::Obj
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
"UI(getChangedTime): "
<<
ex
.
err
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
"UI(getChangedTime): "
<<
ex
.
err
<<
endl
;
}
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getChangedTime): "
+
string
(
ex
.
err
));
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
...
@@ -2278,11 +2363,11 @@ ObjectPtr UniversalInterface::CacheOfResolve::resolve( ObjectId id, ObjectId nod
...
@@ -2278,11 +2363,11 @@ ObjectPtr UniversalInterface::CacheOfResolve::resolve( ObjectId id, ObjectId nod
UniSetTypes
::
uniset_mutex_lock
l
(
cmutex
,
200
);
UniSetTypes
::
uniset_mutex_lock
l
(
cmutex
,
200
);
//#warning Временно отключён кэш
//#warning Временно отключён кэш
// throw NameNotFound();
// throw
UniSetTypes::
NameNotFound();
CacheMap
::
iterator
it
=
mcache
.
find
(
key
(
id
,
node
)
);
CacheMap
::
iterator
it
=
mcache
.
find
(
key
(
id
,
node
)
);
if
(
it
==
mcache
.
end
()
)
if
(
it
==
mcache
.
end
()
)
throw
NameNotFound
();
throw
UniSetTypes
::
NameNotFound
();
it
->
second
.
timestamp
=
time
(
NULL
);
// фиксируем время последнего обращения
it
->
second
.
timestamp
=
time
(
NULL
);
// фиксируем время последнего обращения
...
@@ -2293,7 +2378,7 @@ ObjectPtr UniversalInterface::CacheOfResolve::resolve( ObjectId id, ObjectId nod
...
@@ -2293,7 +2378,7 @@ ObjectPtr UniversalInterface::CacheOfResolve::resolve( ObjectId id, ObjectId nod
if
(
!
CORBA
::
is_nil
(
it
->
second
.
ptr
)
)
if
(
!
CORBA
::
is_nil
(
it
->
second
.
ptr
)
)
return
CORBA
::
Object
::
_duplicate
(
it
->
second
.
ptr
);
return
CORBA
::
Object
::
_duplicate
(
it
->
second
.
ptr
);
throw
NameNotFound
();
throw
UniSetTypes
::
NameNotFound
();
}
}
// ------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------
void
UniversalInterface
::
CacheOfResolve
::
cache
(
ObjectId
id
,
ObjectId
node
,
ObjectVar
ptr
)
void
UniversalInterface
::
CacheOfResolve
::
cache
(
ObjectId
id
,
ObjectId
node
,
ObjectVar
ptr
)
...
@@ -2494,7 +2579,7 @@ void UniversalInterface::askRemoteThreshold( UniSetTypes::ObjectId sid, UniSetTy
...
@@ -2494,7 +2579,7 @@ void UniversalInterface::askRemoteThreshold( UniSetTypes::ObjectId sid, UniSetTy
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askRemoteThreshold): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askRemoteThreshold): unknown back ID"
);
if
(
sid
==
DefaultObjectId
)
if
(
sid
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(askRemoteThreshold): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(askRemoteThreshold): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
@@ -2538,22 +2623,27 @@ void UniversalInterface::askRemoteThreshold( UniSetTypes::ObjectId sid, UniSetTy
...
@@ -2538,22 +2623,27 @@ void UniversalInterface::askRemoteThreshold( UniSetTypes::ObjectId sid, UniSetTy
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
sid
,
node
);
rcache
.
erase
(
sid
,
node
);
throw
NameNotFound
(
"UI(askThreshold): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(askThreshold): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
sid
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askThreshold): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
sid
,
node
);
rcache
.
erase
(
sid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askThreshold): resolve failed "
,
sid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askThreshold): resolve failed "
,
sid
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
sid
,
node
);
rcache
.
erase
(
sid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askThreshold): method no implement"
,
sid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askThreshold): method no implement"
,
sid
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
sid
,
node
);
rcache
.
erase
(
sid
,
node
);
throw
IOBadParam
(
set_err
(
"UI(askThreshold): object not exist"
,
sid
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askThreshold): object not exist"
,
sid
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2605,23 +2695,28 @@ CORBA::Long UniversalInterface::getRawValue( const IOController_i::SensorInfo& s
...
@@ -2605,23 +2695,28 @@ CORBA::Long UniversalInterface::getRawValue( const IOController_i::SensorInfo& s
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
NameNotFound
(
"UI(getRawValue): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getRawValue): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getRawValue): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getRawValue): resolve failed "
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getRawValue): resolve failed "
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(getRawValue): method no implement"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getRawValue): method no implement"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(getRawValue): object not exist"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getRawValue): object not exist"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2644,7 +2739,7 @@ void UniversalInterface::calibrate(const IOController_i::SensorInfo& si,
...
@@ -2644,7 +2739,7 @@ void UniversalInterface::calibrate(const IOController_i::SensorInfo& si,
admId
=
myid
;
admId
=
myid
;
// if( admId==UniSetTypes::DefaultObjectId )
// if( admId==UniSetTypes::DefaultObjectId )
// throw IOBadParam("UI(askTreshold): неизвестен ID администратора");
// throw
UniSetTypes::
IOBadParam("UI(askTreshold): неизвестен ID администратора");
if
(
si
.
id
==
DefaultObjectId
)
if
(
si
.
id
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(calibrate): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(calibrate): попытка обратиться к объекту с id=UniSetTypes::DefaultObjectId"
);
...
@@ -2680,23 +2775,28 @@ void UniversalInterface::calibrate(const IOController_i::SensorInfo& si,
...
@@ -2680,23 +2775,28 @@ void UniversalInterface::calibrate(const IOController_i::SensorInfo& si,
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
NameNotFound
(
"UI(calibrate): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(calibrate): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(calibrate): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(calibrate): resolve failed "
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(calibrate): resolve failed "
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(calibrate): method no implement"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(calibrate): method no implement"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(calibrate): object not exist"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(calibrate): object not exist"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2746,23 +2846,28 @@ IOController_i::CalibrateInfo UniversalInterface::getCalibrateInfo( const IOCont
...
@@ -2746,23 +2846,28 @@ IOController_i::CalibrateInfo UniversalInterface::getCalibrateInfo( const IOCont
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
NameNotFound
(
"UI(getCalibrateInfo): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getCalibrateInfo): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getCalibrateInfo): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): resolve failed "
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): resolve failed "
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): method no implement"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): method no implement"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): object not exist"
,
si
.
id
,
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getCalibrateInfo): object not exist"
,
si
.
id
,
si
.
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2819,23 +2924,28 @@ IOController_i::ASensorInfoSeq_var UniversalInterface::getSensorSeq( UniSetTypes
...
@@ -2819,23 +2924,28 @@ IOController_i::ASensorInfoSeq_var UniversalInterface::getSensorSeq( UniSetTypes
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
NameNotFound
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
UniSetTypes
::
IOBadParam
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getSensorSeq): resolve failed "
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensorSeq): resolve failed "
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(getSensorSeq): method no implement"
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensorSeq): method no implement"
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(getSensorSeq): object not exist"
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensorSeq): object not exist"
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2890,23 +3000,28 @@ IDSeq_var UniversalInterface::setOutputSeq( const IOController_i::OutSeq& lst, U
...
@@ -2890,23 +3000,28 @@ IDSeq_var UniversalInterface::setOutputSeq( const IOController_i::OutSeq& lst, U
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
throw
NameNotFound
(
"UI(setOutputSeq): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(setOutputSeq): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(setOutputSeq): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(setOutputSeq): resolve failed "
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setOutputSeq): resolve failed "
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(setOutputSeq): method no implement"
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setOutputSeq): method no implement"
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
rcache
.
erase
(
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
);
throw
IOBadParam
(
set_err
(
"UI(setOutputSeq): object not exist"
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(setOutputSeq): object not exist"
,
lst
[
0
].
si
.
id
,
lst
[
0
].
si
.
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -2931,7 +3046,7 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
...
@@ -2931,7 +3046,7 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
backid
=
myid
;
backid
=
myid
;
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
if
(
backid
==
UniSetTypes
::
DefaultObjectId
)
throw
IOBadParam
(
"UI(askSensorSeq): unknown back ID"
);
throw
UniSetTypes
::
IOBadParam
(
"UI(askSensorSeq): unknown back ID"
);
ObjectId
sid
=
lst
.
getFirst
();
ObjectId
sid
=
lst
.
getFirst
();
...
@@ -2974,23 +3089,28 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
...
@@ -2974,23 +3089,28 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
NameNotFound
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
UniSetTypes
::
IOBadParam
(
"UI(getSensorSeq): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(askSensorSeq): resolve failed "
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensorSeq): resolve failed "
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askSensorSeq): method no implement"
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensorSeq): method no implement"
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
rcache
.
erase
(
sid
,
conf
->
getLocalNode
());
throw
IOBadParam
(
set_err
(
"UI(askSensorSeq): object not exist"
,
sid
,
conf
->
getLocalNode
()));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(askSensorSeq): object not exist"
,
sid
,
conf
->
getLocalNode
()));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
@@ -3037,23 +3157,28 @@ IOController_i::ShortMapSeq* UniversalInterface::getSensors( UniSetTypes::Object
...
@@ -3037,23 +3157,28 @@ IOController_i::ShortMapSeq* UniversalInterface::getSensors( UniSetTypes::Object
catch
(
IOController_i
::
NameNotFound
&
ex
)
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
{
rcache
.
erase
(
id
,
node
);
rcache
.
erase
(
id
,
node
);
throw
NameNotFound
(
"UI(getSensors): "
+
string
(
ex
.
err
));
throw
UniSetTypes
::
NameNotFound
(
"UI(getSensors): "
+
string
(
ex
.
err
));
}
catch
(
IOController_i
::
IOBadParam
&
ex
)
{
rcache
.
erase
(
id
,
node
);
throw
UniSetTypes
::
IOBadParam
(
"UI(getSensors): "
+
string
(
ex
.
err
));
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
rcache
.
erase
(
id
,
node
);
rcache
.
erase
(
id
,
node
);
// не смогли получить ссылку на объект
// не смогли получить ссылку на объект
throw
IOBadParam
(
set_err
(
"UI(getSensors): resolve failed "
,
id
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensors): resolve failed "
,
id
,
node
));
}
}
catch
(
CORBA
::
NO_IMPLEMENT
)
catch
(
CORBA
::
NO_IMPLEMENT
)
{
{
rcache
.
erase
(
id
,
node
);
rcache
.
erase
(
id
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getSensors): method no implement"
,
id
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensors): method no implement"
,
id
,
node
));
}
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
{
rcache
.
erase
(
id
,
node
);
rcache
.
erase
(
id
,
node
);
throw
IOBadParam
(
set_err
(
"UI(getSensors): object not exist"
,
id
,
node
));
throw
UniSetTypes
::
IOBadParam
(
set_err
(
"UI(getSensors): object not exist"
,
id
,
node
));
}
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment