From b93bf7c8cffecadb39b2b2d76b3722f67a5f63de Mon Sep 17 00:00:00 2001 From: guest Date: Tue, 23 Oct 2007 15:03:30 +0000 Subject: Test, nur Pegel < 1ms git-svn-id: svn+ssh://mecka.net/home/svn/dds@17 c30cbac5-9f56-4f76-8ed5-5c34e48a65ae --- dds_io_pub/Writer.cpp | 10 ++-- dds_io_pub/diasio.cpp | 4 +- dds_io_sub/.cdtbuild_initial | 51 +++++++++++++++++++ dds_io_sub/.cproject | 119 +++++++++++++++++++++++++++++++++++++++++++ dds_io_sub/.project_initial | 82 +++++++++++++++++++++++++++++ 5 files changed, 261 insertions(+), 5 deletions(-) create mode 100644 dds_io_sub/.cdtbuild_initial create mode 100644 dds_io_sub/.cproject create mode 100644 dds_io_sub/.project_initial diff --git a/dds_io_pub/Writer.cpp b/dds_io_pub/Writer.cpp index f0b16f0..edd61ce 100644 --- a/dds_io_pub/Writer.cpp +++ b/dds_io_pub/Writer.cpp @@ -77,7 +77,7 @@ Writer::svc () struct timespec t_sleep; t_sleep.tv_sec = 0; - t_sleep.tv_nsec = 10000; + t_sleep.tv_nsec = 5000; IOTest::Port port_obj; ::DDS::InstanceHandle_t handle = port_dw->_cxx_register (port_obj); @@ -97,6 +97,8 @@ Writer::svc () lastval = actval; port_obj.value = actval; + + //std::cout<<"new: "<write(port_obj, handle); @@ -108,11 +110,11 @@ Writer::svc () if (ret == ::DDS::RETCODE_TIMEOUT) timeout_writes_ ++; - } + } - nanosleep(&t_sleep, NULL); + nanosleep(&t_sleep, NULL); - //cout<<".\n"; + //cout<<".\n"; } } catch (CORBA::Exception& e) { diff --git a/dds_io_pub/diasio.cpp b/dds_io_pub/diasio.cpp index 3e2ca02..f45392a 100644 --- a/dds_io_pub/diasio.cpp +++ b/dds_io_pub/diasio.cpp @@ -68,7 +68,9 @@ void DIASIO::set(TyuInt16 value){ TyuInt16 DIASIO::get(){ iopl( 3 ); - return inw( m_Bereich2 + S_AdresseOut ); + TyuInt16 value = inw( m_Bereich2 + S_AdresseIn ); + //fprintf(stderr, "value: %d\n", value); fflush(stderr); + return value; } void DIASIO::init(){ diff --git a/dds_io_sub/.cdtbuild_initial b/dds_io_sub/.cdtbuild_initial new file mode 100644 index 0000000..d2e6110 --- /dev/null +++ b/dds_io_sub/.cdtbuild_initial @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dds_io_sub/.cproject b/dds_io_sub/.cproject new file mode 100644 index 0000000..0420cbd --- /dev/null +++ b/dds_io_sub/.cproject @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dds_io_sub/.project_initial b/dds_io_sub/.project_initial new file mode 100644 index 0000000..1228d10 --- /dev/null +++ b/dds_io_sub/.project_initial @@ -0,0 +1,82 @@ + + + dds_io_sub + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + ?name? + + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.buildLocation + ${workspace_loc:/dds_io_sub/Debug} + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + + -- cgit v1.2.3