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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
7 deletions
+27
-7
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+5
-4
libuniset.spec
conf/libuniset.spec
+7
-1
Configuration.h
include/Configuration.h
+5
-1
Configuration.cc
src/Various/Configuration.cc
+10
-1
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
70d2a89b
...
@@ -283,9 +283,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::sysCommand( SystemMessage* sm )
...
@@ -283,9 +283,9 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::sysCommand( SystemMessage* sm )
askSensors(UniversalIO::UIONotify);
askSensors(UniversalIO::UIONotify);
active = true;
active = true;
break;
break;
}
}
case SystemMessage::FoldUp:
case SystemMessage::FoldUp:
case SystemMessage::Finish:
case SystemMessage::Finish:
askSensors(UniversalIO::UIODontNotify);
askSensors(UniversalIO::UIODontNotify);
break;
break;
...
@@ -412,6 +412,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId tes
...
@@ -412,6 +412,7 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId tes
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
</xsl:template>
</xsl:template>
<xsl:template
name=
"COMMON-CC-HEAD"
>
<xsl:template
name=
"COMMON-CC-HEAD"
>
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
/*
/*
...
@@ -519,7 +520,7 @@ activated(false)
...
@@ -519,7 +520,7 @@ activated(false)
throw SystemError(err.str());
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 )
if( heartbeatTime>0 )
ptHeartBeat.setTiming(heartbeatTime);
ptHeartBeat.setTiming(heartbeatTime);
else
else
...
@@ -752,7 +753,7 @@ activated(false)
...
@@ -752,7 +753,7 @@ activated(false)
throw SystemError(err.str());
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 )
if( heartbeatTime>0 )
ptHeartBeat.setTiming(heartbeatTime);
ptHeartBeat.setTiming(heartbeatTime);
...
...
conf/libuniset.spec
View file @
70d2a89b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 0.97
Version: 0.97
Release: eter1
3
Release: eter1
5
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++
...
@@ -178,6 +178,12 @@ rm -f %buildroot%_libdir/*.la
...
@@ -178,6 +178,12 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%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
* Sat Sep 26 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter12
- minor fixes in IONotifyController
- minor fixes in IONotifyController
...
...
include/Configuration.h
View file @
70d2a89b
...
@@ -122,10 +122,12 @@ namespace UniSetTypes
...
@@ -122,10 +122,12 @@ namespace UniSetTypes
inline
const
std
::
string
getConfFileName
()
const
{
return
fileConfName
;
}
inline
const
std
::
string
getConfFileName
()
const
{
return
fileConfName
;
}
inline
std
::
string
getImagesDir
()
const
{
return
imagesDir
;
}
//
inline
std
::
string
getImagesDir
()
const
{
return
imagesDir
;
}
//
inline
int
getHeartBeatTime
(){
return
heartbeat_msec
;
}
// dirs
// dirs
inline
const
std
::
string
getConfDir
()
const
{
return
confDir
;
}
inline
const
std
::
string
getConfDir
()
const
{
return
confDir
;
}
inline
const
std
::
string
getDataDir
()
const
{
return
dataDir
;
}
inline
const
std
::
string
getDataDir
()
const
{
return
dataDir
;
}
inline
const
std
::
string
getBinDir
()
const
{
return
binDir
;
}
inline
const
std
::
string
getBinDir
()
const
{
return
binDir
;
}
inline
const
std
::
string
getLogDir
()
const
{
return
logDir
;
}
inline
const
std
::
string
getLogDir
()
const
{
return
logDir
;
}
inline
const
std
::
string
getLockDir
()
const
{
return
lockDir
;
}
inline
const
std
::
string
getLockDir
()
const
{
return
lockDir
;
}
inline
const
std
::
string
getDocDir
()
const
{
return
docDir
;
}
inline
const
std
::
string
getDocDir
()
const
{
return
docDir
;
}
...
@@ -233,6 +235,8 @@ namespace UniSetTypes
...
@@ -233,6 +235,8 @@ namespace UniSetTypes
std
::
string
lockDir
;
std
::
string
lockDir
;
bool
localIOR
;
bool
localIOR
;
bool
transientIOR
;
bool
transientIOR
;
int
heartbeat_msec
;
};
};
/*! */
/*! */
...
...
src/Various/Configuration.cc
View file @
70d2a89b
...
@@ -92,7 +92,8 @@ Configuration::Configuration():
...
@@ -92,7 +92,8 @@ Configuration::Configuration():
localDBServer
(
UniSetTypes
::
DefaultObjectId
),
localDBServer
(
UniSetTypes
::
DefaultObjectId
),
localInfoServer
(
UniSetTypes
::
DefaultObjectId
),
localInfoServer
(
UniSetTypes
::
DefaultObjectId
),
localNode
(
UniSetTypes
::
DefaultObjectId
),
localNode
(
UniSetTypes
::
DefaultObjectId
),
fileConfName
(
""
)
fileConfName
(
""
),
heartbeat_msec
(
10000
)
{
{
// unideb[Debug::CRIT] << " configuration FAILED!!!!!!!!!!!!!!!!!" << endl;
// unideb[Debug::CRIT] << " configuration FAILED!!!!!!!!!!!!!!!!!" << endl;
// throw Exception();
// throw Exception();
...
@@ -215,6 +216,10 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
...
@@ -215,6 +216,10 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
throw
;
throw
;
}
}
// default value
heartbeat_msec
=
5000
;
// cerr << "*************** initConfiguration: xmlOpen: " << pt.getCurrent() << " msec " << endl;
// cerr << "*************** initConfiguration: xmlOpen: " << pt.getCurrent() << " msec " << endl;
// pt.reset();
// pt.reset();
...
@@ -561,6 +566,10 @@ void Configuration::initParameters()
...
@@ -561,6 +566,10 @@ void Configuration::initParameters()
if
(
confDir
.
empty
()
)
if
(
confDir
.
empty
()
)
confDir
=
getRootDir
();
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