8377623a5bfb5b701fd6fd651bc2f91e2eae1f5f
Main experimental magnet PS
This repository contains the driver code and Midas frontend for the main experimental magnet PS. There are two different versions of this driver - one using LAN-GPIB to run the magnets and a second one which uses the EPICS interface provided by GFA. The respective CMake targets are:
expmag(LAN-GPIB)expmag_epics(EPICS interface)
Requirements
Requires a Midas installation with the environment variable MIDASSYS pointing
to the built Midas artifacts and headers.
Build
Clone this repository, enter the cloned directory, and then build via CMake.
cmake -S "$(pwd)" -B <directory-to-build-in> -DBUILD_FRONTENDS=ON
cmake --build <directory-to-build-in> --clean-first -- -j8
Run
<directory-to-build-in>/expmag_scfe -e <instrument-name>
Including in Custom Frontend
To include this driver in a custom frontend, you should ensure the environment
variable MIDASSYS points to your system install and include a snippet in your
CMakeLists.txt similar to the following:
# If the path to the expmag repository is outside of the frontend
# repository, you also need to provide a location for the expmag
# artifacts as a second argument to `add_subdirectory`
# e.g. `./device/expmag`
add_subdirectory(
<path-to-expmag-repository>
)
add_executable(
<frontend-name>
<frontend-code-path-1>
<frontend-code-path-2>
:
)
set_property(
TARGET
<frontend-name>
PROPERTY
CXX_STANDARD 11
)
target_include_directories(
<frontend-name>
PRIVATE
$ENV{MIDASSYS}/drivers
$ENV{MIDASSYS}/include
)
target_link_libraries(
<frontend-name>
expmag
<additional-library-1>
<additional-library-2>
:
)
Languages
C++
95%
C
4.3%
CMake
0.7%