3 Commits

Author SHA1 Message Date
krieger_j be9afffdd2 fixes submodule bug 2026-03-31 13:45:35 +02:00
krieger_j bf236be121 fixes issue with class driver 2026-02-14 15:21:22 +01:00
krieger_j 81e4d76426 allow compiling agilent_e364xa with lan-gpib communication 2026-02-14 14:56:37 +01:00
5 changed files with 34 additions and 35 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "midas_lan_gpib"]
path = midas_lan_gpib
url = git@gitea.psi.ch:lin-midas-drivers/midas_lan_gpib.git
+21 -27
View File
@@ -20,16 +20,16 @@ option(
set(CMAKE_PREFIX_PATH "$ENV{MIDASSYS}")
find_package(Midas REQUIRED)
set(
TCPIP_DRIVER_DIR
$ENV{MIDASSYS}/drivers/bus/tcpip.cxx
CACHE STRING
"path to tcpip driver that should be used"
)
#set(
# TCPIP_DRIVER_DIR
# $ENV{MIDASSYS}/drivers/bus/tcpip.cxx
# CACHE STRING
# "path to tcpip driver that should be used"
#)
set(
DRIVERS
$ENV{MIDASSYS}/drivers/class/multi.cxx
$ENV{MIDASSYS}/drivers/class/generic.cxx
)
set(SYS_LIBS
@@ -39,10 +39,16 @@ set(SYS_LIBS
dl
)
#build midas_lan_gib if not already there
if(NOT TARGET midas_lan_gpib)
add_subdirectory(midas_lan_gpib)
endif()
# Links to libmfe.a and libmidas.a
set(MIDAS_LIBS
midas::mfe
midas::midas
midas_lan_gpib
)
set(LIBS ${SYS_LIBS} ${MIDAS_LIBS})
@@ -50,26 +56,9 @@ set(LIBS ${SYS_LIBS} ${MIDAS_LIBS})
################################################################################
## make tcpip library configurable
################################################################################
if(IS_DIRECTORY ${TCPIP_DRIVER_DIR})
add_subdirectory(
# TODO not sure, should it be a submodule? does it really make sense to
# separate everything?
${TCPIP_DRIVER_DIR} ./bus/tcpip
)
set(
LIBS
${LIBS}
tcpip
)
else()
set(
DRIVERS
${DRIVERS}
${TCPIP_DRIVER_DIR}
)
endif()
# why is this needed?
# 1. bus driver should be independent from device driver
# 2. the tcpip driver is part of midas. What is the reason for a different one?
################################################################################
## Device Library
@@ -81,6 +70,11 @@ add_library(
${DRIVERS}
)
# Compile the device driver for use with GPIB
target_compile_definitions(agilent_e364xa PRIVATE GPIB_SUPPORT)
set_property(
TARGET
agilent_e364xa
+1 -1
View File
@@ -19,7 +19,7 @@
#endif
#define LANGPIB_RECONNECT
// TODO seems like Andrea changed this GPIB stuff a fair bit too
#include "bus/langpib.h"
#include "midas_lan_gpib.h"
#endif
/*
+8 -7
View File
@@ -11,8 +11,8 @@
#include "mfe.h"
#include "bus/tcpip.h"
#include "class/multi.h"
#include "midas_lan_gpib.h"
#include "class/generic.h"
#include "device/agilent_e364xa.h"
@@ -47,7 +47,7 @@ INT event_buffer_size = 10 * 10000;
DEVICE_DRIVER agilent_e364xa_driver[] = {
// { name, *dd, channels, *bd, flags }
{"agilent_e364xa_inp", agilent_e364xa, 4, tcpip, DF_INPUT}};
{"agilent_e364xa", agilent_e364xa, 3, langpib, DF_PRIO_DEVICE}};
/*!
* equipment_common_overwrite:
@@ -59,6 +59,7 @@ DEVICE_DRIVER agilent_e364xa_driver[] = {
* front-end
*/
BOOL equipment_common_overwrite = FALSE;
BOOL verbose = FALSE;
/*******************************************************************************
* Equipment Structure Required by mfe.h
@@ -68,7 +69,7 @@ EQUIPMENT equipment[] = {
{
"Agilent_E364xA_Power_Supply", /* equipment name */
{
177, /* Event ID associated with equipm. */
99, /* Event ID associated with equipm. */
0, /* Trigger mask */
"SYSTEM", /* Event buffer to send events into */
EQ_SLOW, /* equipment type */
@@ -77,7 +78,7 @@ EQUIPMENT equipment[] = {
TRUE, /* Enable flag */
RO_RUNNING |
RO_TRANSITIONS, /* Combination of Read-On flags RO_xxx */
10000, /* Readout interval/Polling time in ms */
60000, /* Readout interval/Polling time in ms */
0, /* Stop run when limit is reached */
0, /* Number of events in super event */
1, /* log history every event */
@@ -85,8 +86,8 @@ EQUIPMENT equipment[] = {
"", /* Frontend name */
"" /* Source file used for user FE */
},
cd_multi_read, /* readout routine */
cd_multi, /* class driver main routine */
cd_gen_read, /* readout routine */
cd_gen, /* class driver main routine */
agilent_e364xa_driver, /* device driver list */
NULL, /* init string */
},
+1
Submodule midas_lan_gpib added at 32cc20d943