From 6b370d6a7ecdc7c144d3f29372f64deebaa8e582 Mon Sep 17 00:00:00 2001 From: guest Date: Wed, 10 Oct 2007 10:06:36 +0000 Subject: added DAIS debug output git-svn-id: svn+ssh://mecka.net/home/svn/dds@6 c30cbac5-9f56-4f76-8ed5-5c34e48a65ae --- dds_io_sub/diasio.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'dds_io_sub/diasio.cpp') diff --git a/dds_io_sub/diasio.cpp b/dds_io_sub/diasio.cpp index 9209fcb..49dee57 100644 --- a/dds_io_sub/diasio.cpp +++ b/dds_io_sub/diasio.cpp @@ -49,24 +49,30 @@ DIASIO::DIASIO(){ DIASIO::~DIASIO(){ instance--; + + fprintf(stderr, "DECONSTRUCTION OF DAIS\n"); fflush(stderr); + if(instance == 0){ stop_wd = true; pthread_join(watchdog, NULL); - S_AdresseOut -= m_Bereich2; } } void DIASIO::set(TyuInt16 value){ - outw( value, S_AdresseOut ); + fprintf(stderr, "writing: %d -> %x + %x\n", value, m_Bereich2, S_AdresseOut); + fflush(stderr); + outw( value, m_Bereich2 + S_AdresseOut ); + fprintf(stderr, "DONE\n"); fflush(stderr); } TyuInt16 DIASIO::get(){ - return inw( S_AdresseOut ); + return inw( m_Bereich2 + S_AdresseOut ); } void DIASIO::init(){ - S_AdresseOut += m_Bereich2; - + + fprintf(stderr, "INIT DAIS\n"); fflush(stderr); + char a_buffer[17]; pthread_attr_t watchdog_attr; @@ -119,4 +125,5 @@ void DIASIO::init(){ pthread_attr_init(&watchdog_attr); if ( pthread_create(&watchdog, &watchdog_attr, watchDogTriggern, NULL) ) perror("watchdog thread creation failed"); + } -- cgit v1.2.3