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
b3cd6d5f
Commit
b3cd6d5f
authored
Jun 20, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes..
parent
1473a804
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
22 deletions
+40
-22
uniset.spec
conf/uniset.spec
+1
-1
UniversalInterface.h
include/UniversalInterface.h
+5
-2
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+19
-19
Configuration.cc
src/Various/Configuration.cc
+15
-0
No files found.
conf/uniset.spec
View file @
b3cd6d5f
...
...
@@ -2,7 +2,7 @@
Name: uniset
Version: 0.96
Release: eter2
6
Release: eter2
8
Summary: UniSet
License: GPL
Group: Development/C++
...
...
include/UniversalInterface.h
View file @
b3cd6d5f
...
...
@@ -275,8 +275,11 @@ class UniversalInterface
bool
info
(
UniSetTypes
::
InfoMessage
&
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
waitWorking
(
UniSetTypes
::
ObjectId
id
,
int
msec
,
int
pause
=
3000
);
// used getState
bool
waitReady
(
UniSetTypes
::
ObjectId
id
,
int
msec
,
int
pause
=
5000
,
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
)
{
...
...
src/Interfaces/UniversalInterface.cc
View file @
b3cd6d5f
...
...
@@ -503,8 +503,8 @@ void UniversalInterface::setUndefinedState( IOController_i::SensorInfo& si, bool
catch
(
CORBA
::
TRANSIENT
){}
catch
(
CORBA
::
OBJECT_NOT_EXIST
){}
catch
(
CORBA
::
SystemException
&
ex
){}
msleep
(
uconf
->
getRepeatTimeout
());
oref
=
CORBA
::
Object
::
_nil
();
msleep
(
uconf
->
getRepeatTimeout
());
oref
=
CORBA
::
Object
::
_nil
();
}
}
catch
(
UniSetTypes
::
TimeOut
){}
...
...
@@ -515,25 +515,25 @@ void UniversalInterface::setUndefinedState( IOController_i::SensorInfo& si, bool
}
catch
(
ORepFailed
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
//
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState): "
,
si
.
id
,
si
.
node
)
<<
endl
;
}
catch
(
CORBA
::
NO_IMPLEMENT
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState): "
,
si
.
id
,
si
.
node
)
<<
endl
;
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState): "
,
si
.
id
,
si
.
node
)
<<
endl
;
}
catch
(
CORBA
::
COMM_FAILURE
){}
catch
(
CORBA
::
SystemException
&
ex
){}
catch
(...){}
catch
(...){}
rcache
.
erase
(
si
.
id
,
si
.
node
);
rcache
.
erase
(
si
.
id
,
si
.
node
);
unideb
[
Debug
::
WARN
]
<<
set_err
(
"UI(setUndefinedState): TimeOut "
,
si
.
id
,
si
.
node
)
<<
endl
;
}
// ------------------------------------------------------------------------------------------------------------
...
...
@@ -575,30 +575,30 @@ void UniversalInterface::setValue(ObjectId name, long value, ObjectId node)
catch
(
CORBA
::
TRANSIENT
){}
catch
(
CORBA
::
OBJECT_NOT_EXIST
){}
catch
(
CORBA
::
SystemException
&
ex
){}
msleep
(
uconf
->
getRepeatTimeout
());
oref
=
CORBA
::
Object
::
_nil
();
msleep
(
uconf
->
getRepeatTimeout
());
oref
=
CORBA
::
Object
::
_nil
();
}
}
catch
(
UniSetTypes
::
TimeOut
){}
catch
(
IOController_i
::
NameNotFound
&
ex
)
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
NameNotFound
(
set_err
(
"UI(setValue): NameNotFound "
,
name
,
node
));
}
catch
(
ORepFailed
)
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
//
throw
IOBadParam
(
set_err
(
"UI(setValue): "
,
name
,
node
));
}
catch
(
CORBA
::
NO_IMPLEMENT
)
{
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setValue): "
,
name
,
node
));
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setValue): "
,
name
,
node
));
}
catch
(
CORBA
::
OBJECT_NOT_EXIST
)
{
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
IOBadParam
(
set_err
(
"UI(setValue): "
,
name
,
node
));
}
catch
(
CORBA
::
COMM_FAILURE
&
ex
)
...
...
@@ -610,7 +610,7 @@ void UniversalInterface::setValue(ObjectId name, long value, ObjectId node)
//
// unideb[Debug::WARN] << "UI(setValue): CORBA::SystemException" << endl;
}
rcache
.
erase
(
name
,
node
);
rcache
.
erase
(
name
,
node
);
throw
UniSetTypes
::
TimeOut
(
set_err
(
"UI(setValue): TimeOut "
,
name
,
node
));
}
...
...
@@ -2913,7 +2913,7 @@ UniSetTypes::IDSeq_var UniversalInterface::askSensorsSeq( UniSetTypes::IDList& l
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
);
bool
ready
=
false
;
...
...
@@ -2921,7 +2921,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse
{
try
{
ready
=
isExist
(
id
);
ready
=
isExist
(
id
,
node
);
if
(
ready
)
break
;
}
...
...
@@ -2933,7 +2933,7 @@ bool UniversalInterface::waitReady( UniSetTypes::ObjectId id, int msec, int pmse
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
);
bool
ready
=
false
;
...
...
@@ -2942,7 +2942,7 @@ bool UniversalInterface::waitWorking( UniSetTypes::ObjectId id, int msec, int pm
{
try
{
getState
(
id
);
getState
(
id
,
node
);
ready
=
true
;
break
;
}
...
...
src/Various/Configuration.cc
View file @
b3cd6d5f
...
...
@@ -892,26 +892,41 @@ string Configuration::getPort()
// -------------------------------------------------------------------------
ObjectId
Configuration
::
getSensorID
(
const
std
::
string
name
)
{
if
(
name
.
empty
()
)
return
DefaultObjectId
;
return
oind
->
getIdByName
(
conf
->
getSensorsSection
()
+
"/"
+
name
);
}
// -------------------------------------------------------------------------
ObjectId
Configuration
::
getControllerID
(
const
std
::
string
name
)
{
if
(
name
.
empty
()
)
return
DefaultObjectId
;
return
oind
->
getIdByName
(
conf
->
getControllersSection
()
+
"/"
+
name
);
}
// -------------------------------------------------------------------------
ObjectId
Configuration
::
getObjectID
(
const
std
::
string
name
)
{
if
(
name
.
empty
()
)
return
DefaultObjectId
;
return
oind
->
getIdByName
(
conf
->
getObjectsSection
()
+
"/"
+
name
);
}
// -------------------------------------------------------------------------
ObjectId
Configuration
::
getServiceID
(
const
std
::
string
name
)
{
if
(
name
.
empty
()
)
return
DefaultObjectId
;
return
oind
->
getIdByName
(
conf
->
getServicesSection
()
+
"/"
+
name
);
}
// -------------------------------------------------------------------------
UniSetTypes
::
ObjectId
Configuration
::
getNodeID
(
const
std
::
string
name
,
std
::
string
alias
)
{
if
(
name
.
empty
()
)
return
DefaultObjectId
;
if
(
alias
.
empty
()
)
alias
=
name
;
// return oind->getNodeId( oind->mkFullNodeName(name,alias) );
...
...
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