Commit 69f3616c authored by Markus Mirz's avatar Markus Mirz
Browse files

refactor dpsim-villas module


Signed-off-by: Markus Mirz's avatarMarkus Mirz <mmirz@eonerc.rwth-aachen.de>
parent ed1421ef
......@@ -16,7 +16,6 @@ wheelhouse/
*.png
Examples/Notebooks/Grids/reference-results/
villas_sent_data.conf
villas-dpsim
# Folders
Libraries/
......
......@@ -218,7 +218,7 @@ if(WITH_PYBIND)
target_link_libraries(dpsimpy PRIVATE dpsim)
if(WITH_SHMEM)
pybind11_add_module(dpsimpyvillas ${CMAKE_BINARY_DIR}/_deps/villas-dpsim-src/src/dpsim-villas.cpp)
pybind11_add_module(dpsimpyvillas ${CMAKE_BINARY_DIR}/_deps/dpsim-villas-src/src/pybind-dpsim-villas.cpp)
target_link_libraries(dpsimpyvillas PRIVATE dpsim)
endif()
endif()
......
......@@ -33,7 +33,7 @@
#include <dpsim/Interface.h>
#ifdef WITH_SHMEM
#include <villas-dpsim/InterfaceShmem.h>
#include <dpsim-villas/InterfaceShmem.h>
#endif
namespace DPsim {
......
......@@ -79,12 +79,12 @@ endif()
if(WITH_SHMEM)
set(DPSIM_VILLAS_SOURCES
${CMAKE_BINARY_DIR}/_deps/villas-dpsim-src/src/InterfaceShmem.cpp
${CMAKE_BINARY_DIR}/_deps/villas-dpsim-src/src/PthreadPoolScheduler.cpp
${CMAKE_BINARY_DIR}/_deps/dpsim-villas-src/src/InterfaceShmem.cpp
${CMAKE_BINARY_DIR}/_deps/dpsim-villas-src/src/PthreadPoolScheduler.cpp
)
set(DPSIM_VILLAS_LIBRARIES ${VILLASNODE_LIBRARIES} pthread)
set(DPSIM_VILLAS_INCLUDE_DIRS ${VILLASNODE_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/_deps/villas-dpsim-src/include)
set(DPSIM_VILLAS_INCLUDE_DIRS ${VILLASNODE_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/_deps/dpsim-villas-src/include)
endif()
add_library(dpsim ${DPSIM_SOURCES} ${DPSIM_VILLAS_SOURCES})
......
......@@ -17,7 +17,7 @@
#include <dpsim/Config.h>
#ifdef WITH_SHMEM
#include <villas-dpsim/InterfaceShmem.h>
#include <dpsim-villas/InterfaceShmem.h>
#include <cps/AttributeList.h>
#endif
......
......@@ -35,7 +35,7 @@
#endif
#ifdef WITH_SHMEM
#include <villas-dpsim/PthreadPoolScheduler.h>
#include <dpsim-villas/PthreadPoolScheduler.h>
#endif
using namespace DPsim;
using namespace CPS;
......
# third-party
The VILLASnode extension for DPsim allows the user to send and receive values during simulation via many different protocols.
It can be downloaded as follows:
$ git clone git@github.com:dpsim-simulator/villas-dpsim.git
\ No newline at end of file
include(FetchContent)
FetchContent_Declare(
villas-dpsim
GIT_REPOSITORY https://github.com/dpsim-simulator/villas-dpsim.git
dpsim-villas
GIT_REPOSITORY https://github.com/sogno-platform/dpsim-villas.git
GIT_TAG main
)
if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
FetchContent_GetProperties(villas-dpsim)
if(NOT villas-dpsim_POPULATED)
FetchContent_Populate(villas-dpsim)
add_subdirectory(${villas-dpsim_SOURCE_DIR}/examples)
FetchContent_GetProperties(dpsim-villas)
if(NOT dpsim-villas_POPULATED)
FetchContent_Populate(dpsim-villas)
add_subdirectory(${dpsim-villas_SOURCE_DIR}/examples)
endif()
else()
FetchContent_MakeAvailable(villas-dpsim)
add_subdirectory(${villas-dpsim_SOURCE_DIR}/examples)
FetchContent_MakeAvailable(dpsim-villas)
add_subdirectory(${dpsim-villas_SOURCE_DIR}/examples)
endif()
FetchContent_GetProperties(villas-dpsim)
message(STATUS "Path to villas-dpsim: " ${villas-dpsim_SOURCE_DIR})
\ No newline at end of file
FetchContent_GetProperties(dpsim-villas)
message(STATUS "Path to dpsim-villas: " ${dpsim-villas_SOURCE_DIR})
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment