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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
uniset.spec
conf/uniset.spec
+1
-1
UniversalInterface.h
include/UniversalInterface.h
+5
-2
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+4
-4
Configuration.cc
src/Various/Configuration.cc
+15
-0
No files found.
conf/uniset.spec
View file @
b3cd6d5f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Name: uniset
Name: uniset
Version: 0.96
Version: 0.96
Release: eter2
6
Release: eter2
8
Summary: UniSet
Summary: UniSet
License: GPL
License: GPL
Group: Development/C++
Group: Development/C++
...
...
include/UniversalInterface.h
View file @
b3cd6d5f
...
@@ -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
)
{
{
...
...
src/Interfaces/UniversalInterface.cc
View file @
b3cd6d5f
...
@@ -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
;
}
}
...
...
src/Various/Configuration.cc
View file @
b3cd6d5f
...
@@ -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) );
...
...
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