summaryrefslogtreecommitdiff
path: root/dds_io_sub/diasio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dds_io_sub/diasio.cpp')
-rw-r--r--dds_io_sub/diasio.cpp17
1 files changed, 12 insertions, 5 deletions
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");
+
}