Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
7b24b3f3
Commit
7b24b3f3
authored
5 years ago
by
vargheseg
Browse files
Options
Downloads
Patches
Plain Diff
Added description page for ConfigReader
parent
10709ab8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/include/ConfigReader.h
+69
-0
69 additions, 0 deletions
Modules/include/ConfigReader.h
with
69 additions
and
0 deletions
Modules/include/ConfigReader.h
+
69
−
0
View file @
7b24b3f3
/*!
* \page configreader ConfigReader Module
*
* This Module provides the following features:
* - Read values from an xml config file to have them available at
* server initialization.
* - Expose above values as process variables; these may connect
* to other Application core modules if needed.
*
* \section usage Example usage
* - A server application using the config reader may look like:
* \code
* namespace ctk = ChimeratK
*
* struct Server : public ctk::Application {
* Server() : Application("testserver") {}
* ~Server() { shutdown(); }
*
* ctk::ConfigReader config{this, "config", "validConfig.xml", {"MyTAG"}};
* TestModule testModule{this, "TestModule", "The test module"};
*
* void Server::defineConnections() override;
*
* };
* \endcode
*
* - Values from validConfig.xml can be accessed at server startup:
* \code
* Server::Server(){
* auto config_var = config.get<int8_t>("module1/var8");
* auto config_arr = config.get<std::vector<int8>>("module1/submodule/intArray");
* // ...
* }
* \endcode
*
* - Configuration may be published as Process Variables to other modules:
* \code
* void Server::defineConnections() {
* config.connectTo(testModule);
* }
* \endcode
*
* \section xmlstructure XML file structure
* - A valid configuration file may look like:
* \verbatim
<configuration>
<variable name="var8" type="int8" value="-123"/>
<module name="module1">
<variable name="var8" type="int8" value="-123"/>
<module name="submodule">
<variable name="intArray" type="int32">
<value i="0" v="10"/>
<value i="1" v="9"/>
<value i="2" v="8"/>
<value i="7" v="3"/>
<value i="8" v="2"/>
<value i="9" v="1"/>
<value i="3" v="7"/>
<value i="4" v="6"/>
<value i="5" v="5"/>
<value i="6" v="4"/>
</variable>
</module>
</module>
</configuration>
\endverbatim
*
* */
#ifndef CHIMERATK_APPLICATION_CORE_CONFIG_READER_H
#define CHIMERATK_APPLICATION_CORE_CONFIG_READER_H
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment