Index: /osgVisual/trunk/CMakeLists.txt
===================================================================
--- /osgVisual/trunk/CMakeLists.txt	(revision 182)
+++ /osgVisual/trunk/CMakeLists.txt	(revision 183)
@@ -195,4 +195,10 @@
 
 # Module cluster
+SET(SOURCES
+	${SOURCES}
+	include/cluster/dataIO_cluster.h
+	include/cluster/dataIO_clusterDummy.h
+	src/cluster/dataIO_clusterDummy.cpp
+)
 SET(USE_CLUSTER_ASIO_TCP_IOSTREAM OFF CACHE BOOL "Enable to use the Boost ASIO TCP iostream implementation for the cluster interface")
 SET(USE_CLUSTER_ENET ON CACHE BOOL "Enable to use the ENet reliable UDP library implementation for the cluster interface")
@@ -200,5 +206,4 @@
 		SET(SOURCES
 			${SOURCES}
-			include/cluster/dataIO_cluster.h
 			include/cluster/dataIO_clusterAsioTcpIostream.h
 			src/cluster/dataIO_clusterAsioTcpIostream.cpp
@@ -218,5 +223,4 @@
 		SET(SOURCES
 			${SOURCES}
-			include/cluster/dataIO_cluster.h
 			include/cluster/dataIO_clusterENet.h
 			src/cluster/dataIO_clusterENet.cpp
@@ -242,17 +246,8 @@
 			include/cluster/enet/win32.h
 		)
-		ADD_DEFINITIONS( "-DUSE_CLUSTER_ENET" )
-		
-ENDIF()
-
-IF(NOT USE_CLUSTER_ASIO_TCP_IOSTREAM AND NOT USE_CLUSTER_ENET)
-		SET(SOURCES
-			${SOURCES}
-			include/cluster/dataIO_cluster.h
-			include/cluster/dataIO_clusterDummy.h
-			src/cluster/dataIO_clusterDummy.cpp
-		)
-		ADD_DEFINITIONS( "-DUSE_CLUSTER_DUMMY" )
-ENDIF()
+		ADD_DEFINITIONS( "-DUSE_CLUSTER_ENET" )	
+ENDIF()
+
+
 
 
@@ -260,4 +255,6 @@
 SET(SOURCES
 	${SOURCES}
+	include/extLink/dataIO_extLinkDummy.h
+	src/extLink/dataIO_extLinkDummy.cpp
 	include/extLink/dataIO_extLink.h
 	include/extLink/manip_extLink.h
@@ -277,20 +274,10 @@
 		#Linking: VCL uses #pragma to link, no need for linking configuration in CMAKE
 	ELSE(USE_EXTLINK_VCL)
-		SET(SOURCES
-			${SOURCES}
-			include/extLink/dataIO_extLinkDummy.h
-			src/extLink/dataIO_extLinkDummy.cpp
-		)
 		UNSET(EXTLINK_VCL_INCLUDE_DIR CACHE)
-		ADD_DEFINITIONS( "-DUSE_EXTLINK_DUMMY" )
 	ENDIF(USE_EXTLINK_VCL)
 ELSE(WIN32)
 	UNSET(EXTLINK_VCL_INCLUDE_DIR CACHE)
-	SET(SOURCES
-		${SOURCES}
-		include/extLink/dataIO_extLinkDummy.h
-		src/extLink/dataIO_extLinkDummy.cpp
-	)
-	ADD_DEFINITIONS( "-DUSE_EXTLINK_DUMMY" )
+
+
 ENDIF(WIN32)
 
Index: /osgVisual/trunk/bin/osgVisualConfig.xml
===================================================================
--- /osgVisual/trunk/bin/osgVisualConfig.xml	(revision 182)
+++ /osgVisual/trunk/bin/osgVisualConfig.xml	(revision 183)
@@ -16,17 +16,22 @@
     <!-- optional: <blendmap filename="blendmap.png"></blendmap> to set blendmap independend from channel map -->
   </module>
+ 
   <module name="sky_silverlining" enabled="yes"></module>
+
   <module name="vista2d" enabled="yes">
     <vista2d filename="D:\osgVisual\osgVisual\bin\altimeterSimple.v" paintBackground="no" position_x="1" position_y="1" zoom="1.0" playanimation="yes"></vista2d>
   </module>
+
   <module name="dataio" enabled="yes">
     <!-- XML configuration of the module "dataIO" 
+        The parameter "enabled" is ignored, because dataIO is mandatory for the visual system to place object etc.
+        
         Available clusterroles:
         master: This role recieves all relevant information via the extLink implementation and sends it via cluster implementation to the slave nodes.
         slave: This role recieves all relevant rendering information via the cluster implementation.
-        standalone: This role recieves all relevant data via the extLink and renders it. No cluster functionality is used.
+        standalone: This role recieves all relevant data via the extLink and renders it. No cluster functionality is used.    
     -->
     <dataio clusterrole="standalone"></dataio>
-    <cluster implementation="enet" master_ip="10.10.10.10" port="1234" use_zlib_compressor="yes" ></cluster>
+    <cluster implementation="enet" hardsync="yes" master_ip="10.10.10.10" port="1234" use_zlib_compressor="yes" ></cluster>
     <extlink implementation="vcl" filename="osgVisual.xml"></extlink>
   </module>
Index: /osgVisual/trunk/include/cluster/dataIO_cluster.h
===================================================================
--- /osgVisual/trunk/include/cluster/dataIO_cluster.h	(revision 182)
+++ /osgVisual/trunk/include/cluster/dataIO_cluster.h	(revision 183)
@@ -22,4 +22,9 @@
 
 #include "dataIO_transportContainer.h"
+
+// XML Parser
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
 
 
@@ -48,5 +53,5 @@
 	 * 
 	 */ 
-	dataIO_cluster() {}
+	dataIO_cluster():hardSync(false) {}
 
 	/**
@@ -61,7 +66,7 @@
 	 * 
 	 */ 
-	virtual void init( osg::ArgumentParser& arguments_, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ ) = 0;
+ 	virtual bool init( xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_) = 0;
 
-	void enableHardSync(bool hardSync_){hardSync=hardSync_;};
+	virtual bool processXMLConfiguration(xmlNode* clusterConfig_) = 0;
 	
 	bool isHardSyncEnabled(){return hardSync;};
@@ -127,4 +132,5 @@
 	int port;
 	bool hardSync;
+	bool compressionEnabled; // to indicate if OSGs compression alorithm should be used.
 
 	/**
Index: /osgVisual/trunk/include/cluster/dataIO_clusterDummy.h
===================================================================
--- /osgVisual/trunk/include/cluster/dataIO_clusterDummy.h	(revision 182)
+++ /osgVisual/trunk/include/cluster/dataIO_clusterDummy.h	(revision 183)
@@ -38,9 +38,10 @@
 	virtual ~dataIO_clusterDummy(void);
 
-	void init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ );
+	bool init(xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_);
+	bool processXMLConfiguration(xmlNode* clusterConfig_);
 	void shutdown();
 
 	void init();
-	bool sendTO_OBJvaluesToSlaves();
+	bool sendTO_OBJvaluesToSlaves(osg::Matrixd viewMatrix_);
 	bool readTO_OBJvaluesFromMaster();
 	void reportAsReadyToSwap();
Index: /osgVisual/trunk/include/cluster/dataIO_clusterENet.h
===================================================================
--- /osgVisual/trunk/include/cluster/dataIO_clusterENet.h	(revision 182)
+++ /osgVisual/trunk/include/cluster/dataIO_clusterENet.h	(revision 183)
@@ -44,5 +44,6 @@
 	virtual ~dataIO_clusterENet(void);
 
-	void init( osg::ArgumentParser& arguments_, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ );
+	bool init(xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_);
+	bool processXMLConfiguration(xmlNode* clusterConfig_);
 	void shutdown();
 
Index: /osgVisual/trunk/include/dataIO/visual_dataIO.h
===================================================================
--- /osgVisual/trunk/include/dataIO/visual_dataIO.h	(revision 182)
+++ /osgVisual/trunk/include/dataIO/visual_dataIO.h	(revision 183)
@@ -26,4 +26,5 @@
 
 // Cluster
+#include <dataIO_clusterDummy.h>
 #ifdef USE_CLUSTER_ASIO_TCP_IOSTREAM
 	#include <dataIO_clusterAsioTcpIostream.h>
@@ -32,13 +33,10 @@
 	#include <dataIO_clusterENet.h>
 #endif
-#ifdef USE_CLUSTER_DUMMY
-	#include <dataIO_clusterDummy.h>
-#endif
+	
+
 
 
 //ExtLink 
-#ifdef USE_EXTLINK_DUMMY
-	#include <dataIO_extLinkDummy.h>
-#endif
+#include <dataIO_extLinkDummy.h>
 #ifdef USE_EXTLINK_VCL
 	#include <dataIO_extLinkVCL.h>
@@ -135,5 +133,5 @@
 	 * @return : True if parsing was successful.
 	 */ 
-	bool processXMLConfiguration(); 
+	bool processXMLConfiguration(xmlNode* extLinkConfig_); 
 
 	/**
Index: /osgVisual/trunk/src/cluster/dataIO_clusterDummy.cpp
===================================================================
--- /osgVisual/trunk/src/cluster/dataIO_clusterDummy.cpp	(revision 182)
+++ /osgVisual/trunk/src/cluster/dataIO_clusterDummy.cpp	(revision 183)
@@ -29,8 +29,15 @@
 }
 
-void dataIO_clusterDummy::init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ )
+bool dataIO_clusterDummy::init(xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_)
 {
 	sendContainer = sendContainer_;
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy init();" << std::endl;
+	return true;
+}
+
+bool dataIO_clusterDummy::processXMLConfiguration(xmlNode* clusterConfig_)
+{
+	OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy processXMLConfiguration();" << std::endl;
+	return true;
 }
 
@@ -40,5 +47,5 @@
 }
 
-bool dataIO_clusterDummy::sendTO_OBJvaluesToSlaves()
+bool dataIO_clusterDummy::sendTO_OBJvaluesToSlaves(osg::Matrixd viewMatrix_)
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy sendTO_OBJvaluesToSlaves()" << std::endl;
Index: /osgVisual/trunk/src/cluster/dataIO_clusterENet.cpp
===================================================================
--- /osgVisual/trunk/src/cluster/dataIO_clusterENet.cpp	(revision 182)
+++ /osgVisual/trunk/src/cluster/dataIO_clusterENet.cpp	(revision 183)
@@ -35,6 +35,9 @@
 
 
-void dataIO_clusterENet::init( osg::ArgumentParser& arguments_, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ )
-{
+bool dataIO_clusterENet::init(xmlNode* configurationNode, osgViewer::Viewer* viewer_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool asAscii_)
+{
+	if (!configurationNode || !processXMLConfiguration(configurationNode))
+		return false;
+
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterENet init();" << std::endl;
 	
@@ -56,5 +59,5 @@
 		writeOptionString = "Ascii";
 	}
-	if (compressionEnabled_)
+	if (compressionEnabled)
 		writeOptionString+=" Compressor=zlib";
 	readOptions = new osgDB::Options( readOptionString.c_str() );
@@ -77,12 +80,4 @@
 	if(clusterMode == SLAVE)
 	{
-		// Get the server IP
-		if(!arguments_.read("--server",serverToConnect, port))
-		{
-			// try server discovery
-			//discoverServer(serverToConnect,port);
-			/* todo : implement a udp server discovery based on ASIO */
-		}
-
 		// Init ENet
 		enet_impl->init(dataIO_clusterENet_implementation::CLIENT, port);
@@ -105,7 +100,58 @@
 			initialized = false;
 			std::cout << "Finally failed to establish connection to server " << serverToConnect << std::endl;
-			exit(-1);
+			return false;
 		}
 	}	// IF SLAVE END
+
+	return true;
+}
+
+bool dataIO_clusterENet::processXMLConfiguration(xmlNode* clusterConfig_)
+{
+				// Extract cluster role
+				xmlAttr  *attr = clusterConfig_->properties;
+				while ( attr ) 
+				{ 
+					std::string attr_name=reinterpret_cast<const char*>(attr->name);
+					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+					if( attr_name == "implementation" )
+					{
+						if(attr_value != "enet")
+						{
+							OSG_NOTIFY( osg::ALWAYS ) << "WARNING: Cluster configuration does not match the 'enet' implementation, falling back to clusterDummy" << std::endl;
+							return false;
+						}
+					}
+					if( attr_name == "hardsync" )
+					{
+						if(attr_value == "yes")
+							hardSync = true;
+						else
+							hardSync = false;
+					}
+					if( attr_name == "master_ip" )
+					{
+						serverToConnect = attr_value;
+					}
+					if( attr_name == "port" )
+					{
+						std::istringstream i(attr_value);
+						if (!(i >> port))
+						{
+							OSG_NOTIFY( osg::ALWAYS ) << "WARNING: Cluster configuration : Invalid port number '" << attr_value << "', falling back to clusterDummy" << std::endl;
+							return false;
+						}
+					}
+					if( attr_name == "use_zlib_compressor" )
+					{
+						if(attr_value == "yes")
+							compressionEnabled = true;
+						else
+							compressionEnabled = false;
+					}
+					attr = attr->next; 
+				}	// WHILE attrib END
+
+	return true;
 }
 
Index: /osgVisual/trunk/src/dataIO/visual_dataIO.cpp
===================================================================
--- /osgVisual/trunk/src/dataIO/visual_dataIO.cpp	(revision 182)
+++ /osgVisual/trunk/src/dataIO/visual_dataIO.cpp	(revision 183)
@@ -49,5 +49,5 @@
 void visual_dataIO::init(osgViewer::Viewer* viewer_, osg::ArgumentParser& arguments_, std::string configFileName)
 {
-	OSG_NOTIFY( osg::ALWAYS ) << "visual_dataIO initialize.." << std::endl;
+	OSG_NOTIFY( osg::ALWAYS ) << "visual_dataIO initialize..";
 
 	// Init variables
@@ -56,22 +56,7 @@
 	// Process XML configuration
 	this->configFileName = configFileName;
-	if(!processXMLConfiguration())
+	xmlNode *extLinkConfig=NULL;
+	if(!processXMLConfiguration(extLinkConfig))
 		OSG_FATAL << "ERROR: visual_dataIO::init() - Failed to initialize dataIO via XML configuration!";
-
-
-	// Create Cluster.
-	#ifdef USE_CLUSTER_ASIO_TCP_IOSTREAM
-		cluster = new dataIO_clusterAsioTcpIostream();
-	#endif 
-	#ifdef USE_CLUSTER_ENET
-		cluster = new dataIO_clusterENet();
-		cluster->enableHardSync( false );	/** \todo : rebuild this structure in cluster.h and move it this way to a general implementation. */
-	#endif
-	#ifdef USE_CLUSTER_DUMMY
-		cluster = new dataIO_clusterDummy();
-	#endif
-	if(cluster.valid())
-		//cluster->init(arguments_, clusterMode, slotContainer, true, false);
-		cluster->init(arguments_, viewer_, clusterMode, slotContainer, false, false);
 
 	// Create extLink.
@@ -85,5 +70,4 @@
 
 	
-
 	// Install callbacks to perform DataIO activities every frame:
 	//// EventCallback at the absolute beginning of the frame
@@ -97,5 +81,5 @@
 }
 
-bool visual_dataIO::processXMLConfiguration()
+bool visual_dataIO::processXMLConfiguration(xmlNode* extLinkConfig_)
 {
 	// Init XML
@@ -103,7 +87,10 @@
 	bool disabled;
 	xmlNode* config = util::getModuleXMLConfig( configFileName, "dataio", tmpDoc, disabled );
+	xmlNode* clusterConfig = NULL;
 
 	if( disabled)
 		OSG_NOTIFY( osg::ALWAYS ) << "..disabled by XML configuration file. dataIO can't be disabled. Ignoring." << std::endl;
+	else
+		OSG_NOTIFY( osg::ALWAYS ) << std::endl;
 
 	// extract configuration values
@@ -152,7 +139,7 @@
 			if(cur_node->type == XML_ELEMENT_NODE && node_name == "cluster")
 			{
-				// Check Attributes to determine if the dummy implementation or any other implementation must be instantiated
-
-				// Pass XML attributes to cluster to analyse and configure it by cluster itself
+				// Pass cluster configuration to the used cluster implementation. 
+				// The implementation will use the configuration if it matches, otherwise falls back to dummy cluster
+				clusterConfig = cur_node;
 			}
 
@@ -166,4 +153,21 @@
 
 		}	// FOR all nodes END
+
+
+
+		// Create Cluster.
+		#ifdef USE_CLUSTER_ASIO_TCP_IOSTREAM
+			cluster = new dataIO_clusterAsioTcpIostream();
+		#endif 
+		#ifdef USE_CLUSTER_ENET
+			cluster = new dataIO_clusterENet();
+		#endif
+		if( !cluster.valid() || !clusterConfig || !cluster->init(clusterConfig, viewer, clusterMode, slotContainer, false) )
+		{
+			cluster = new dataIO_clusterDummy();
+			cluster->init(clusterConfig, viewer, clusterMode, slotContainer, false);
+		}
+
+
 
 		// clean up
@@ -176,5 +180,4 @@
 		return false;
 	}
-
 	return true;
 }
Index: /osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp
===================================================================
--- /osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 182)
+++ /osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 183)
@@ -21,5 +21,5 @@
 visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled)
 {
-	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining...";
+	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining..." << std::endl;
 
 	atmosphereInitialized = false;
@@ -41,6 +41,5 @@
 	if( disabled)
 		OSG_NOTIFY( osg::ALWAYS ) << "..disabled by XML configuration file." << std::endl;
-	else
-		OSG_NOTIFY( osg::ALWAYS ) << std::endl;
+ 
 	if(config)
 		xmlFreeDoc(tmpDoc); xmlCleanupParser();
