Skip to content

Commit e6840b9

Browse files
committed
Initial Release
license Fixed edited Deploy Path Artifact path fixed CI Working
1 parent f7120a5 commit e6840b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3111
-1
lines changed

.clang-format

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
Language: Cpp
3+
Standard: Cpp11
4+
UseTab: Never
5+
IndentWidth: 4
6+
AccessModifierOffset: -4
7+
BreakBeforeBraces: Allman
8+
BreakConstructorInitializers: BeforeComma
9+
Cpp11BracedListStyle: true
10+
DerivePointerAlignment: true
11+
FixNamespaceComments: true
12+
AllowShortIfStatementsOnASingleLine: false
13+
IndentCaseLabels: false
14+
ColumnLimit: 0
15+
...

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 4
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{config,libmeta,compmeta,progmeta,settings,xml}]
11+
indent_size = 2
12+
13+
[*.{md,mkdown,markdown}]
14+
trim_trailing_whitespace = false
15+
16+
[.{json,jsonc}]
17+
indent_size = 2

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.sh text eol=lf

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/bin/
2+
/build/
3+
.vscode

.gitlab-ci.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#//
2+
#// Copyright (c) Phoenix Contact GmbH & Co. KG. All rights reserved.
3+
#// Licensed under the MIT. See LICENSE file in the project root for full license information.
4+
#// SPDX-License-Identifier: MIT
5+
#//
6+
stages:
7+
- PLCnextBuildC
8+
- PLCnextBuildCpp
9+
- PLCnextBuildLibrary
10+
- deploy
11+
12+
## Docker Image:
13+
# PLCNCLI
14+
# C/C++ SDK
15+
# PLCNEngineer Library Builder
16+
# CMAKE
17+
18+
image: $SDK_IMAGE
19+
20+
variables:
21+
SDK_PATH: "${SDKPATH}"
22+
TARGET_VERSION: "${TARGETVERSION}"
23+
TARGET_NAME: "${TARGETNAME}"
24+
25+
.RunnerRequirements:
26+
before_script:
27+
- chmod +x tools/*
28+
- which cmake
29+
- cmake --version
30+
- which make
31+
- make --version
32+
- which plcncli
33+
- plcncli --version
34+
- plcncli get sdks
35+
- plcncli get targets
36+
- apt-get update
37+
- apt-get install ninja-build
38+
- echo "SDK_PATH:${SDK_PATH}"
39+
- echo "TARGET_VERSION:${TARGET_VERSION}"
40+
- echo "TARGET_NAME:${TARGET_NAME}"
41+
tags:
42+
- docker
43+
- debian-based
44+
allow_failure: true
45+
46+
#################################################
47+
#################################################
48+
#################################################
49+
######PLCnext Building###########################
50+
BuildPahoC:
51+
stage: PLCnextBuildC
52+
extends: .RunnerRequirements
53+
script:
54+
- tools/build-paho.mqtt.c.sh -t "${SDK_PATH}" -a "${TARGET_VERSION}" -n "${TARGET_NAME}"
55+
cache:
56+
key: buildpahoc
57+
paths:
58+
- external/paho.mqtt.c
59+
artifacts:
60+
expire_in: 10 min
61+
paths:
62+
- deploy
63+
64+
BuildPahoCpp:
65+
stage: PLCnextBuildCpp
66+
extends: .RunnerRequirements
67+
dependencies:
68+
- BuildPahoC
69+
script:
70+
- tools/build-paho.mqtt.cpp.sh -t "${SDK_PATH}" -a "${TARGET_VERSION}" -n "${TARGET_NAME}"
71+
cache:
72+
key: buildpahoc
73+
paths:
74+
- external/paho.mqtt.cpp
75+
artifacts:
76+
expire_in: 10 min
77+
paths:
78+
- deploy
79+
80+
BuildComponent:
81+
stage: PLCnextBuildLibrary
82+
extends: .RunnerRequirements
83+
dependencies:
84+
- BuildPahoCpp
85+
- BuildPahoC
86+
87+
script:
88+
- tools/build-component.sh -t "${SDK_PATH}" -a "${TARGET_VERSION}" -n "${TARGET_NAME}"
89+
cache:
90+
key: buildcomponent
91+
paths:
92+
- build/
93+
artifacts:
94+
name: "$CI_COMMIT_REF_SLUG"
95+
when: always
96+
paths:
97+
- deploy
98+

CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
3+
project(MqttClientRscService)
4+
5+
#include(CTest)
6+
7+
# Always use find_package to find external dependencies.
8+
# Make find_package a noop for targets that are available as sub projects.
9+
# See speech of Daniel Pfeifer "Effective CMake" C++Now 2017 Slide 34
10+
macro(find_package)
11+
if(NOT "${ARGV0}" IN_LIST FindAsSubproject)
12+
_find_package(${ARGV})
13+
else()
14+
set("${ARGV0}_FOUND" TRUE)
15+
endif()
16+
endmacro()
17+
18+
# Add targets that are included as sub projects
19+
# set(FindAsSubproject "MqttClient")
20+
21+
add_subdirectory(libs)
22+
#add_subdirectory(extras)

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing
2+
3+
This is an open source project, and we appreciate your help!
4+
5+
We use the GitHub issue tracker to discuss new features and bugs.
6+
7+
In addition to the issue tracker, the PLCnext Technology [Forum](https://www.plcnext-community.net/index.php?option=com_easydiscuss&view=categories&Itemid=221&lang=en) is the best way to get into contact with the project's maintainers.
8+
9+
To contribute code or documentation for available projects, please use an issue with an *easy-pick* label.
10+
Our [maintainers](MAINTAINERS.md) will review and implement the changes.
11+
12+
If you are interested in contributing to the PLCnext platform organisation, please contact [email protected].
13+
After reviewing, we will decide together, if your project will be forked from our organisation or if you get a member and transfer the repository to the organisation.

CONTRIBUTORS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributors
2+
3+
This is the official list of the MqttClient project contributors.
4+
<!---
5+
Names of the original copyright holders (individuals or organizations) should be listed with a '*' in the first column. People who have contributed from an organization can be listed under the organization that actually holds the copyright for their contributions. Those individuals should have their names indented and be marked with a '-'.
6+
-->
7+
8+
* Phoenix Contact GmbH & Co. KG
9+
- Martin Boers
10+
- Marcel Luhmann
11+
- Oliver Warneke

CodeOfConduct.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Phoenix Contact GmbH & Co KG
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)