From a5181b23803f5831d74bfb563c13e261d5b912d6 Mon Sep 17 00:00:00 2001 From: gscalamera <graziano.scalamera@elettra.eu> Date: Fri, 24 May 2024 14:17:03 +0200 Subject: [PATCH] Fix Tango 9.3.x compatibility --- src/AlarmHandler.h | 10 +++++++++- src/SubscribeThread.h | 1 - src/event_table.cpp | 2 -- src/main.cpp | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/AlarmHandler.h b/src/AlarmHandler.h index 5a3eb35..1d96b08 100644 --- a/src/AlarmHandler.h +++ b/src/AlarmHandler.h @@ -61,7 +61,15 @@ class update_thread; # define ELAPSED(before, after) \ 1000.0*(after.tv_sec-before.tv_sec) + \ ((double)after.tv_usec-before.tv_usec) / 1000 - +#ifndef TANGO_LOG +#define TANGO_LOG cout +#endif +#ifndef TANGO_LOG_INFO +#define TANGO_LOG_INFO cout2 +#endif +#ifndef TANGO_LOG_DEBUG +#define TANGO_LOG_DEBUG cout4 +#endif /*----- PROTECTED REGION END -----*/ // AlarmHandler.h diff --git a/src/SubscribeThread.h b/src/SubscribeThread.h index a6ec960..2bb1caf 100644 --- a/src/SubscribeThread.h +++ b/src/SubscribeThread.h @@ -2,7 +2,6 @@ #define _SUBSCRIBE_THREAD_H #include <tango/tango.h> -#include <tango/client/eventconsumer.h> #include <stdint.h> #include "event_table.h" diff --git a/src/event_table.cpp b/src/event_table.cpp index 1b8f46d..5de976d 100644 --- a/src/event_table.cpp +++ b/src/event_table.cpp @@ -12,8 +12,6 @@ #include "AlarmHandler.h" #include "alarm_grammar.h" -//for get_event_system_for_event_id, to know if ZMQ -#include <tango/client/eventconsumer.h> #include <regex> static const char __FILE__rev[] = __FILE__ " $Revision: 1.5 $"; diff --git a/src/main.cpp b/src/main.cpp index adb9bdd..7ac1687 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,6 +43,11 @@ DECLARE_CRASH_HANDLER; +#ifndef TANGO_LOG +#define TANGO_LOG cout +#endif + + int main(int argc,char *argv[]) { using std::endl; -- GitLab