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
70d2a89b
Commit
70d2a89b
authored
Sep 26, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add global HeartBeatTime to Configuration
parent
f30f6903
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+3
-2
libuniset.spec
conf/libuniset.spec
+7
-1
Configuration.h
include/Configuration.h
+4
-0
Configuration.cc
src/Various/Configuration.cc
+10
-1
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
70d2a89b
...
...
@@ -412,6 +412,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId tes
// ----------------------------------------------------------------------------
</xsl:template>
<xsl:template
name=
"COMMON-CC-HEAD"
>
// --------------------------------------------------------------------------
/*
...
...
@@ -519,7 +520,7 @@ activated(false)
throw SystemError(err.str());
}
int heartbeatTime = conf->getArgPInt("--heartbeat-time",it.getProp("heartbeatTime"),
5000
);
int heartbeatTime = conf->getArgPInt("--heartbeat-time",it.getProp("heartbeatTime"),
conf-
>
getHeartBeatTime()
);
if( heartbeatTime>0 )
ptHeartBeat.setTiming(heartbeatTime);
else
...
...
@@ -752,7 +753,7 @@ activated(false)
throw SystemError(err.str());
}
int heartbeatTime = conf->getArgPInt("--heartbeat-time",it.getProp("heartbeatTime"),
5000
);
int heartbeatTime = conf->getArgPInt("--heartbeat-time",it.getProp("heartbeatTime"),
conf-
>
getHeartBeatTime()
);
if( heartbeatTime>0 )
ptHeartBeat.setTiming(heartbeatTime);
...
...
conf/libuniset.spec
View file @
70d2a89b
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter1
3
Release: eter1
5
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -178,6 +178,12 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Sat Sep 26 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter14
- add default heartbeat time to Configuration
* Sat Sep 26 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter13
- add heartbeat logic to uniset-codegen
* Sat Sep 26 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter12
- minor fixes in IONotifyController
...
...
include/Configuration.h
View file @
70d2a89b
...
...
@@ -122,6 +122,8 @@ namespace UniSetTypes
inline
const
std
::
string
getConfFileName
()
const
{
return
fileConfName
;
}
inline
std
::
string
getImagesDir
()
const
{
return
imagesDir
;
}
//
inline
int
getHeartBeatTime
(){
return
heartbeat_msec
;
}
// dirs
inline
const
std
::
string
getConfDir
()
const
{
return
confDir
;
}
inline
const
std
::
string
getDataDir
()
const
{
return
dataDir
;
}
...
...
@@ -233,6 +235,8 @@ namespace UniSetTypes
std
::
string
lockDir
;
bool
localIOR
;
bool
transientIOR
;
int
heartbeat_msec
;
};
/*! */
...
...
src/Various/Configuration.cc
View file @
70d2a89b
...
...
@@ -92,7 +92,8 @@ Configuration::Configuration():
localDBServer
(
UniSetTypes
::
DefaultObjectId
),
localInfoServer
(
UniSetTypes
::
DefaultObjectId
),
localNode
(
UniSetTypes
::
DefaultObjectId
),
fileConfName
(
""
)
fileConfName
(
""
),
heartbeat_msec
(
10000
)
{
// unideb[Debug::CRIT] << " configuration FAILED!!!!!!!!!!!!!!!!!" << endl;
// throw Exception();
...
...
@@ -215,6 +216,10 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
throw
;
}
// default value
heartbeat_msec
=
5000
;
// cerr << "*************** initConfiguration: xmlOpen: " << pt.getCurrent() << " msec " << endl;
// pt.reset();
...
...
@@ -561,6 +566,10 @@ void Configuration::initParameters()
if
(
confDir
.
empty
()
)
confDir
=
getRootDir
();
}
else
if
(
name
==
"HeartBeatTime"
)
{
heartbeat_msec
=
it
.
getIntProp
(
"name"
);
}
}
}
// -------------------------------------------------------------------------
...
...
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