Skip to content

Commit f023f4d

Browse files
author
Kevin Vu te Laar
committed
Merge branch 'master' into python-wrapper
Signed-off-by: Kevin Vu te Laar <vu.te@rwth-aachen.de>
2 parents 124a1f5 + 836c7ea commit f023f4d

280 files changed

Lines changed: 3948 additions & 1716 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.

.clang-format

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@ BasedOnStyle: LLVM
77
# Disable automatic line-breaks in comments
88
# as this breaks SPDX headers
99
ReflowComments: false
10+
11+
# Regroup #include directives to villas - std - other
12+
IncludeBlocks: Regroup
13+
IncludeIsMainRegex: / # disable main header heuristic
14+
IncludeCategories:
15+
- Regex: '^<villas/'
16+
Priority: 3
17+
CaseSensitive: true
18+
- Regex: '^<[[:lower:]_]+>$'
19+
Priority: 1
20+
CaseSensitive: true
21+
- Regex: '^<.*>$'
22+
Priority: 2
23+
- Regex: '^".*"$'
24+
Priority: 4

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
use flake
5+
pre-commit install
6+
pre-commit install -t prepare-commit-msg

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ b1e8cd81da9a3e3d27db27d49d265afc53e0ce4d
1919

2020
# Update Steffens mail address in common/
2121
6427fae1e4ca0467e09688d56cec0dcd7d5e600d
22+
23+
# Apply uniform #include style to all files
24+
817393134850845ea1237621b6b0f41e133f9829

.github/workflows/paper.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
---
5+
name: Draft PDF
6+
7+
on:
8+
push:
9+
paths:
10+
- paper/**
11+
- .github/workflows/paper.yaml
12+
13+
jobs:
14+
paper:
15+
runs-on: ubuntu-latest
16+
name: Paper Draft
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Build draft PDF
23+
uses: openjournals/openjournals-draft-action@v1.0
24+
with:
25+
journal: joss
26+
paper-path: paper/paper.md
27+
28+
- name: Upload
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: paper
32+
path: paper/paper.pdf

.pre-commit-config.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
rev: v5.0.0
99
hooks:
1010
- id: trailing-whitespace
11-
exclude: \.patch$
11+
exclude: \.patch$|^paper\.md$
1212
- id: end-of-file-fixer
1313
exclude: \.(svg|patch)$
1414
- id: check-ast
@@ -19,6 +19,7 @@ repos:
1919
exclude: .devcontainer/devcontainer\.json
2020
- id: check-toml
2121
- id: check-added-large-files
22+
exclude: ^paper\.md$
2223
- id: pretty-format-json
2324
# black has its own mind of formatting Jupyter notebooks
2425
exclude: \.ipynb$|^.devcontainer/devcontainer\.json$|package-lock\.json$
@@ -54,4 +55,13 @@ repos:
5455
rev: "v0.13.0"
5556
hooks:
5657
- id: markdownlint
58+
exclude: ^paper\.md$
5759
args: [-r, "~MD013,~MD033,~MD024"]
60+
61+
- repo: local
62+
hooks:
63+
- id: dco-hook
64+
name: check DCO
65+
entry: ./tools/pre-commit-dco-hook.sh
66+
language: script
67+
stages: [prepare-commit-msg]

CITATION.cff

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH
2+
# SPDX-License-Identifier: Apache-2.0
3+
cff-version: "1.2.0"
4+
authors:
5+
- family-names: Vogel
6+
given-names: Steffen
7+
orcid: "https://orcid.org/0000-0003-3384-6750"
8+
- family-names: Eiling
9+
given-names: Niklas
10+
orcid: "https://orcid.org/0000-0002-7011-9846"
11+
- family-names: Pitz
12+
given-names: Manuel
13+
orcid: "https://orcid.org/0000-0002-6252-2029"
14+
- family-names: Bach
15+
given-names: Alexandra
16+
orcid: "https://orcid.org/0009-0005-7385-4642"
17+
- family-names: Stevic
18+
given-names: Marija
19+
- family-names: Monti
20+
given-names: Prof. Antonello
21+
orcid: "https://orcid.org/0000-0003-1914-9801"
22+
doi: 10.5281/zenodo.16917994
23+
message: If you use this software, please cite our article in the
24+
Journal of Open Source Software.
25+
preferred-citation:
26+
authors:
27+
- family-names: Vogel
28+
given-names: Steffen
29+
orcid: "https://orcid.org/0000-0003-3384-6750"
30+
- family-names: Eiling
31+
given-names: Niklas
32+
orcid: "https://orcid.org/0000-0002-7011-9846"
33+
- family-names: Pitz
34+
given-names: Manuel
35+
orcid: "https://orcid.org/0000-0002-6252-2029"
36+
- family-names: Bach
37+
given-names: Alexandra
38+
orcid: "https://orcid.org/0009-0005-7385-4642"
39+
- family-names: Stevic
40+
given-names: Marija
41+
- family-names: Monti
42+
given-names: Prof. Antonello
43+
orcid: "https://orcid.org/0000-0003-1914-9801"
44+
date-published: 2025-08-29
45+
doi: 10.21105/joss.08401
46+
issn: 2475-9066
47+
issue: 112
48+
journal: Journal of Open Source Software
49+
publisher:
50+
name: Open Journals
51+
start: 8401
52+
title: "VILLASnode: An Open-Source Real-time Multi-protocol Gateway"
53+
type: article
54+
url: "https://joss.theoj.org/papers/10.21105/joss.08401"
55+
volume: 10
56+
title: "VILLASnode: An Open-Source Real-time Multi-protocol Gateway"

CMakeLists.txt

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
cmake_minimum_required(VERSION 3.15)
88

99
project(villas-node
10-
VERSION 0.0.0
11-
DESCRIPTION "VILLASnode"
10+
VERSION 1.0.1
11+
DESCRIPTION "Open-Source Real-time Multi-protocol Gateway"
1212
HOMEPAGE_URL "https://www.fein-aachen.org/projects/villas-node/"
1313
LANGUAGES C CXX
1414
)
1515

1616
# Some more project settings
1717
set(PROJECT_AUTHOR "Steffen Vogel")
18-
set(PROJECT_COPYRIGHT "2014-2021, Institute for Automation of Complex Power Systems, RWTH Aachen University")
18+
set(PROJECT_COPYRIGHT "2014-2025 The VILLASframework Authors")
1919

2020
# Several CMake settings/defaults
2121
set(CMAKE_C_STANDARD 11)
@@ -48,7 +48,6 @@ include(FindPkgConfig)
4848
include(CheckIncludeFile)
4949
include(FeatureSummary)
5050
include(GNUInstallDirs)
51-
include(GetVersion)
5251
include(FindSymbol)
5352
include(CMakeDependentOption)
5453

@@ -76,19 +75,17 @@ find_package(Lua)
7675
find_package(LibDataChannel)
7776
find_package(re)
7877
find_package(OpenDSSC)
78+
find_package(FileSystem)
79+
find_package(Criterion)
7980

8081
# Check for tools
82+
find_program(PROTOBUFC_COMPILER NAMES protoc-c)
83+
find_program(PROTOBUF_COMPILER NAMES protoc)
8184
find_program(PASTE NAMES paste)
8285
if(NOT PASTE)
8386
message(SEND_ERROR "GNU paste is missing. Please install coreutils")
8487
endif()
8588

86-
# Check programs
87-
find_program(PROTOBUFC_COMPILER NAMES protoc-c)
88-
find_program(PROTOBUF_COMPILER NAMES protoc)
89-
90-
# Build without any GPL-code
91-
option(WITHOUT_GPL "Build VILLASnode without any GPL code" OFF)
9289

9390
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig")
9491

@@ -157,7 +154,15 @@ else()
157154
set(FOUND_FPGA_SUBMODULES OFF)
158155
endif()
159156

157+
if(CXX17_FILESYSTEM)
158+
set(STDCXX_FS_NOT_FOUND OFF)
159+
else()
160+
set(STDCXX_FS_NOT_FOUND ON)
161+
endif()
162+
160163
# Build options
164+
cmake_dependent_option(WITHOUT_GPL "Build VILLASnode without any GPL code" OFF "" ON)
165+
cmake_dependent_option(WITH_GHC_FS "Build using ghc::filesystem, a drop in replacement for std::filesystem" ON "STDCXX_FS_NOT_FOUND" OFF)
161166
cmake_dependent_option(WITH_DEFAULTS "Defaults for non required build options" ON "" OFF)
162167

163168
cmake_dependent_option(WITH_API "Build with remote control API" "${WITH_DEFAULTS}" "" OFF)
@@ -206,7 +211,7 @@ cmake_dependent_option(WITH_NODE_WEBSOCKET "Build with websocket node-type"
206211
cmake_dependent_option(WITH_NODE_ZEROMQ "Build with zeromq node-type" "${WITH_DEFAULTS}" "LIBZMQ_FOUND; NOT WITHOUT_GPL" OFF)
207212
cmake_dependent_option(WITH_NODE_OPENDSS "Build with opendss node-type" "${WITH_DEFAULTS}" "OpenDSSC_FOUND" OFF)
208213

209-
# set a default for the build type
214+
# Set a default for the build type
210215
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
211216
set(CMAKE_BUILD_TYPE "Debug")
212217
endif()
@@ -227,8 +232,10 @@ else()
227232
add_compile_options(-Wno-error)
228233
endif()
229234

230-
# Get version info and buildid from Git
231-
GetVersion(${PROJECT_SOURCE_DIR} "CMAKE_PROJECT")
235+
if(WITH_GHC_FS)
236+
find_package(ghc_filesystem 1.5.14 REQUIRED)
237+
include_directories($<TARGET_PROPERTY:ghcFilesystem::ghc_filesystem,INTERFACE_INCLUDE_DIRECTORIES>)
238+
endif()
232239

233240
if(WITH_FPGA)
234241
add_subdirectory(fpga)
@@ -314,19 +321,11 @@ add_feature_info(NODE_ZEROMQ WITH_NODE_ZEROMQ "Build with
314321

315322
if(TOPLEVEL_PROJECT)
316323
feature_summary(WHAT ALL VAR FEATURES)
317-
message(STATUS "Building ${CMAKE_PROJECT_DESCRIPTION}:")
324+
message(STATUS "Building ${PROJECT_NAME}:")
318325
message(STATUS "${FEATURES}")
319326

320-
if(FOUND_GIT_VERSION)
321-
message(STATUS " VERSION: ${CMAKE_PROJECT_VERSION}")
322-
message(STATUS " RELEASE: ${CMAKE_PROJECT_RELEASE}")
323-
message(STATUS " GIT_REV: ${CMAKE_PROJECT_GIT_REV}")
324-
message(STATUS " GIT_BRANCH: ${CMAKE_PROJECT_GIT_BRANCH}")
325-
message(STATUS " VARIANT: ${CMAKE_PROJECT_VARIANT}")
326-
message(STATUS " BUILD_ID: ${CMAKE_PROJECT_BUILD_ID}")
327-
message(STATUS " BUILD_DATE: ${CMAKE_PROJECT_BUILD_DATE}")
328-
endif()
329327

328+
message(STATUS " VERSION: ${CMAKE_PROJECT_VERSION}")
330329
message(STATUS " ARCH: ${CMAKE_SYSTEM_PROCESSOR}")
331330
message(STATUS " OS: ${CMAKE_SYSTEM_NAME}")
332331
endif()

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work.
5858

5959
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
6060

61-
Copyright [yyyy] [name of copyright owner]
61+
Copyright 2014-2025 The VILLASframework Authors
6262

6363
Licensed under the Apache License, Version 2.0 (the "License");
6464
you may not use this file except in compliance with the License.

LICENSES/Apache-2.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work.
5858

5959
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
6060

61-
Copyright [yyyy] [name of copyright owner]
61+
Copyright 2014-2025 The VILLASframework Authors
6262

6363
Licensed under the Apache License, Version 2.0 (the "License");
6464
you may not use this file except in compliance with the License.

LICENSES/BSD-1-Clause.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Copyright (c) <year> <owner>. All rights reserved.
2-
3-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4-
5-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6-
7-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
Copyright (c) 2014-2025 The VILLASframework Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)