Skip to content

Commit 784e970

Browse files
committed
port large parts of VILLASnode to C++ and fix tests alongside
1 parent 6adcd8c commit 784e970

440 files changed

Lines changed: 14495 additions & 9339 deletions

File tree

Some content is hidden

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

.gitlab-ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ test:cppcheck:
101101
--error-exitcode=1
102102
--quiet
103103
--inline-suppr
104-
--enable=warning,performance,portability,information,missingInclude
104+
--enable=warning,performance,portability,missingInclude
105105
--std=c++11
106106
--suppress=noValidConfiguration
107+
-U '_MSC_VER;_WIN32;_M_ARM'
108+
-U '_MSC_VER;_WIN32;_M_AMD64;_M_X64'
109+
-U '_MSC_FULL_VER;_MSC_VER'
110+
-U '_MSC_BUILD;_MSC_VER'
107111
-I include
108112
-I common/include
109113
src/ lib/ tests/unit/ | tee cppcheck.log
@@ -147,9 +151,13 @@ test:integration:
147151
paths:
148152
- build/tests/integration/
149153
services:
150-
- eclipse-mosquitto
151-
- rabbitmq:3.8
152-
- redis
154+
- name: eclipse-mosquitto:2.0
155+
alias: mosquitto
156+
command: [ mosquitto, -c, /mosquitto-no-auth.conf ]
157+
- name: rwthacs/rabbitmq
158+
alias: rabbitmq
159+
- name: redis:6.2
160+
alias: redis
153161
tags:
154162
- docker
155163
needs:

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Main CMakeLists.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode
@@ -28,7 +28,7 @@ project(villas-node
2828

2929
# Some more project settings
3030
set(PROJECT_AUTHOR "Steffen Vogel")
31-
set(PROJECT_COPYRIGHT "2014-2020, Institute for Automation of Complex Power Systems, RWTH Aachen University")
31+
set(PROJECT_COPYRIGHT "2014-2021, Institute for Automation of Complex Power Systems, RWTH Aachen University")
3232
set(PROJECT_HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/")
3333

3434
# Several CMake settings/defaults
@@ -243,8 +243,8 @@ if(WITH_TESTS)
243243
endif()
244244

245245
configure_file(
246-
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/node/config.h.in
247-
${CMAKE_CURRENT_BINARY_DIR}/include/villas/node/config.h
246+
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/node/config.hpp.in
247+
${CMAKE_CURRENT_BINARY_DIR}/include/villas/node/config.hpp
248248
)
249249

250250
# Show feature summary

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ User documentation is available here: <https://villas.fein-aachen.org/doc/node.h
3434

3535
## Copyright
3636

37-
2014-2020, Institute for Automation of Complex Power Systems, EONERC
37+
2014-2021, Institute for Automation of Complex Power Systems, EONERC
3838

3939
## License
4040

clients/shmem/villas-shmem.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#include <iostream>
2727
#include <atomic>
2828

29-
#include <villas/node/config.h>
30-
#include <villas/node.h>
31-
#include <villas/pool.h>
32-
#include <villas/sample.h>
33-
#include <villas/shmem.h>
29+
#include <villas/node/config.hpp>
30+
#include <villas/node.hpp>
31+
#include <villas/pool.hpp>
32+
#include <villas/sample.hpp>
33+
#include <villas/shmem.hpp>
3434
#include <villas/colors.hpp>
3535
#include <villas/tool.hpp>
3636
#include <villas/log.hpp>
@@ -71,8 +71,8 @@ class Shmem : public Tool {
7171
{
7272
int ret, readcnt, writecnt, avail;
7373

74-
struct shmem_int shm;
75-
struct shmem_conf conf = {
74+
struct ShmemInterface shm;
75+
struct ShmemConfig conf = {
7676
.polling = 0,
7777
.queuelen = DEFAULT_SHMEM_QUEUELEN,
7878
.samplelen = DEFAULT_SHMEM_SAMPLELEN
@@ -91,7 +91,7 @@ class Shmem : public Tool {
9191
if (ret < 0)
9292
throw RuntimeError("Failed to open shared-memory interface");
9393

94-
struct sample *insmps[vectorize], *outsmps[vectorize];
94+
struct Sample *insmps[vectorize], *outsmps[vectorize];
9595

9696
while (!stop) {
9797
readcnt = shmem_int_read(&shm, insmps, vectorize);

cmake/FindIBVerbs.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

cmake/FindOpal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

cmake/FindRDMACM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

cmake/FindSymbol.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

cmake/VILLASnodePackaging.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

cmake/config/Coverage.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMakeLists.txt.
22
#
33
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
4-
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
4+
# @copyright 2014-2021, Institute for Automation of Complex Power Systems, EONERC
55
# @license GNU General Public License (version 3)
66
#
77
# VILLASnode

0 commit comments

Comments
 (0)