From a6b51fa18745de7a275a4be041e82ef507c07774 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 21 Feb 2012 20:00:56 +0400 Subject: [PATCH] eitd/eitd.h: move name to DMX class; add debug to thread Stop Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d3b8b6e9199677447e258a6831b49abc2d0c2865 Author: [CST] Focus Date: 2012-02-21 (Tue, 21 Feb 2012) --- src/eitd/eitd.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/eitd/eitd.h b/src/eitd/eitd.h index d351b2091..0a07fff37 100644 --- a/src/eitd/eitd.h +++ b/src/eitd/eitd.h @@ -90,7 +90,8 @@ class CSectionThread : public OpenThreads::Thread, public DMX int timeoutsDMX; unsigned timeoutInMSeconds; bool running; - std::string name; + //std::string name; + int event_count; // debug virtual void run() {}; int Sleep(unsigned int timeout) @@ -106,6 +107,7 @@ class CSectionThread : public OpenThreads::Thread, public DMX pthread_mutex_unlock( &start_stop_mutex ); return rs; } + bool addEvents(); public: @@ -114,6 +116,7 @@ class CSectionThread : public OpenThreads::Thread, public DMX static_buf = new uint8_t[MAX_SECTION_LENGTH]; timeoutsDMX = 0; running = false; + event_count = 0; } ~CSectionThread() @@ -131,8 +134,14 @@ class CSectionThread : public OpenThreads::Thread, public DMX { if(!running) return false; +printf("%s::Stop: to lock\n", name.c_str()); + lock(); running = false; +printf("%s::Stop: to broadcast\n", name.c_str()); pthread_cond_broadcast(&change_cond); +printf("%s::Stop: to unlock\n", name.c_str()); + unlock(); +printf("%s::Stop: to close\n", name.c_str()); DMX::closefd(); int ret = (OpenThreads::Thread::join() == 0); DMX::close(); @@ -152,6 +161,12 @@ class CCNThread : public CSectionThread void run(); }; +class CSdtThread : public CSectionThread +{ + private: + void run(); +}; + class CTimeThread : public CSectionThread { private: