Skip to content

Commit d4e7309

Browse files
committed
first docu struct
1 parent a9fb35a commit d4e7309

24 files changed

+2070
-58
lines changed

.github/workflows/createBundle.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -182,39 +182,44 @@ jobs:
182182
- name: Register Project
183183
working-directory: ${{github.workspace}}/WinCCOA_QualityChecks/
184184
run: |
185-
cwd=$(pwd)
186-
187-
mkdir -p $cwd/config
188-
cd $cwd/config
189-
190-
echo "[general]
191-
pvss_path = \"/opt/WinCC_OA/3.19\"
192-
proj_path = \"$cwd\"
193-
proj_version = \"3.19\"
194-
langs = \"en_US.utf8\"
195-
pmonPort = 5999
196-
" > config
197-
198-
mkdir -p $cwd/log
185+
cwd=$(pwd)
186+
187+
mkdir -p $cwd/Projects/TfCustomizedQG/config
188+
cd $cwd/Projects/TfCustomizedQG/config
189+
190+
echo "[general]
191+
pvss_path = \"/opt/WinCC_OA/3.19\"
192+
proj_path = \"/opt/WinCC_OA/3.19/TestFramework_3.19\"
193+
proj_path = \"$cwd/Projects/Global\"
194+
proj_path = \"$cwd/Projects/TfCustomizedQG\"
195+
proj_version = \"3.19\"
196+
langs = \"de_AT.utf8\"
197+
langs = \"en_US.utf8\"
198+
pmonPort = 5999
199+
[testFramework]
200+
installPath = \"$cwd/\"
201+
" > config
202+
203+
mkdir -p $$cwd/Projects/TfCustomizedQG/log
199204
200-
/opt/WinCC_OA/3.19/bin/WCCILpmon -config $cwd/config/config -n -autofreg -status -log +stderr || true
205+
/opt/WinCC_OA/3.19/bin/WCCILpmon -config $cwd/Projects/TfCustomizedQG/config/config -n -autofreg -status -log +stderr || true
201206
202207
- name: Generate help
203208
working-directory: /opt/WinCC_OA/3.19/bin/
204209
run: |
205-
./WCCOActrl -proj WinCCOA_QualityChecks -n doxygen.ctl -log +stderr -lang en_US.utf8
210+
./WCCOActrl -proj TfCustomizedQG -n buildHelp.ctl -log +stderr -lang en_US.utf8
206211
207212
- name: Upload html help
208213
uses: actions/upload-artifact@v3
209214
with:
210215
name: html-help
211-
path: ${{github.workspace}}/WinCCOA_QualityChecks/help/html/*
216+
path: ${{github.workspace}}/help/html/*
212217
213218
- name: Upload QT help
214219
uses: actions/upload-artifact@v3
215220
with:
216221
name: qt-help
217-
path: ${{github.workspace}}/WinCCOA_QualityChecks/help/html/index.qch
222+
path: ${{github.workspace}}/help/html/index.qch
218223
219224
package:
220225
name: Package project and binaries

.gitignore

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
WinCCOA_QualityChecks/bin/ctrlppcheck/
1+
22
ctrlppcheck/build/
33
# astyle backup files
44
*.ctl.orig
55

66
# WinCC OA Tests
77
WinCC_OA_Test/Projects/Stored/
8-
WinCC_OA_Test/Results/
98
WinCC_OA_Test/Projects/TfCustomizedQG/log/
109
WinCC_OA_Test/Projects/TfCustomizedQG/config/config
10+
WinCC_OA_Test/Results/
1111
*.dump
12+
13+
# WinCCOA_QualityChecks
14+
# ctrlppcheck executable
15+
WinCCOA_QualityChecks/bin/ctrlppcheck/
16+
# auto generated doxygen config file
17+
WinCCOA_QualityChecks/data/projectDocu/doxygenConfig.txt
18+
WinCCOA_QualityChecks/data/projectDocu/doxygenConfig.txt.bak
19+
# generated doxygen docu
20+
/help/html
21+
/help/log/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Continuous integration:
3333

3434
user documentation:
3535

36-
- [Link](docs/user.md)
36+
- [Link](docs/docuSources/user.md)
3737

3838
technical documentation:
3939

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// $License: NOLICENSE
2+
//--------------------------------------------------------------------------------
3+
/**
4+
@file $relPath
5+
@copyright Copyright 2023 SIEMENS AG
6+
SPDX-License-Identifier: GPL-3.0-only
7+
@author mPokorny
8+
*/
9+
10+
// Libraries used (#uses)
11+
#uses "classes/projectEnvironment/ProjEnvComponent"
12+
#uses "classes/projectEnvironment/ProjEnvProject"
13+
#uses "classes/globalStorage/GlobalStorage"
14+
15+
//-----------------------------------------------------------------------------
16+
/**Generate a full documentation from the project files. See also DoxygenGenerator
17+
*/
18+
void main(string sourcePath)
19+
{
20+
const string sourcePathRoot = dirName(sourcePath);
21+
// const string sourcePathTests = sourcePathRoot + "WinCC_OA_Test/";
22+
const string sourcePathQualityChecks = sourcePathRoot + "WinCCOA_QualityChecks/";
23+
const string sourcePathDocs = sourcePathRoot + "docs/";
24+
const string target = sourcePathRoot + "help/";
25+
26+
rmdir(target, TRUE);
27+
28+
/// create a dummy helper project.
29+
// we need to compose all necessary sources and then
30+
// start doxygen.ctl with some one WinCC OA project
31+
32+
ProjEnvProject helpProject = ProjEnvProject("WinCCOA_QualityChecks_help");
33+
helpProject.setInstallDir(dirName(PROJ_PATH));
34+
helpProject.setVersion(VERSION);
35+
helpProject.setRunnable(FALSE);
36+
helpProject.setPackageSelection(ProjEnvProjectPackageSelection::EmptyDb);
37+
helpProject.setName(helpProject.getId());
38+
helpProject.setLanguages(makeDynString("en_US.utf8"));
39+
40+
// if exists for some reason, just remove it
41+
if (helpProject.exists())
42+
helpProject.deleteProj();
43+
44+
helpProject.create();
45+
46+
rmdir(helpProject.getDir() + SCRIPTS_REL_PATH, true);
47+
copyAllFilesRecursive(sourcePathQualityChecks + SCRIPTS_REL_PATH, helpProject.getDir() + SCRIPTS_REL_PATH);
48+
rmdir(helpProject.getDir() + PICTURES_REL_PATH, true);
49+
copyAllFilesRecursive(sourcePathQualityChecks + PICTURES_REL_PATH, helpProject.getDir() + PICTURES_REL_PATH);
50+
rmdir(helpProject.getDir() + DATA_REL_PATH, true);
51+
copyAllFilesRecursive(sourcePathQualityChecks + DATA_REL_PATH + "qualityGates", helpProject.getDir() + DATA_REL_PATH + "qualityGates");
52+
53+
copyAllFilesRecursive(sourcePathDocs + "projectDocu", helpProject.getDir() + DATA_REL_PATH + "projectDocu");
54+
copyAllFilesRecursive(sourcePathDocs + "docuSources", helpProject.getDir() + DATA_REL_PATH + "docuSources");
55+
// copyFile(sourcePathRoot + "README.md", helpProject.getDir() + DATA_REL_PATH + "docuSources/" + "README.md");
56+
57+
ProjEnvComponent ctrlMan = ProjEnvComponent(CTRL_COMPONENT);
58+
59+
ctrlMan.setOptions(makeDynString("-n", "doxygen.ctl"));
60+
ctrlMan.setProj(helpProject.getId());
61+
ctrlMan.setNum(101);
62+
63+
GlobalStorage storage;
64+
storage.setValue("doxygen/projectName", helpProject.getName());
65+
storage.setValue("doxygen/outputDirectory", target);
66+
storage.setValue("doxygen/advancedConfig", 1);
67+
storage.setValue("doxygen/excludePatterns", "*/example*");
68+
storage.setValue("doxygen/readme", helpProject.getDir() + DATA_REL_PATH + "docuSources/" + "README.md");
69+
storage.setValue("doxygen/bugLinkFormat", "https://github.com/siemens/CtrlppCheck/issues/%s");
70+
storage.setValue("doxygen/todoLinkFormat", "https://github.com/siemens/CtrlppCheck/issues/%s");
71+
72+
const int exitCode = ctrlMan.start();
73+
74+
copyAllFilesRecursive(helpProject.getDir() + LOG_REL_PATH, target + LOG_REL_PATH);
75+
76+
storage.removeKey("doxygen/projectName");
77+
storage.removeKey("doxygen/outputDirectory");
78+
storage.removeKey("doxygen/advancedConfig");
79+
storage.removeKey("doxygen/excludePatterns");
80+
storage.removeKey("doxygen/readme");
81+
storage.removeKey("doxygen/bugLinkFormat");
82+
storage.removeKey("doxygen/todoLinkFormat");
83+
84+
helpProject.deleteProj();
85+
86+
if (exitCode != 0)
87+
{
88+
throwError(makeError("", PRIO_FATAL, ERR_CONTROL, 54, "doxygen.ctl crashed", exitCode));
89+
}
90+
}

devTools/buildHelp.cmd

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
echo off
2+
REM Change copyright sections
3+
4+
REM ---------------------------------------------------------------------------
5+
cls
6+
7+
REM ---------------------------------------------------------------------------
8+
REM default values
9+
SET WINCC_OA_VERSION=3.19
10+
set WINCC_OA_TEST_PATH=%cd%\..\WinCC_OA_Test\
11+
12+
REM get input params
13+
:loopStdIn
14+
IF NOT "%1"=="" (
15+
16+
REM print help
17+
IF "%1"=="-oaVersion" (
18+
SET WINCC_OA_VERSION=%2
19+
SHIFT
20+
)
21+
IF "%1"=="-oaTestPath" (
22+
SET WINCC_OA_TEST_PATH=%2
23+
SHIFT
24+
)
25+
26+
SHIFT
27+
GOTO :loopStdIn
28+
)
29+
30+
31+
call registerHelperProject.cmd
32+
33+
34+
REM --------------------------------------------------------------------------
35+
REM generate help
36+
call %oaBinPath%WCCOActrl.exe -config %WINCC_OA_TEST_PATH%Projects\TfCustomizedQG\config\config -n buildHelp.ctl %WINCC_OA_TEST_PATH% -log +stderr -lang en_US.utf8
37+
File renamed without changes.
File renamed without changes.

docs/docuSources/01_basics.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@page basics Feature, Basics
2+
3+
@section basics_section1 Advantages and Overview
4+
5+
@section basics_section2 Relevant Chapters
6+
7+
|Chapter|Description|
8+
|------------|-------|
9+
|...Basics | Basics to...|
10+
|Requirements and Installation | Requirements and Installation of|
11+
|Configuration of... | Configuration of....|
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@page 02_requirementsInstallation Requirements and installation
2+
3+
@section requirementsInstallation-hw Hardware requirements
4+
5+
see WinCC OA online documentation [link](https://www.winccoa.com/documentation/WinCCOA/latest/en_US/GettingStarted/GettingStarted-13_2.html)
6+
7+
@section requirementsInstallation-sw Software requirements
8+
9+
**WinCC OA** latest patch
10+
for basic requirements see WinCC OA online documentation [link](https://www.winccoa.com/documentation/WinCCOA/latest/en_US/GettingStarted/GettingStarted-13_2.html)
11+
12+
**python** must be installed, min. V3.6
13+
14+
@section requirementsInstallation-installation Installation
15+
16+
_currently only manual integration, see steps below_
17+
18+
- Create new WinCC OA Project (With DB)
19+
- Add subproject **_WinCCOA_QualityChecks_**
20+
- Import Dp-List WinCCOA_QualityChecks\dplist\WinCCOA_QualityChecks.dpl
21+
- Re-start your GEdi
22+
- [Optional] Adapt following script to find python executable
23+
24+
WinCCOA_QualityChecks\scripts\libs\classes\QualityGates\Tools\Python\Python.ctl
25+
26+
``` cpp
27+
public static synchronized string getExecutable()
28+
{
29+
return findExecutable("python");
30+
}
31+
```

docs/docuSources/03_configuration.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@page configuration Configuration of/Example configuration
2+
\tableofcontents
3+
4+
@section Configuring_the_workflow Configuring the workflow
5+
This example shows how to configure....
6+
7+
8+
@note The recommended installation directory is...
9+
10+
@section config_step1 Step1
11+
First step of the configuration.
12+
13+
Execute the following commands:
14+
```
15+
install.packages1
16+
install.packages1
17+
```
18+
@section config_step2 Step2
19+
Second step of the configuration.
20+

docs/docuSources/04_example.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page Example Example of....
2+
\tableofcontents
3+
4+
## How to ... .
5+
Step1
6+
Step2
7+
8+
...
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@page ConfigEntries Config Entries
2+
\tableofcontents
3+
4+
5+
|Config Entry|Description|
6+
|------------|-------|
7+
|httpServerPort | Sets the http port|
8+
9+
10+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page internalDatapoints Internal Data Points
2+
\tableofcontents
3+
4+
|Data point element|Type|Description|
5+
|------------|-------|-------|
6+
|config1 | int| configuration for device1|
7+
8+

docs/docuSources/07_detailsOn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@page details Details on the...
2+
3+
@section debugLevels Debug levels
4+
5+
@section errorMessages Error messages
6+
7+

docs/docuSources/08_FAQs.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@page FAQs FAQs
2+
\tableofcontents
3+
4+
5+
@section faq1 How can I change ... ?
6+
To change the ... are available:
7+
1. By using the config entry ...
8+
2. By setting the environment variable ...
9+
10+
@section faq2 How to use the ... CTRL extension
11+
The ... CTRL extension provides functions that can be used for tests written in CTRL.
12+
13+
... functions list ...
14+
15+
They have the following in common:
16+
+ They display a message in the Log Viewer ... .
17+
+ They return 0 if the ... .
18+
+ Their first parameter must be the test ... .
19+
20+
@section faq3 How to deal with operating system dependencies in test cases?
21+
You can use conditional statements based on the _ANDROID, _IOS, _OSX, _SOLARIS, _UNIX and _WIN32 symbolic constants, the value
22+
of which is either true or false, depending on the operating system being used.
23+
24+
Example
25+
```
26+
const string LINE_BREAK = _WIN32 ? "\r\n" : "\n";
27+
```

docs/docuSources/09_glossary.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@page glossary Glossary
2+
\tableofcontents
3+
4+
This glossary explains terms that are related to...
5+
6+
@section glossary1 Term1 ...
7+
8+
@section glossary2 Term2 ...
9+

docs/docuSources/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# WinCC OA QualityChecks
2+
3+
WinCCOA_QualityChecks is a set of tools for static code analysis for SIMATIC WinCC OA's scripting language Ctrl and Ctrl++.
4+
5+
They are easy to use and integrate with WinCC OA's GEDI and script editor but may also be used in an CI toolchain for automated pull request builds etc.
6+
7+
## System Requirements/ Requirements
8+
9+
see [Hardware requirements](@ref requirementsInstallation-hw)
10+
11+
see [Software requirements](@ref requirementsInstallation-sw)
12+
13+
## Installation
14+
15+
see [Installation](@ref requirementsInstallation-installation)
16+
17+
## Feature name such as "Relational Database"
18+
19+
- Information about a feature such as
20+
"Supported Oracle versions"
21+
22+
## Further Information
23+
24+
- Documentation

0 commit comments

Comments
 (0)