Bugfix in using lasp_lib code in the C++ code of device in debug mode

This commit is contained in:
Anne de Jong 2022-01-02 21:24:08 +01:00
parent b570b4ba18
commit 8fee46a41f
4 changed files with 17 additions and 3 deletions

View File

@ -29,6 +29,7 @@ int getTracerLevel() {
int TRACERNAME; int TRACERNAME;
static us ASCEE_FN_LEVEL = 0; static us ASCEE_FN_LEVEL = 0;
/* setTracerLevel and getTracerLevel are defined as macros in /* setTracerLevel and getTracerLevel are defined as macros in
* tracer.h */ * tracer.h */
#endif #endif

View File

@ -13,6 +13,9 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
static inline void clearScreen() { static inline void clearScreen() {
printf("\033c\n"); printf("\033c\n");
@ -228,5 +231,8 @@ void uvartrace_impl(const char* pos,int line,const char* varname,size_t var);
#endif // ######################################## TRACER ==1 #endif // ######################################## TRACER ==1
#ifdef __cplusplus
}
#endif
#endif // LASP_TRACER_H #endif // LASP_TRACER_H
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -28,7 +28,7 @@ foreach(cython_file lasp_daq lasp_deviceinfo lasp_daqconfig)
cython_add_module(${cython_file} ${cython_file}.pyx) cython_add_module(${cython_file} ${cython_file}.pyx)
target_link_libraries(${cython_file} cpp_daq ${cpp_daq_linklibs}) target_link_libraries(${cython_file} cpp_daq ${cpp_daq_linklibs} lasp_lib)
endforeach() endforeach()

View File

@ -1,4 +1,6 @@
#include "lasp_cppuldaq.h" #include "lasp_cppuldaq.h"
#include "lasp_config.h"
#include "lasp_tracer.h"
#include <atomic> #include <atomic>
#include <cassert> #include <cassert>
#include <chrono> #include <chrono>
@ -526,6 +528,8 @@ Daq *createUlDaqDevice(const DeviceInfo &devinfo,
void fillUlDaqDeviceInfo(vector<DeviceInfo> &devinfolist) { void fillUlDaqDeviceInfo(vector<DeviceInfo> &devinfolist) {
fsTRACE(15);
UlError err; UlError err;
unsigned int numdevs = MAX_DEV_COUNT_PER_API; unsigned int numdevs = MAX_DEV_COUNT_PER_API;
@ -535,8 +539,9 @@ void fillUlDaqDeviceInfo(vector<DeviceInfo> &devinfolist) {
err = ulGetDaqDeviceInventory(interfaceType, devdescriptors,static_cast<unsigned*>(&numdevs)); err = ulGetDaqDeviceInventory(interfaceType, devdescriptors,static_cast<unsigned*>(&numdevs));
if (err != ERR_NO_ERROR) if (err != ERR_NO_ERROR) {
throw std::runtime_error("UlDaq device inventarization failed"); throw std::runtime_error("UlDaq device inventarization failed");
}
for (unsigned i = 0; i < numdevs; i++) { for (unsigned i = 0; i < numdevs; i++) {
@ -604,4 +609,6 @@ void fillUlDaqDeviceInfo(vector<DeviceInfo> &devinfolist) {
devinfolist.push_back(devinfo); devinfolist.push_back(devinfo);
} }
} }
feTRACE(15);
} }