From aaed27063f89cca02631b744f5dfd34e30f6db49 Mon Sep 17 00:00:00 2001
From: meini <meini@meini-desktop.ARBEITSGRUPPE>
Date: Wed, 25 Mar 2009 01:45:26 +0100
Subject: full code review & bugfixes

---
 src/History.h             |   40 ----
 src/Makefile.am           |    4 +-
 src/SPP.cc                |    2 +-
 src/SPP.h                 |   52 -----
 src/SPP2.h                |  179 ----------------
 src/awds/History.h        |   40 ++++
 src/awds/MarshalStream.h  |   18 ++-
 src/awds/SPP.h            |   52 +++++
 src/awds/SPP2.h           |  179 ++++++++++++++++
 src/awds/config.h         |   64 ++++++
 src/awds/configVariable.h |  237 +++++++++++++++++++++
 src/config.cc             |  386 +++++++++++++++++++++++++++++++++++
 src/configVariable.h      |  357 --------------------------------
 src/remoteConfig.cc       |  498 ---------------------------------------------
 src/remoteConfig.h        |   65 ------
 src/testmodul.cc          |   24 +-
 src/testmodul.h           |   25 +--
 17 files changed, 1001 insertions(+), 1221 deletions(-)
 delete mode 100644 src/History.h
 delete mode 100644 src/SPP.h
 delete mode 100644 src/SPP2.h
 create mode 100644 src/awds/History.h
 create mode 100644 src/awds/SPP.h
 create mode 100644 src/awds/SPP2.h
 create mode 100644 src/awds/config.h
 create mode 100644 src/awds/configVariable.h
 create mode 100644 src/config.cc
 delete mode 100644 src/configVariable.h
 delete mode 100644 src/remoteConfig.cc
 delete mode 100644 src/remoteConfig.h

diff --git a/src/History.h b/src/History.h
deleted file mode 100644
index 9b56768865bb6cce123ae6315eae0ce63f2ea900..0000000000000000000000000000000000000000
--- a/src/History.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _HISTORY_H__
-#define _HISTORY_H__
-
-#include <gea/API.h>
-#include <gea/Time.h>
-
-template <typename T, unsigned S>
-class History {
-
-    unsigned n;
-    std::pair< gea::AbsTime,T> ring[S];
-    unsigned p;
-public:
-        
-    History() : n(0), p(0) {}
-    
-    void insert(const T& e) {
-	ring[p] = std::make_pair( GEA.lastEventTime, e );
-	p = (p + 1) % S;
-	if (n < S) n++;
-    }
-    
-    bool contains(const T& e) const {
-	for (unsigned i = 0; i != n; ++i) {
-	    if ( ( GEA.lastEventTime - ring[i].first < gea::Duration(5,1) ) && (ring[i].second == e) )
-		return true;
-	}
-	return false;
-    }
-    
-};
-
-
-#endif //HISTORY_H__
-/* This stuff is for emacs
- * Local variables:
- * mode:c++
- * c-basic-offset: 4
- * End:
- */
diff --git a/src/Makefile.am b/src/Makefile.am
index 16b235a1b51110d6a73d95b77bc1f299c9092090..67609d2134b0ad0e2bd59f53dffcdae89ff5f488 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,12 +107,12 @@ topowatch_la_LIBADD = -lgea3 -lgea3-posix
 #remoteConfig_la_LDFLAGS  = $(module_flags)
 #remoteConfig_la_LIBADD = -lgea3 -lgea3-posix
 
-spp_la_SOURCES  = SPP.cc SPP.h SPP2.h History.h
+spp_la_SOURCES  = SPP.cc awds/SPP.h awds/SPP2.h awds/History.h
 spp_la_CPPFLAGS = -DMODULE_NAME=spp $(COMMON_CPPFLAGS)
 spp_la_LDFLAGS  = $(module_flags)
 spp_la_LIBADD = -lgea3 -lgea3-posix 
 
-testmodul_la_SOURCES  = testmodul.cc testmodul.h remoteConfig.cc remoteConfig.h
+testmodul_la_SOURCES  = testmodul.cc testmodul.h config.cc awds/config.h
 testmodul_la_CPPFLAGS = -DMODULE_NAME=testmodul $(COMMON_CPPFLAGS)
 testmodul_la_LDFLAGS  = $(module_flags)
 testmodul_la_LIBADD = -lgea3 -lgea3-posix
diff --git a/src/SPP.cc b/src/SPP.cc
index c2be23a8fd3e42d3ecb5a596bc8cca2db780543d..0ddaa5346baa6d82dc437a45da7baf56fe3113c9 100644
--- a/src/SPP.cc
+++ b/src/SPP.cc
@@ -1,5 +1,5 @@
 
-#include "SPP2.h"
+#include "awds/SPP2.h"
 #include <gea/API.h>
 #include <interf_packettypes.h>
 #include <gea/ObjRepository.h>
diff --git a/src/SPP.h b/src/SPP.h
deleted file mode 100644
index 13ff2334aec5517f397d1d02173df2317a926b09..0000000000000000000000000000000000000000
--- a/src/SPP.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _SPP_H__
-#define _SPP_H__
-
-#include <gea/Time.h>
-#include <awds/MarshalStream.h>
-#include <stdint.h>
-
-
-/* This class provides an interface to the simple push/poll (SPP) 
- * subprotocol. It is some kind of asynchronous RPC mechnisms, but without 
- * the generation of stubs. Instead, simple C-like callbacks are used that
- * use a Marschal-Stream for exchanging parameters.
- */
-
-class SppManager {
-
-public:
-    
-    typedef int  (*spp_request_handler) (void *data, 
-					 ReadMarshalStream*  msIn, WriteMarshalStream* msOut, 
-					 const awds::NodeId& src);
-    
-    typedef int  (*spp_response_handler)(void *data, ReadMarshalStream*  msIn, 
-					 const awds::NodeId& src);
-
-    typedef void (*spp_request_creator) (void *data, WriteMarshalStream* msOut);
-    
-    typedef void (*spp_finished_handler) (void *data);
-
-    virtual ~SppManager() {}
-    
-    virtual void registerHandler( uint32_t _spp_id, void * data, spp_request_handler handler) = 0;
-    
-    virtual int sendRequest( const awds::NodeId& dest, uint32_t spp_id, 
-			     void * data1, spp_request_creator  h1,
-			     void * data2, spp_response_handler h2) = 0;
-    
-    virtual int sendRequestAll(  uint32_t spp_id, 
-				 void * data1, spp_request_creator  h1,
-				 void * data2, spp_response_handler h2,
-				 void * data3, spp_finished_handler h3) = 0;
-    
-};
-
-
-#endif //SPP_H__
-/* This stuff is for emacs
- * Local variables:
- * mode:c++
- * c-basic-offset: 4
- * End:
- */
diff --git a/src/SPP2.h b/src/SPP2.h
deleted file mode 100644
index 62db8c5438112561c75130762e8d63606f60b993..0000000000000000000000000000000000000000
--- a/src/SPP2.h
+++ /dev/null
@@ -1,179 +0,0 @@
-#ifndef _SPP2_H__
-#define _SPP2_H__
-
-#include <map>
-#include <awds/routing.h>
-#include <gea/Time.h>
-#include <gea/Blocker.h>
-#include "History.h"
-#include <vector>
-
-#include "SPP.h" 
-
-using namespace std;
-using namespace awds;
-using namespace gea;
-
-class SppManager2 : public SppManager {
-
-public:
-    
-    
-    struct SppHandlerEntry {
-	
-	uint32_t spp_id;
-	
-	spp_request_handler h;
-	void * data;
-    };
-
-    enum SppPacketType {
-	SppTypeRequest     = 0,
-	SppTypeResponse    = 1,
-	SppTypeResponseAck = 2
-    };
-
-    struct SppPendingPacket {
-	SppManager2 *manager;
-	
-	SppPendingPacket *next;
-	
-	enum SppPacketType packetType;
-	awds::NodeId dest;
-	uint32_t seq;
-	uint32_t spp_id;
-	
-	void *payload;
-	unsigned payloadSize;
-
-	gea::Blocker blocker;
-	
-	bool pending;
-	bool canCleanup;
-	int retransmitCounter;
-	int broadcastLimit;
-	gea::Duration retransmitTimeout;
-	gea::Duration bcRetransmitTimeout;
-	
-	SppPendingPacket(SppManager2 *manager);
-	void setPacketToRetransmit(class awds::UnicastPacket& uniP);
-	virtual void retriesExceeded();
-	virtual ~SppPendingPacket();
-
-	static void retransmitRequest(class gea::Handle *, gea::AbsTime t, void *data);
-	
-    };
-    
-    struct SppRequest : 
-	public SppPendingPacket 
-    {
-	
-		
-	void * data;
-	spp_response_handler handler;
-	
-	SppRequest(SppManager2 *manager);
-	virtual void retriesExceeded();
-	
-	virtual ~SppRequest();
-    };
-    
-    struct SppAllIterator {
-	
-	SppManager2 * const manager;
-	const uint32_t spp_id;
-	void * const data;
-	void * const data2;
-	const spp_response_handler response_handler;
-	const spp_finished_handler finished_handler;
-	
-	char payload[2048];
-	unsigned payloadSize;
-	
-	
-	
-	vector<awds::NodeId> allNodes;
-	
-	SppAllIterator(SppManager2 *m,
-		       uint32_t id,
-		       void *d,  spp_response_handler h, 
-		       void *d2, spp_finished_handler h2 ) :
-	    manager(m), 
-	    spp_id(id),
-	    data(d),
-	    data2(d2),
-	    response_handler(h),
-	    finished_handler(h2)
-	{}
-	
-	static int my_response_handler (void *data, ReadMarshalStream*  msIn, 
-					const awds::NodeId& src);
-	
-	static void create_request(void *data, WriteMarshalStream* msOut);
-	
-	void askNextNode();
-	
-    };
-    
-    typedef SppPendingPacket SppResponse;
-    
-    awds::Routing *routing;
-    uint32_t seq;
-    
-    typedef std::map<uint32_t, SppHandlerEntry *> SppHandlers;
-    SppHandlers sppHandlers;
-
-    History< pair<NodeId, uint32_t>, 64 > history;
-    SppRequest  *pendingRequests;
-    SppResponse *pendingResponses;
-    
-    SppManager2(awds::Routing *routing);
-    
-    virtual ~SppManager2() {}
-    
-    virtual void registerHandler( uint32_t _spp_id, void * data, spp_request_handler handler);
-    
-    virtual int sendRequest( const awds::NodeId& dest, uint32_t spp_id, 
-			     void * data1, spp_request_creator  h1,
-			     void * data2, spp_response_handler h2);
-    
-    virtual int sendRequestAll(  uint32_t spp_id, 
-				 void * data1, spp_request_creator  h1,
-				 void * data2, spp_response_handler h2,
-				 void * data3, spp_finished_handler h3);
-    
-    
-    void handleRequest( ReadMarshalStream * rms, 
-			const awds::NodeId& src, 
-			uint32_t spp_id, 
-			uint32_t seq);
-
-    void handleResponse( ReadMarshalStream * rms, 
-			const awds::NodeId& src, 
-			uint32_t spp_id, 
-			uint32_t seq);
-    
-    void handleResponseAck( const awds::NodeId& src, 
-			    uint32_t spp_id, 
-			    uint32_t seq);
-    
-    
-    void cleanPendingPackets();
-    
-    static void packet_recv_uc(awds::BasePacket *p, void *data);
-    static void packet_recv_bc(awds::BasePacket *p, void *data);
-    
-    void packet_recv(const NodeId& src, ReadMarshalStream &rms);
-    
-};
-
-
-
-
-#endif //SPP2_H__
-/* This stuff is for emacs
- * Local variables:
- * mode:c++
- * c-basic-offset: 4
- * End:
- */
diff --git a/src/awds/History.h b/src/awds/History.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b56768865bb6cce123ae6315eae0ce63f2ea900
--- /dev/null
+++ b/src/awds/History.h
@@ -0,0 +1,40 @@
+#ifndef _HISTORY_H__
+#define _HISTORY_H__
+
+#include <gea/API.h>
+#include <gea/Time.h>
+
+template <typename T, unsigned S>
+class History {
+
+    unsigned n;
+    std::pair< gea::AbsTime,T> ring[S];
+    unsigned p;
+public:
+        
+    History() : n(0), p(0) {}
+    
+    void insert(const T& e) {
+	ring[p] = std::make_pair( GEA.lastEventTime, e );
+	p = (p + 1) % S;
+	if (n < S) n++;
+    }
+    
+    bool contains(const T& e) const {
+	for (unsigned i = 0; i != n; ++i) {
+	    if ( ( GEA.lastEventTime - ring[i].first < gea::Duration(5,1) ) && (ring[i].second == e) )
+		return true;
+	}
+	return false;
+    }
+    
+};
+
+
+#endif //HISTORY_H__
+/* This stuff is for emacs
+ * Local variables:
+ * mode:c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/src/awds/MarshalStream.h b/src/awds/MarshalStream.h
index 43768b5b56dc17e4dfb5e00d93c8a9909bc81e1c..34dc869bc4f8e268bcc987dabf8c27bb5f93e7d4 100644
--- a/src/awds/MarshalStream.h
+++ b/src/awds/MarshalStream.h
@@ -71,14 +71,21 @@ struct ReadMarshalStream {
 	return *this;
     }
 
-
-
     ReadMarshalStream& operator >> (std::pair<void *, unsigned> v) {
 	memcpy( v.first, start+size, v.second);
 	size += v.second;
 	return *this;
     }
 
+    inline  ReadMarshalStream& operator >> (std::string &v) {
+	uint32_t s_size;
+	*this >> s_size;
+	char data[s_size];
+	memcpy(data, start+size, s_size);
+	size += s_size;
+	v = std::string(data, s_size);
+	return *this;
+    }
 
 };
 
@@ -155,6 +162,13 @@ public:
 	return *this;
     }
 
+    inline WriteMarshalStream& operator <<(const std::string &v) {
+	*this << (uint32_t) v.size();
+	memcpy(start+size, v.data(), v.size());
+	size += v.size();
+	return *this;
+    }
+
     size_t getStreamSize() const { return this->size; }
 
     void storePacketSize() {
diff --git a/src/awds/SPP.h b/src/awds/SPP.h
new file mode 100644
index 0000000000000000000000000000000000000000..13ff2334aec5517f397d1d02173df2317a926b09
--- /dev/null
+++ b/src/awds/SPP.h
@@ -0,0 +1,52 @@
+#ifndef _SPP_H__
+#define _SPP_H__
+
+#include <gea/Time.h>
+#include <awds/MarshalStream.h>
+#include <stdint.h>
+
+
+/* This class provides an interface to the simple push/poll (SPP) 
+ * subprotocol. It is some kind of asynchronous RPC mechnisms, but without 
+ * the generation of stubs. Instead, simple C-like callbacks are used that
+ * use a Marschal-Stream for exchanging parameters.
+ */
+
+class SppManager {
+
+public:
+    
+    typedef int  (*spp_request_handler) (void *data, 
+					 ReadMarshalStream*  msIn, WriteMarshalStream* msOut, 
+					 const awds::NodeId& src);
+    
+    typedef int  (*spp_response_handler)(void *data, ReadMarshalStream*  msIn, 
+					 const awds::NodeId& src);
+
+    typedef void (*spp_request_creator) (void *data, WriteMarshalStream* msOut);
+    
+    typedef void (*spp_finished_handler) (void *data);
+
+    virtual ~SppManager() {}
+    
+    virtual void registerHandler( uint32_t _spp_id, void * data, spp_request_handler handler) = 0;
+    
+    virtual int sendRequest( const awds::NodeId& dest, uint32_t spp_id, 
+			     void * data1, spp_request_creator  h1,
+			     void * data2, spp_response_handler h2) = 0;
+    
+    virtual int sendRequestAll(  uint32_t spp_id, 
+				 void * data1, spp_request_creator  h1,
+				 void * data2, spp_response_handler h2,
+				 void * data3, spp_finished_handler h3) = 0;
+    
+};
+
+
+#endif //SPP_H__
+/* This stuff is for emacs
+ * Local variables:
+ * mode:c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/src/awds/SPP2.h b/src/awds/SPP2.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d1f37b9a621162d06773b66bf6a5416aa99d1d5
--- /dev/null
+++ b/src/awds/SPP2.h
@@ -0,0 +1,179 @@
+#ifndef _SPP2_H__
+#define _SPP2_H__
+
+#include <map>
+#include <awds/routing.h>
+#include <gea/Time.h>
+#include <gea/Blocker.h>
+#include "History.h"
+#include <vector>
+
+#include "awds/SPP.h" 
+
+using namespace std;
+using namespace awds;
+using namespace gea;
+
+class SppManager2 : public SppManager {
+
+public:
+    
+    
+    struct SppHandlerEntry {
+	
+	uint32_t spp_id;
+	
+	spp_request_handler h;
+	void * data;
+    };
+
+    enum SppPacketType {
+	SppTypeRequest     = 0,
+	SppTypeResponse    = 1,
+	SppTypeResponseAck = 2
+    };
+
+    struct SppPendingPacket {
+	SppManager2 *manager;
+	
+	SppPendingPacket *next;
+	
+	enum SppPacketType packetType;
+	awds::NodeId dest;
+	uint32_t seq;
+	uint32_t spp_id;
+	
+	void *payload;
+	unsigned payloadSize;
+
+	gea::Blocker blocker;
+	
+	bool pending;
+	bool canCleanup;
+	int retransmitCounter;
+	int broadcastLimit;
+	gea::Duration retransmitTimeout;
+	gea::Duration bcRetransmitTimeout;
+	
+	SppPendingPacket(SppManager2 *manager);
+	void setPacketToRetransmit(class awds::UnicastPacket& uniP);
+	virtual void retriesExceeded();
+	virtual ~SppPendingPacket();
+
+	static void retransmitRequest(class gea::Handle *, gea::AbsTime t, void *data);
+	
+    };
+    
+    struct SppRequest : 
+	public SppPendingPacket 
+    {
+	
+		
+	void * data;
+	spp_response_handler handler;
+	
+	SppRequest(SppManager2 *manager);
+	virtual void retriesExceeded();
+	
+	virtual ~SppRequest();
+    };
+    
+    struct SppAllIterator {
+	
+	SppManager2 * const manager;
+	const uint32_t spp_id;
+	void * const data;
+	void * const data2;
+	const spp_response_handler response_handler;
+	const spp_finished_handler finished_handler;
+	
+	char payload[2048];
+	unsigned payloadSize;
+	
+	
+	
+	vector<awds::NodeId> allNodes;
+	
+	SppAllIterator(SppManager2 *m,
+		       uint32_t id,
+		       void *d,  spp_response_handler h, 
+		       void *d2, spp_finished_handler h2 ) :
+	    manager(m), 
+	    spp_id(id),
+	    data(d),
+	    data2(d2),
+	    response_handler(h),
+	    finished_handler(h2)
+	{}
+	
+	static int my_response_handler (void *data, ReadMarshalStream*  msIn, 
+					const awds::NodeId& src);
+	
+	static void create_request(void *data, WriteMarshalStream* msOut);
+	
+	void askNextNode();
+	
+    };
+    
+    typedef SppPendingPacket SppResponse;
+    
+    awds::Routing *routing;
+    uint32_t seq;
+    
+    typedef std::map<uint32_t, SppHandlerEntry *> SppHandlers;
+    SppHandlers sppHandlers;
+
+    History< pair<NodeId, uint32_t>, 64 > history;
+    SppRequest  *pendingRequests;
+    SppResponse *pendingResponses;
+    
+    SppManager2(awds::Routing *routing);
+    
+    virtual ~SppManager2() {}
+    
+    virtual void registerHandler( uint32_t _spp_id, void * data, spp_request_handler handler);
+    
+    virtual int sendRequest( const awds::NodeId& dest, uint32_t spp_id, 
+			     void * data1, spp_request_creator  h1,
+			     void * data2, spp_response_handler h2);
+    
+    virtual int sendRequestAll(  uint32_t spp_id, 
+				 void * data1, spp_request_creator  h1,
+				 void * data2, spp_response_handler h2,
+				 void * data3, spp_finished_handler h3);
+    
+    
+    void handleRequest( ReadMarshalStream * rms, 
+			const awds::NodeId& src, 
+			uint32_t spp_id, 
+			uint32_t seq);
+
+    void handleResponse( ReadMarshalStream * rms, 
+			const awds::NodeId& src, 
+			uint32_t spp_id, 
+			uint32_t seq);
+    
+    void handleResponseAck( const awds::NodeId& src, 
+			    uint32_t spp_id, 
+			    uint32_t seq);
+    
+    
+    void cleanPendingPackets();
+    
+    static void packet_recv_uc(awds::BasePacket *p, void *data);
+    static void packet_recv_bc(awds::BasePacket *p, void *data);
+    
+    void packet_recv(const NodeId& src, ReadMarshalStream &rms);
+    
+};
+
+
+
+
+#endif //SPP2_H__
+/* This stuff is for emacs
+ * Local variables:
+ * mode:c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/src/awds/config.h b/src/awds/config.h
new file mode 100644
index 0000000000000000000000000000000000000000..2af0ac724c7b090101bc6bade4ab28590f9c0f21
--- /dev/null
+++ b/src/awds/config.h
@@ -0,0 +1,64 @@
+#ifndef _CONFIG_H__
+#define _CONFIG_H__
+
+#include <awds/ext/Shell.h>
+#include <awds/MarshalStream.h>
+#include "awds/configVariable.h"
+
+class Config
+{
+
+private:
+	ostream *shellOut;
+	ShellClient* shellClient;
+	int requestCount;
+
+protected:
+
+	std::map<const char*, ConfigVariable* > remoteVariables;
+	std::map<gea::AbsTime,unsigned int> requests;
+	std::map<gea::AbsTime,std::string> response;
+
+	
+public:
+
+
+
+	Config();
+	//int remoteConfigAnnounce(char* name,ConfigVariableType cvt,void* thisref,variableGetHandler vgh,variableSetHandler vsh,void* value=NULL);
+	virtual int registerVar(ConfigVariable* cv);
+	int configAddCommand();
+	static int remoteconfig_command_fn(ShellClient &sc, void *data, int argc, char **argv);
+	static int requestHandler (void *data, ReadMarshalStream*  msIn, WriteMarshalStream* msOut, const awds::NodeId& src);
+	static int responseHandler (void *data, ReadMarshalStream*  msIn, const awds::NodeId& src);
+	static void requestCreator (void *data, WriteMarshalStream* msOut);
+	static void finishedHandler (void *data);
+	unsigned int hexToInt(char* string)
+	{
+		printf("\n\n");
+		unsigned int retval=0;
+		int faktor=1;
+		int length= strlen(string);
+		for (int i=length-1; i>=0; i--)
+		{
+			if(string[i]>64&&string[i]<91)
+			{
+				printf("1:%u|%u| ",string[i]-55,(unsigned int)(string[i]-55)*faktor);
+				retval+=(unsigned int)(string[i]-55)*faktor;
+			}
+			else
+			if(string[i]>47&&string[i]<58)
+			{
+				printf("2:%u|%u|",string[i]-48,(unsigned int)(string[i]-48)*faktor);
+				retval+=(unsigned int)(string[i]-48)*faktor;
+			}
+			faktor*=16;
+			printf("%u|\n",retval);
+		}
+		return retval;
+	}
+
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/awds/configVariable.h b/src/awds/configVariable.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb06d6cf1b7de76dfeca3b9c93ad9ad10eb57aad
--- /dev/null
+++ b/src/awds/configVariable.h
@@ -0,0 +1,237 @@
+#ifndef _CONFIG_VARIABLE_H__
+#define _CONFIG_VARIABLE_H__
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sstream>
+
+enum
+{
+	CONFIG_VARIABLE_SUCCESS  = 0,
+	CONFIG_VARIABLE_FAILURE  = 1,
+	CONFIG_VARIABLE_READONLY = 2,
+	CONFIG_VARIABLE_CACHED = 3,
+	CONFIG_VARIABLE_READ = 4
+};
+
+class ConfigVariable
+{
+
+
+	private:
+	protected:
+		std::string m_name;
+		unsigned int m_namelength;
+		void* m_thisref;
+	public:
+
+		ConfigVariable(const char* name)
+		{
+			m_thisref=NULL;
+			m_name=std::string(name);
+		}
+
+		virtual ~ConfigVariable()
+		{}
+
+		virtual std::string toString()=0;
+		virtual int fromString(std::string)=0;
+
+		const char* getName(){return m_name.c_str();}
+};
+
+class ConfigVariableInt : public ConfigVariable
+{
+	typedef int (*variableSetHandler) (void* classref,const int* value);
+	typedef int (*variableGetHandler) (void* classref,int* value);
+
+	private:
+	protected:
+		variableGetHandler m_vgh;
+		variableSetHandler m_vsh;
+	public:
+
+		ConfigVariableInt(const char* name, variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name)
+		{
+			m_vgh=vgh;
+			m_vsh=vsh;
+			m_thisref=classref;
+		}
+		virtual std::string toString()
+		{
+
+			ostringstream oss(ostringstream::out);
+			int value=0;
+			int retval = m_vgh(m_thisref,&value);
+			if(retval==CONFIG_VARIABLE_SUCCESS)
+			{
+				oss << value;
+  				return oss.str();
+			}
+			return std::string("CONFIG_VARIABLE_FAILURE");
+		}
+		virtual int fromString(std::string s)
+		{
+			int mvalue=strtol(s.c_str(),NULL,10);
+			return m_vsh(m_thisref,&mvalue);
+		}
+};
+
+
+class ConfigVariableString : public ConfigVariable
+{
+
+	typedef int (*variableSetHandler) (void* classref,const char* value);
+	typedef int (*variableGetHandler) (void* classref,char* value);
+	private:
+	protected:
+		variableGetHandler m_vgh;
+		variableSetHandler m_vsh;
+	public:
+
+		ConfigVariableString(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name)
+		{
+			m_vgh=vgh;
+			m_vsh=vsh;
+			m_thisref=classref;
+		}
+		virtual std::string toString()
+		{	
+			//TODO init extern?
+			char buffer[1024];
+			memset(buffer,0,1024);
+			int retval = m_vgh(m_thisref,buffer);
+			if(retval==CONFIG_VARIABLE_SUCCESS)
+			{
+				return std::string(buffer);
+			}
+			return std::string("CONFIG_VARIABLE_FAILURE");//TODO return 0 String?
+		}
+		virtual int fromString(std::string s)
+		{
+			if(s.length()>0)
+				return m_vsh(m_thisref,s.c_str());
+			return CONFIG_VARIABLE_FAILURE;
+			
+		}
+};
+
+
+class ConfigVariableBool : public ConfigVariable
+{
+
+	typedef int (*variableSetHandler) (void* classref,const bool* value);
+	typedef int (*variableGetHandler) (void* classref,bool* value);
+	private:
+	protected:
+		variableGetHandler m_vgh;
+		variableSetHandler m_vsh;
+	public:
+		ConfigVariableBool(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name)
+		{
+			m_vgh=vgh;
+			m_vsh=vsh;
+			m_thisref=classref;
+		}
+		virtual std::string toString()
+		{
+			bool value=false;
+			int retval=m_vgh(m_thisref,&value);
+			if(retval!=CONFIG_VARIABLE_SUCCESS)
+				return std::string("CONFIG_VARIABLE_FAILURE");
+			if(value)
+				return std::string("true");
+			return std::string("false");
+		}
+
+		virtual int fromString(std::string s)
+		{
+			
+			if(!s.compare("true"))
+			{
+				bool mvalue=true;
+				return m_vsh(m_thisref,&mvalue);
+			}
+			bool mvalue=false; //TODO correct to assume false??
+			return m_vsh(m_thisref,&mvalue);
+		}
+};
+
+class ConfigVariableFloat : public ConfigVariable
+{
+
+	typedef int (*variableSetHandler) (void* classref,const float* value);
+	typedef int (*variableGetHandler) (void* classref,float* value);
+
+	private:
+	protected:
+		variableGetHandler m_vgh;
+		variableSetHandler m_vsh;
+	public:
+		ConfigVariableFloat(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name)
+		{
+			m_vgh=vgh;
+			m_vsh=vsh;
+			m_thisref=classref;
+		}
+
+		virtual std::string toString()
+		{
+			ostringstream oss;
+			float value=0;
+			int retval = m_vgh(m_thisref,&value);
+			if(retval==CONFIG_VARIABLE_SUCCESS)
+			{
+				oss << value;
+  				return oss.str();
+			}
+			return std::string("CONFIG_VARIABLE_FAILURE");
+		}
+		virtual int fromString(std::string s)
+		{
+			float mvalue=strtod(s.c_str(),NULL);
+			return m_vsh(m_thisref,&mvalue);
+		}
+};
+
+class ConfigVariableDouble : public ConfigVariable
+{
+	typedef int (*variableSetHandler) (void* classref,const double* value);
+	typedef int (*variableGetHandler) (void* classref,double* value);
+
+	private:
+	protected:
+		variableGetHandler m_vgh;
+		variableSetHandler m_vsh;
+	public:
+
+		ConfigVariableDouble(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name)
+		{
+			m_vgh=vgh;
+			m_vsh=vsh;
+			m_thisref=classref;
+		}
+
+		virtual std::string toString()
+		{
+			ostringstream oss;
+			double value=0;
+			int retval = m_vgh(m_thisref,&value);
+			if(retval==CONFIG_VARIABLE_SUCCESS)
+			{
+				oss << value;
+  				return oss.str();
+			}
+			return std::string("CONFIG_VARIABLE_FAILURE");
+		}
+		virtual int fromString(std::string s)
+		{
+			double mvalue=strtod(s.c_str(),NULL);
+			return m_vsh(m_thisref,&mvalue);
+		}
+		virtual std::string toStdString(){}
+		virtual int fromStdString(std::string){}
+};
+
+
+#endif
\ No newline at end of file
diff --git a/src/config.cc b/src/config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ec11e53e0e44d2b677505696fee74a8cb6fbc434
--- /dev/null
+++ b/src/config.cc
@@ -0,0 +1,386 @@
+
+#include <sstream>
+#include <gea/API.h>
+#include <gea/gea_main.h>
+#include <gea/ObjRepository.h>
+#include <awds/SPP2.h>
+
+#include "awds/config.h"
+
+using namespace std;
+using namespace awds;
+
+#define MAX_MESSAGE_SIZE 2048
+
+struct rcMsgReq
+{
+	uint32_t nameLength;
+	uint32_t valLength;
+	char message[MAX_MESSAGE_SIZE];
+}__attribute__((packed));
+struct rcMsgRes
+{
+	uint32_t status;
+	uint32_t length;
+	char message[MAX_MESSAGE_SIZE];
+}__attribute__((packed));
+
+Config::Config()
+{
+	requestCount=0;
+}
+ /**
+  * \brief	registerVar
+  *
+  *		This function registers the ConfigVariable at the 
+  *		Configuration class
+  *
+  * \param	cv	the ConfigVariable
+  * \return		statuscode
+  *
+  */
+
+int Config::registerVar(ConfigVariable* cv)
+{
+	remoteVariables[cv->getName()]=cv;
+	return 0;
+}
+
+ /**
+  * \brief	requestCreator
+  *
+  *		This function builds/marshals the message to be send to the
+  *		awds Nodes
+  *
+  * \param	data	the data to be processed
+  * \param	msOut	the stream to write to
+  *
+  */
+void Config::requestCreator(void *data, WriteMarshalStream* msOut)
+{
+	REP_MAP_OBJ(Config *,config);//get it, but check on USE!
+
+	if(msOut==NULL)//no stream? useless to walk on!
+	{
+		return;
+	}
+	if(data==NULL)//no data? that is quite strange
+	{
+		int lengthOut=0;
+		*msOut << (uint32_t) lengthOut;
+		return;
+	}
+
+	struct rcMsgReq* rcmo=(struct rcMsgReq*)data;
+
+	if(rcmo->nameLength<1&&rcmo->valLength<1)//0? we just want a list of configmodules!
+	{
+		int lengthOut=0;
+		*msOut << (uint32_t) lengthOut;
+		return;
+	}
+	uint32_t numberOfEntries=0;
+	if(rcmo->nameLength)numberOfEntries++;
+	if(rcmo->valLength)numberOfEntries++;
+	*msOut << numberOfEntries;
+	if(rcmo->nameLength)
+		*msOut << std::string(rcmo->message, rcmo->nameLength);
+	if(rcmo->valLength)
+		*msOut << std::string(rcmo->message+rcmo->nameLength, rcmo->valLength);
+	
+}
+
+static const char *config_cmd_usage =
+    "config [node1,node2,...] <module>.<variable> <value>  \n"
+    " with <nodeN>		hostname	or\n"
+		" with [..]				for all nodes in network\n"
+    " with <module>		the module containing the configuration variable\n"
+    " with <value>		the value to be assigned to the variable\n";
+
+int Config::configAddCommand() {
+
+    ObjRepository& rep = ObjRepository::instance();
+
+    Shell *shell = static_cast<Shell *>(rep.getObj("shell"));
+
+    if (!shell)
+	return -1;
+
+    shell->add_command("rc", remoteconfig_command_fn, this,
+		       "remote manipulation of all configurations",
+		       config_cmd_usage);
+    return 0;
+}
+
+int Config::remoteconfig_command_fn(ShellClient &sc, void *data, int argc, char **argv)
+{
+	Config *self = static_cast<Config*>(data);
+	self->shellClient = &sc;
+	self->shellOut=sc.sockout;	
+	REP_MAP_OBJ(SppManager2 *,sppManager);
+    	if ( (argc >= 2) )
+	{
+		struct rcMsgReq rcmo;
+		memset(rcmo.message,0,MAX_MESSAGE_SIZE);
+		if(argc>=3)//lets build the request
+		{	
+
+			rcmo.nameLength = strlen(argv[2]);
+			rcmo.valLength=0;
+			memcpy(rcmo.message,argv[2],rcmo.nameLength);
+
+			if(argc==4)
+			{
+				rcmo.valLength = strlen(argv[3]);
+				memcpy(rcmo.message+rcmo.nameLength,argv[3],rcmo.valLength);
+			}
+		}
+		else
+		{
+			rcmo.nameLength=0;
+			rcmo.valLength=0;
+		}
+		if(!strcmp(argv[1], "[..]")) //broadcast
+		{
+			if(self->shellClient!=NULL)
+				if(self->shellClient->state==ShellClient::CS_Idle)
+					self->shellClient->block();
+			gea::AbsTime *t_start = new gea::AbsTime(GEA.lastEventTime);
+			sppManager->sendRequestAll( 9876, (void*) &rcmo, Config::requestCreator, t_start, Config::responseHandler,t_start,Config::finishedHandler);
+		}
+		else // single nodes
+		{
+			if(self->shellClient)
+				if(self->shellClient->state==ShellClient::CS_Idle)
+					self->shellClient->block();
+			int i=0;
+			char *p;
+			char *pch = strtok_r(argv[1],"[,]", &p);
+
+			gea::AbsTime *t_start = new gea::AbsTime(GEA.lastEventTime);
+			char c='9';
+			while (pch != NULL)//we might not need to split them up but to be on the safe side...
+			{
+				
+				awds::NodeId dest;
+			
+				REP_MAP_OBJ(awds::Routing *,awdsRouting);
+				if(awdsRouting)
+				{
+					awdsRouting->getNodeByName(dest,pch);
+					//self->requests[*t_start]=i++;
+					self->requestCount++;
+					sppManager->sendRequest(dest,9876,(void*) &rcmo, Config::requestCreator, &c, Config::responseHandler);
+				}
+				pch = strtok_r(NULL, "[,]", &p);
+			}
+		}
+    	}
+	else
+	{
+		*sc.sockout << config_cmd_usage << endl;
+		return 0;
+    	}
+	return 0;
+}
+ /**
+  * \brief	finishedHandler
+  *
+  *		This function is the callback if the broadcast is complete
+  *
+  * \param	data	the data Provided through the spp call
+  *
+  */
+void Config::finishedHandler (void *data)
+{
+	REP_MAP_OBJ(Config *,config);
+	if(config)
+	{
+		if(config->shellClient)
+			if(config->shellClient->state==ShellClient::CS_Blocked)
+				config->shellClient->unblock();
+	}
+}
+ /**
+  * \brief	registerVar
+  *
+  *		This function handels the responses of the (remote) nodes
+  *
+  * \param	data	the ConfigVariable
+  * \param	msIn	the stream containing the message
+  * \param	src	the Origin of the Message
+  * \return		statuscode
+  *
+  */
+int Config::responseHandler (void *data, ReadMarshalStream*  msIn, const awds::NodeId& src) 
+{
+	printf("blubb1\n");fflush(stdout);
+	REP_MAP_OBJ(Config *,config);//get but we'll check it on USE!
+	if(!config)
+	{
+		GEA.dbg() << "Config::responseHandler Config not found!"<< std::endl;
+		return -1;
+	}
+	if(msIn==NULL)//ouch we need this!
+	{
+		//TODO timeout?
+		config->requestCount--;
+		if(config->shellClient)
+			if(config->shellClient->state==ShellClient::CS_Blocked)
+				config->shellClient->unblock();
+		return -1;
+	}
+
+	uint32_t status;
+	uint32_t count;
+	*msIn >> status;
+	*msIn >> count;
+	config->requestCount--;
+	if(status)//status>0? this is a problem!!
+	{
+		*config->shellOut << "Response from " << src << ". Status>1 Obviously there was an error!" << std::endl;
+		GEA.dbg() << "Response from " << src <<". Status>1 Obviously there was an error!" << std::endl;
+		return CONFIG_VARIABLE_FAILURE;
+	}
+	char* retval;
+
+	if(count>0)//ah we've got a message nice, print it!
+	{
+		*config->shellOut << "Response from " << src <<": " << std::endl;
+		GEA.dbg() << "Response from " << src <<": "<< std::endl;
+		for(int i=0;i<count;i++)
+		{
+			std:string s;
+			*msIn >> s;
+			*config->shellOut << s << std::endl;
+			GEA.dbg() << s << std::endl;
+		}
+	}
+
+	else //no Message? well at least no error!
+	{
+		*config->shellOut << "Response from" << src <<" with no length. Strange but there was no error!" << std::endl;
+		GEA.dbg() << "Response from" << src <<" with no length. Strange but there was no error!" << std::endl;
+	}
+
+	if(config->requestCount==0)
+		if(config->shellClient)
+			config->shellClient->unblock();
+
+	return CONFIG_VARIABLE_SUCCESS;
+}
+ /**
+  * \brief	registerVar
+  *
+  *		This Function Handles the incoming requests 
+  *		reads from msIn und writes the outgoing 
+  *		message to msOut
+  *
+  * \param	data	the data send through the SPP module
+  * \param	msIn	the incoming marshalstream
+  * \param	msOut	the outboing marshalstream
+  * \param	src	the origin of the message
+  * \return		statuscode
+  *
+  */
+int Config::requestHandler (void *data, ReadMarshalStream*  msIn, WriteMarshalStream* msOut, const awds::NodeId& src) 
+{
+	REP_MAP_OBJ(Config *,config);
+	if(msIn==NULL||msOut==NULL)//we definitely need those!
+	{
+		return -1;
+	}
+	if(!config)//we definitely need this one!
+	{
+		uint32_t numStringsOut = 0;
+		uint32_t statusOut = CONFIG_VARIABLE_FAILURE;
+		*msOut << statusOut;
+		*msOut << numStringsOut;
+		return -1;
+	}
+
+
+	uint32_t numberOfStrings;
+	*msIn >> numberOfStrings;
+
+	if(numberOfStrings<1)//no params? well then show me what you've got
+	{
+		uint32_t numberOfEntries = config->remoteVariables.size();;
+		uint32_t status = 0;
+
+		*msOut << status;
+		*msOut << numberOfEntries;
+
+		for(std::map<const char*,ConfigVariable*>::iterator it2=config->remoteVariables.begin();it2!=config->remoteVariables.end();it2++)
+		{
+			*msOut << std::string(it2->first);
+		}
+		return CONFIG_VARIABLE_SUCCESS;
+	}
+	std::string name;
+	std::string value;
+
+	if(numberOfStrings>=1)*msIn>>name;
+	if(numberOfStrings==2)*msIn>>value;
+
+	if(name.length()>0)//we need the modulename AND the variable name
+	{
+		bool found=false;
+		//std::map<const char*,ConfigVariable*>::iterator it = config->remoteVariables.find(name);//why the heck is THIS not working?
+		for(std::map<const char*,ConfigVariable*>::iterator it2=config->remoteVariables.begin();it2!=config->remoteVariables.end();it2++)
+		{
+
+			if(!strcmp(it2->first,name.c_str()))//at least this works but....
+			{
+				found=true;
+				if(value.length()>0)
+				{
+					(it2->second)->fromString(std::string(value));//ok set the values
+					std::string s= (it2->second)->toString();
+					int length=s.size();
+					uint32_t numberOfStringsOut = 1;
+					uint32_t statusOut = 0;
+					*msOut << statusOut;
+					*msOut << numberOfStringsOut;
+					*msOut <<s ;
+				}
+				else //just read the value
+				{
+					std::string s= (it2->second)->toString();
+					uint32_t numberOfStringsOut = 1;
+					uint32_t statusOut = 0;
+					*msOut << statusOut;
+					*msOut << numberOfStringsOut;
+					*msOut << s;
+				}
+			}
+		}
+
+		if(!found)//no modulename configvar found maybe typo?!
+		{
+
+			if(config->shellClient)
+				*config->shellClient->sockout << "Config::requestHandler Request sorry i don't know this one: " << name << std::endl;
+			GEA.dbg() << "Config::requestHandler Request sorry i don't know this one: " << name << std::endl;
+			uint32_t statusOut = CONFIG_VARIABLE_FAILURE;//TODO Maybe send this message back?
+			uint32_t numberOfStringsOut=0;
+
+			*msOut << statusOut;
+			*msOut << numberOfStringsOut;
+			return -1;
+		}
+	}
+	else //TODO this should be obsolet now?
+	{
+		uint32_t statusOut = CONFIG_VARIABLE_FAILURE;
+		*msOut << statusOut;
+		uint32_t numberOfStringsOut=0;
+		*msOut << numberOfStringsOut;
+		if(config->shellClient)
+			*config->shellClient->sockout << "Something went terribly wrong in Config::request_handler :("<< endl;
+ 		GEA.dbg() << "Something went terribly wrong in Config::request_handler :("<< endl;
+		return 0;
+	}
+	return 0;
+}
+
diff --git a/src/configVariable.h b/src/configVariable.h
deleted file mode 100644
index 0810db759c8f4ee4b8450c46922118c322c001bb..0000000000000000000000000000000000000000
--- a/src/configVariable.h
+++ /dev/null
@@ -1,357 +0,0 @@
-#ifndef _CONFIG_VARIABLE_H__
-#define _CONFIG_VARIABLE_H__
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "remoteConfig.h"
-class RemoteConfig;
-
-typedef int (*variableSetHandler) (void* classref,const void* value);
-typedef int (*variableGetHandler) (void* classref,void* value);
-typedef int (*variableBoolSetHandler) (void* classref,const void* value);
-typedef int (*variableBoolGetHandler) (void* classref,void* value);
-typedef int (*variableIntSetHandler) (void* classref,const void* value);
-typedef int (*variableIntGetHandler) (void* classref,void* value);
-typedef int (*variableFloatSetHandler) (void* classref,const void* value);
-typedef int (*variableFloatGetHandler) (void* classref,void* value);
-typedef int (*variableStringSetHandler) (void* classref,const void* value);
-typedef int (*variableStringGetHandler) (void* classref,void* value);
-typedef int (*variableDoubleSetHandler) (void* classref,const void* value);
-typedef int (*variableDoubleGetHandler) (void* classref,void* value);
-
-
-enum
-{
-	CONFIG_VARIABLE_SUCCESS  = 0,
-	CONFIG_VARIABLE_FAILURE  = 1,
-	CONFIG_VARIABLE_READONLY = 2,
-	CONFIG_VARIABLE_CACHED = 3,
-	CONFIG_VARIABLE_READ = 4
-};
-
-class ConfigVariable
-{
-
-
-	private:
-	protected:
-		char* m_name;
-		unsigned int m_namelength;
-
-		variableGetHandler m_vgh;
-		variableSetHandler m_vsh;
-
-		void* m_thisref;
-	public:
-
-		ConfigVariable(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref)
-		{
-			m_vgh=vgh;
-			m_vsh=vsh;	
-			m_thisref=classref;
-			if(name)
-			{
-				int length=strlen(name);
-				m_name = new char[length+1];
-				memcpy(m_name,name,length);
-				m_name[length]=0;
-				m_namelength=length;
-			}
-			else
-			{
-				m_namelength=0;
-				m_name=NULL;
-			}
-		}
-		ConfigVariable(const ConfigVariable &c)
-		{
-			m_vgh=c.m_vgh;
-			m_vsh=c.m_vsh;	
-			m_thisref=c.m_thisref;
-			m_name = new char[c.m_namelength];
-			memcpy(m_name,c.m_name,c.m_namelength);
-			m_namelength=c.m_namelength;
-		}
-
-		virtual ~ConfigVariable()
-		{
-			if(m_name)
-			{
-				delete m_name;
-				m_name=NULL;
-				m_namelength=0;
-			}
-		}
-
-		virtual int get(void* value)
-		{
-			m_vgh(m_thisref,value);
-			return 0;
-
-		}
-		virtual int set(void* value)
-		{
-			m_vsh(m_thisref,value);
-			return 0;
-		}
-		virtual std::string toStdString()=0;
-		virtual int fromStdString(std::string)=0;
-
-		virtual char* toString(char* &buffer)=0;
-		virtual int fromString(const char * value)=0;
-
-		char* getName(){return m_name;}
-};
-
-class ConfigVariableInt : public ConfigVariable
-{
-	private:
-	protected:
-	public:
-		
-		virtual int get(int* value)
-		{
-			m_vgh(m_thisref,value);
-			return 0;
-
-		}
-		virtual int set(int* value)
-		{
-			m_vsh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-
-		ConfigVariableInt(const char* name, variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name,vgh,vsh,classref)
-		{
-			
-		}
-		ConfigVariableInt(const ConfigVariableInt &c): ConfigVariable(c)
-		{
-		}
-
-		virtual char* toString(char* &buffer)
-		{
-			int value=0;
-			memset(buffer,0,1024);
-			int retval = m_vgh(m_thisref,&value);
-			if(retval==CONFIG_VARIABLE_SUCCESS)
-				retval = sprintf(buffer,"%i",value);
-			else
-			{
-				retval = sprintf(buffer,"%s","CONFIG_VARIABLE_FAILURE");
-			}
-			return buffer;
-		}
-		virtual int fromString(const char * value)
-		{
-			int mvalue=atoi(value);
-			m_vsh(m_thisref,&mvalue);
-		}
-		virtual std::string toStdString()
-		{
-			int value=0;
-			int retval = m_vgh(m_thisref,&value);
-			char buffer[1024];
-			if(retval==CONFIG_VARIABLE_SUCCESS)
-				retval = sprintf(buffer,"%i",value);
-			else
-				retval = sprintf(buffer,"%s","CONFIG_VARIABLE_FAILURE");
-			return std::string(buffer);
-		}
-		virtual int fromStdString(std::string s)
-		{
-			int mvalue=atoi(s.c_str());
-			m_vsh(m_thisref,&mvalue);
-		}
-};
-
-
-class ConfigVariableString : public ConfigVariable
-{
-	private:
-	protected:
-	public:
-
-		virtual int get(char* value)
-		{
-			m_vgh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-
-		virtual int set(char* value)
-		{
-			int valueLength = strlen((char*)value);
-			if(valueLength>0)
-			{
-				m_vsh(m_thisref,value);
-			}
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-
-		ConfigVariableString(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name,vgh,vsh,classref)
-		{}
-		ConfigVariableString(const ConfigVariableString &c): ConfigVariable(c)
-		{}
-
-		virtual ~ConfigVariableString()
-		{}
-		virtual char* toString(char* &buffer)
-		{	
-			
-			buffer = new char[1024];
-			memset(buffer,0,1024);
-			m_vgh(m_thisref,buffer);
-			return buffer;
-		}
-		virtual int fromString(const char * value)
-		{
-			int valueLength = strlen(value);
-			
-			if(valueLength>0)
-			{
-				m_vsh(m_thisref,value);
-			}
-			
-		}
-		virtual std::string toStdString(){}
-		virtual int fromStdString(std::string){}
-
-};
-
-
-class ConfigVariableBool : public ConfigVariable
-{
-	private:
-	protected:
-	public:
-
-		virtual int get(bool* value)
-		{
-			m_vgh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-		virtual int set(bool* value)
-		{
-			m_vsh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-
-		ConfigVariableBool(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name,vgh,vsh,classref)
-		{}
-		ConfigVariableBool(const ConfigVariableBool &c): ConfigVariable(c)
-		{}
-
-		virtual char* toString(char* &buffer)
-		{
-			memset(buffer,0,1024);
-			bool value=false;
-			m_vgh(m_thisref,&value);
-			if(value)
-				sprintf(buffer,"true",value);
-			else
-				sprintf(buffer,"false",value);
-			return buffer;
-		}
-
-		virtual int fromString(const char * value)
-		{
-			
-			if(!strcmp("true",value))
-			{
-				bool mvalue=true;
-				m_vsh(m_thisref,&mvalue);
-			}
-			else if(!strcmp("false",value))
-			{
-				bool mvalue=false;
-				m_vsh(m_thisref,&mvalue);
-			}
-			else GEA.dbg() << "ConfigVariableBool: unknown value: "<< value << endl;
-		}
-		virtual std::string toStdString(){}
-		virtual int fromStdString(std::string){}
-};
-
-class ConfigVariableFloat : public ConfigVariable
-{
-	private:
-	protected:
-	public:
-
-		virtual int get(float* value)
-		{
-			m_vgh(m_thisref,value);
-			return 0;
-		}
-		virtual int set(float* value)
-		{
-			m_vsh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-		virtual char* toString(){}
-
-		ConfigVariableFloat(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name,vgh,vsh,classref)
-		{}
-		ConfigVariableFloat(const ConfigVariableFloat &c): ConfigVariable(c)
-		{}
-
-		virtual char* toString(char* &buffer)
-		{
-			float value;
-			m_vgh(m_thisref,&value);
-			memset(buffer,0,1024);
-			sprintf(buffer,"%f",value);
-			return buffer;
-		}
-		virtual int fromString(const char * value)
-		{
-			float mvalue = atof(value);
-			m_vsh(m_thisref,&mvalue);
-		}
-		virtual std::string toStdString(){}
-		virtual int fromStdString(std::string){}
-};
-
-class ConfigVariableDouble : public ConfigVariable
-{
-	private:
-	protected:
-	public:
-
-		virtual int get(double* value)
-		{
-			m_vgh(m_thisref,value);
-			return 0;
-
-		}
-		virtual int set(double* value)
-		{
-			m_vsh(m_thisref,value);
-			return CONFIG_VARIABLE_SUCCESS;
-		}
-		virtual char* toString(){}
-
-		ConfigVariableDouble(const char* name,variableGetHandler vgh,variableSetHandler vsh,void* classref): ConfigVariable(name,vgh,vsh,classref)
-		{}
-		ConfigVariableDouble(const ConfigVariableDouble &c): ConfigVariable(c)
-		{}
-
-		virtual char* toString(char* &buffer)
-		{
-			memset(buffer,0,256);
-			double value;
-			m_vgh(m_thisref,&value);
-			sprintf(buffer,"%lf",value);
-			return buffer;
-		}
-		virtual int fromString(const char * value)
-		{
-			double mvalue = atof(value);
-			m_vsh(m_thisref,&mvalue);
-		}
-		virtual std::string toStdString(){}
-		virtual int fromStdString(std::string){}
-};
-
-
-#endif
\ No newline at end of file
diff --git a/src/remoteConfig.cc b/src/remoteConfig.cc
deleted file mode 100644
index 4d900544aefe92f8e40e11e0e502521177240d83..0000000000000000000000000000000000000000
--- a/src/remoteConfig.cc
+++ /dev/null
@@ -1,498 +0,0 @@
-
-#include <sstream>
-#include <gea/API.h>
-#include <gea/gea_main.h>
-#include <gea/ObjRepository.h>
-#include <SPP2.h>
-
-#include "remoteConfig.h"
-
-using namespace std;
-using namespace awds;
-
-/**
-communication flow:
-requestmessages:
-	4 Bytes		 lengthOfMessage Bytes
-	lengthOfMessage |Message
-replymessages:
-	4 Bytes		|4 Bytes	|lengthOfMessage Bytes
-	statusflags	|lengthOfMessage|Message
-**/
-
-struct rcMsgReq
-{
-	uint32_t len1;
-	uint32_t len2;
-	uint32_t len3;
-	char message[2048];
-}__attribute__((packed));
-struct rcMsgRes
-{
-	uint32_t status;
-	uint32_t length;
-	char message[2048];
-}__attribute__((packed));
-
-RemoteConfig::RemoteConfig()
-{
-
-}
-int RemoteConfig::remoteConfigAnnounce(ConfigVariable* cv)
-{
-	remoteVariables[cv->getName()]=cv;
-	return 0;
-}
-
-void RemoteConfig::requestCreator (void *data, WriteMarshalStream* msOut)
-{
-	REP_MAP_OBJ(RemoteConfig *,remoteConfig);//get it, but check on USE!
-
-	if(msOut==NULL)//no stream? useless to walk on!
-	{
-		//if(remoteConfig)*remoteConfig->shellClient->sockout << "RemoteConfig::requestCreator msOut==NULL" << std::endl;
-		//GEA.dbg() << "RemoteConfig::requestCreator msOut==NULL" << std::endl;
-		return;
-	}
-	if(data==NULL)//no data? that is quite strange
-	{
-		//if(remoteConfig)*remoteConfig->shellClient->sockout <<  "RemoteConfig::requestCreator data==NULL" << std::endl;
-		//GEA.dbg() << "RemoteConfig::requestCreator data==NULL" << std::endl;
-		int length=0;
-		*msOut << (uint32_t) length;
-		return;
-	}
-
-	struct rcMsgReq* rcmo=(struct rcMsgReq*)data;
-
-	if(rcmo->len1<1&&rcmo->len2<1&&rcmo->len3<1)//0? we just want a list of configmodules!
-	{
-		int length=0;
-		*msOut << (uint32_t) length;
-		return;
-	}
-	//TODO einzelne laengen abfangen
-	unsigned char uc=' ';
-
-//		int length=0;
-//		*msOut << (uint32_t) length;
-
-
-	uint32_t length=rcmo->len1+rcmo->len2+rcmo->len3+2;
-	uint32_t l1=rcmo->len1;
-	uint32_t l2=rcmo->len2;
-
-
-//******************************
-/*
-	*msOut << (uint32_t) 18;//ok put the length in we'll need it
-	*msOut << (uint32_t) 9;
-	*msOut << (uint32_t) 7;
-char* buffer="testmodul testint ";
-std::pair<void *, unsigned int> v1(buffer,strlen(buffer));//and the messages!
-*msOut << v1;
-*/
-//******************************
-
-	*msOut << (uint32_t) length;//ok put the length in we'll need it
-	*msOut << (uint32_t) l1;
-	*msOut << (uint32_t) l2;
-	length=rcmo->len1+rcmo->len2+rcmo->len3+2;
-	l1=rcmo->len1;
-	l2=rcmo->len2;
-	char* buffer=new char[length];
-	memcpy(buffer,rcmo->message,length);
-	std::pair<void *, unsigned int> v1(buffer,l1);//and the messages!
-//	std::pair<void *, unsigned int> v1(rcmo->message,l1);//and the messages!
-
-	*msOut << v1;
-	*msOut << uc;
-	l1=rcmo->len1;
-	l2=rcmo->len2;
-
-	std::pair<void *, unsigned int> v2(buffer+l1,l2);//this one too
-//	std::pair<void *, unsigned int> v2(rcmo->message+l1,l2);//and the messages!
-
-	*msOut << v2;
-	*msOut << uc;
-	l1=rcmo->len1;
-	l2=rcmo->len2;
-
-	if(rcmo->len3>0)//do we have a value?
-	{
-		uint32_t l3=rcmo->len3;
-		std::pair<void *, unsigned int> v3(buffer+l1+l2,l3);//well then push it in!
-//		std::pair<void *, unsigned int> v3(rcmo->message+l1+l2,l3);//and the messages!
-		*msOut << v3;
-	}
-	delete buffer;
-
-}
-
-static const char *config_cmd_usage =
-    "remoteConfig [node1,node2,...] <module>.<variable> <value>  \n"
-    " with <nodeN>		hostname	or\n"
-		" with [..]				for all nodes in network\n"
-    " with <module>		the module containing the configuration variable\n"
-    " with <value>		the value to be assigned to the variable\n";
-
-int RemoteConfig::remoteConfigAddCommand() {
-
-    ObjRepository& rep = ObjRepository::instance();
-
-    Shell *shell = static_cast<Shell *>(rep.getObj("shell"));
-
-    if (!shell)
-	return -1;
-
-    shell->add_command("rc", remoteconfig_command_fn, this,
-		       "remote manipulation of all configurations",
-		       config_cmd_usage);
-
-    return 0;
-}
-
-int RemoteConfig::remoteconfig_command_fn(ShellClient &sc, void *data, int argc, char **argv)
-{
-	RemoteConfig *self = static_cast<RemoteConfig*>(data);
-	self->shellClient = &sc;
-	self->shellOut=sc.sockout;	
-	REP_MAP_OBJ(SppManager2 *,sppManager);
-    	if ( (argc >= 2) )
-	{
-		struct rcMsgReq rcmo;
-		if(argc>=3)//lets build the request
-		{	
-			int length = strlen(argv[2]);
-			rcmo.len1=(strcspn(argv[2],"."));
-			if(length>rcmo.len1)
-			{
-				//rcmo.len1=(length==rcmo.len1?0:rcmo.len1);
-				rcmo.len2=length-1-rcmo.len1;
-			}
-			else
-			{
-				rcmo.len1=0;
-				rcmo.len2=0;
-			}
-			if(argc==3)
-			{
-				rcmo.len3=0;
-				//rcmo.message = new char[rcmo.len1+rcmo.len2];
-				memcpy(rcmo.message,argv[2],rcmo.len1);
-				memcpy(rcmo.message+rcmo.len1,argv[2]+rcmo.len1+1,rcmo.len2);
-			}
-			else if(argc==4)
-			{
-				rcmo.len3=strlen(argv[4]);
-				//rcmo.message = new char[rcmo.len1+rcmo.len2+rcmo.len3];
-				memcpy(rcmo.message,argv[2],rcmo.len1);
-				memcpy(rcmo.message+rcmo.len1,argv[2]+rcmo.len1+1,rcmo.len2);
-				memcpy(rcmo.message+rcmo.len1+rcmo.len2,argv[3],rcmo.len3);
-			}
-		}
-		else
-		{
-			rcmo.len1=0;
-			rcmo.len2=0;
-			rcmo.len3=0;
-			//rcmo.message = NULL;
-		}
-//		if(!strcmp(nodelist, "[..]")) //broadcast
-		if(!strcmp(argv[1], "[..]")) //broadcast
-		{
-			if(self->shellClient->state==ShellClient::CS_Idle)
-				self->shellClient->block();
-			gea::AbsTime *t_start = new gea::AbsTime(GEA.lastEventTime);
-			sppManager->sendRequestAll( 9876, (void*) &rcmo, RemoteConfig::requestCreator, t_start, RemoteConfig::responseHandler,t_start,RemoteConfig::finishedHandler);
-			//if(rcmo.message)delete rcmo.message;
-		}
-		else // single nodes
-		{
-			//if(self->shellClient->state==ShellClient::CS_Idle)
-			//	self->shellClient->block();
-			char * pch;
-			int i=0;
-			pch = strtok (argv[1],"[,]");
-//			pch = strtok (nodelist,"[,]");
-			gea::AbsTime *t_start = new gea::AbsTime(GEA.lastEventTime);
-			char c='9';
-			while (pch != NULL)//we might not need to split them up but to be on the safe side...
-			{
-				
-				//TODO node id erzeugen
-				printf("<<%s>>>><<<<\n",pch);
-				awds::NodeId dest;
-			
-				REP_MAP_OBJ(awds::Routing *,awdsRouting);
-				if(awdsRouting)
-				{
-					awdsRouting->getNodeByName(dest,pch);
-					//self->requests[*t_start]=i++;
-					sppManager->sendRequest(dest,9876,(void*) &rcmo, RemoteConfig::requestCreator, &c, RemoteConfig::responseHandler);
-				}
-				pch = strtok (NULL, "[,]");
-			}
-			//if(rcmo.message)delete rcmo.message;
-		}
-		//if(nodelist)delete nodelist;
-    	}
-	else
-	{
-		*sc.sockout << config_cmd_usage << endl;
-		return 0;
-    	}
-	return 0;
-}
-
-void RemoteConfig::finishedHandler (void *data)
-{
-	REP_MAP_OBJ(RemoteConfig *,remoteConfig);
-	if(remoteConfig)
-	{
-		if(remoteConfig->shellClient->state==ShellClient::CS_Blocked)
-			remoteConfig->shellClient->unblock();
-	}
-}
-
-int RemoteConfig::responseHandler (void *data, ReadMarshalStream*  msIn, const awds::NodeId& src) 
-{
-	REP_MAP_OBJ(RemoteConfig *,remoteConfig);//get but we'll check it on USE!
-	if(!remoteConfig)
-	{
-		GEA.dbg() << "RemoteConfig::responseHandler RemoteConfig not found!"<< std::endl;
-		return -1;
-	}
-	if(msIn==NULL)//ouch we need this!
-	{
-		//TODO timeout?
-		//if(remoteConfig)*remoteConfig->shellClient->sockout << "Response from " << src <<" with NULL" << std::endl;
-		//GEA.dbg() << "Response from " << src <<" with NULL" << std::endl;
-		if(remoteConfig->shellClient->state==ShellClient::CS_Blocked)
-			remoteConfig->shellClient->unblock();
-		return -1;
-	}
-
-	uint32_t status;
-	uint32_t length;
-	*msIn >> status;
-	*msIn >> length;
-	if(status)//status>0? this is a problem!!
-	{
-		*remoteConfig->shellOut << "Response from " << src <<"length: "<< length << ". Obviously there was an error!" << std::endl;
-		GEA.dbg() << "Response from " << src <<"length: "<< length << ". Obviously there was an error!" << std::endl;
-		return CONFIG_VARIABLE_FAILURE;
-	}
-	char* retval;
-
-	if(length>0)//ah we've got a message nice, print it!
-	{
-		retval = new char[length+1];
-		memset(retval,0,length+1);
-		std::pair<void *, unsigned> v(retval,length);
-		*msIn >> v;
-		*remoteConfig->shellOut << "Response from " << src <<": " << retval << std::endl;
-		GEA.dbg() << "Response from " << src <<": " << retval << std::endl;
-		if(retval) delete retval;
-	}
-
-	else //no Message? well at least no error!
-	{
-		*remoteConfig->shellOut << "Response from " << src <<"length: "<< length << ". Strange but there was no error!" << std::endl;
-		GEA.dbg() << "Response from " << src <<"length: "<< length << ". Strange but there was no error!" << std::endl;
-	}
-
-/*
-	std::map<gea::AbsTime,unsigned int>::iterator it=remoteConfig->requests.find(*((gea::AbsTime *)data));
-	if(it!=remoteConfig->requests.end())
-	{
-		printf("it->second:%i\n",(it->second));
-		it->second=(it->second)--;
-	}
-	if(it->second<=0&&(remoteConfig->shellClient->state==ShellClient::CS_Blocked))
-		remoteConfig->shellClient->unblock();
-*/
-	return CONFIG_VARIABLE_SUCCESS;
-}
-
-int RemoteConfig::requestHandler (void *data, ReadMarshalStream*  msIn, WriteMarshalStream* msOut, const awds::NodeId& src) 
-{
-	REP_MAP_OBJ(RemoteConfig *,remoteConfig);
-	if(msIn==NULL||msOut==NULL)//we definitely need those!
-	{
-		//TODO timeout?
-		//if(remoteConfig)*remoteConfig->shellClient->sockout << "Request from " << src <<" with NULL " << std::endl;
-		//GEA.dbg() << "Request from " << src <<" with NULL " << std::endl;
-		return -1;
-	}
-	if(!remoteConfig)//we definitely need this one!
-	{
-		uint32_t lout = 0;
-		uint32_t status = 1;
-		*msOut << status;
-		*msOut << lout;
-		return -1;
-	}
-
-
-	uint32_t length;
-	*msIn >> length;
-	uint32_t l1=0;
-	uint32_t l2=0;
-	*msIn >> l1;
-	*msIn >> l2;
-	if(length<1)//no params? well then show me what you've got
-	{
-		int len=0;
-		for(std::map<char*,ConfigVariable*>::iterator it2=remoteConfig->remoteVariables.begin();it2!=remoteConfig->remoteVariables.end();it2++)
-		{
-			len+=strlen(it2->first)+1;
-		}
-
-		uint32_t lout = len;
-		uint32_t status = 0;
-
-		*msOut << status;
-		*msOut << lout;
-
-		for(std::map<char*,ConfigVariable*>::iterator it2=remoteConfig->remoteVariables.begin();it2!=remoteConfig->remoteVariables.end();it2++)
-		{
-
-			std::pair<void *, unsigned> vOut(it2->first,strlen(it2->first));
-			*msOut << vOut;
-			unsigned char uc='\n';
-			*msOut << uc;
-		}
-		return CONFIG_VARIABLE_SUCCESS;
-	}
-	char* names;
-	char* modulename[3];
-	names = new char[length+1];
-	memset(names,0,length+1);
-	std::pair<void *, unsigned> v(names,length);//readparams
-	*msIn >> v;
-	names[length]=0;
-	char * pch;
-	int i=0;
-	for(int i=0;i<3;i++)modulename[i]=NULL;
-	//TODO mehrere streams auslesen? allerdings muessten dann mehrere ints übertragen werden wegen der länge?
-	pch = strtok (&(names[0])," ");
-	while (pch != NULL&&i<3)//we might not need to split them up but to be on the safe side...
-	{
-		modulename[i] = new char[strlen(pch)+1];
-		memset(modulename[i],0,strlen(pch)+1);
-		memcpy(modulename[i],pch,strlen(pch));
-		pch = strtok (NULL, " ");
-		i++;
-	}
-	if(modulename[0]&&modulename[1])//we need the modulename AND the variable name
-	{
-		int len1=strlen(modulename[0]);
-		int len2=strlen(modulename[1]);
-		if(len1<1||len2<1) return CONFIG_VARIABLE_FAILURE;//well something went terribly wrong here
-		char* fullname = new char[len1+len2+2];
-		memset(fullname,0,len1+len2+2);
-		memcpy(fullname,modulename[0],len1);
-		fullname[len1]='.';
-		memcpy(fullname+len1+1,modulename[1],len2);//build the mapsearchstring
-		if (remoteConfig)
-		{
-			bool found=false;
-			std::map<char*,ConfigVariable*>::iterator it = remoteConfig->remoteVariables.find(fullname);//why the heck is THIS not working?
-			for(std::map<char*,ConfigVariable*>::iterator it2=remoteConfig->remoteVariables.begin();it2!=remoteConfig->remoteVariables.end();it2++)
-			{
-				//if(it!=remoteConfig->remoteVariables.end())
-				if(!strcmp(it2->first,fullname))//at least this works but....
-				{
-					found=true;
-					if(modulename[2]!=NULL)//TODO put it together as we now try to get the new value too, to double check the new value
-					{
-						//(it2->second)->fromString(modulename[2]);//ok set the values
-						(it2->second)->fromStdString(std::string(modulename[2]));//ok set the values
-						//char* buffer = new char[1024];
-						//memset(buffer,0,1024);
-						//(it2->second)->toString(buffer); //ok get it to check!
-						//int length=strlen(buffer);
-						std::string s= (it2->second)->toStdString();
-						int length=s.size();
-
-						uint32_t lout = length;
-						uint32_t status = 0;
-						*msOut << status;
-						*msOut << lout;
-						//std::pair<void *, unsigned> vOut(buffer,length);
-						std::pair<void *, unsigned> vOut(&(s[0]),length);
-						*msOut << vOut;
-						//delete buffer;
-					}
-					else //just read the value
-					{
-						//char* buffer = new char[1024];
-						//memset(buffer,0,1024);
-						//(it2->second)->toString(buffer); //ConfigVariable
-						//printf("<<%s>>\n",(it2->second)->toStdString().c_str());
-						std::string s= (it2->second)->toStdString();
-						//int length=strlen(buffer);
-						int length=s.size();
-						uint32_t lout = length;
-						uint32_t status = 0;
-						*msOut << status;
-						*msOut << lout;
-						//std::pair<void *, unsigned> vOut(buffer,length);
-						std::pair<void *, unsigned> vOut(&(s[0]),length);
-						*msOut << vOut;
-						//delete buffer;
-					}
-				}
-			}
-			if(!found)//no modulename configvar found maybe typo?!
-			{
-				if(remoteConfig)*remoteConfig->shellClient->sockout << "RemoteConfig::requestHandler Request from sorry i don't know this one: " << fullname << std::endl;
-				GEA.dbg() << "RemoteConfig::requestHandler Request from sorry i don't know this one: " << fullname << std::endl;
-				return -1;
-				uint32_t lout = CONFIG_VARIABLE_FAILURE;//TODO Maybe send this message back?
-				*msOut << lout;
-				lout=0;
-				*msOut << lout;
-			}
-		}
-		else //TODO this should be obsolet now?
-		{
-			uint32_t lout = CONFIG_VARIABLE_FAILURE;
-			*msOut << lout;
-			lout=0;
-			*msOut << lout;
-			if(remoteConfig)*remoteConfig->shellClient->sockout << "Something went terribly wrong in RemoteConfig::request_handler :("<< endl;
- 			GEA.dbg() << "Something went terribly wrong in RemoteConfig::request_handler :("<< endl;
-			return 0;
-		}
-		if(fullname)delete fullname;
-	}
-	//do some cleanup!
-	for (int i=0;i<3;i++)
-	if(modulename[i])delete modulename[i];
-	if(names)delete names;
-    return 0;
-}
-
-/*
-GEA_MAIN(argc, argv)
-{
-
-	RemoteConfig *remoteConfig = new RemoteConfig();
-	REP_INSERT_OBJ(RemoteConfig *, remoteConfig, remoteConfig);
-	REP_MAP_OBJ(SppManager *,sppManager);
-	if (!sppManager)
-	{
-		GEA.dbg() << "SppManager not found :( " << endl;
-	}
-	else
-	if (argc == 1)
-	{
-		sppManager->registerHandler(9876, 0, RemoteConfig::requestHandler);
-		GEA.dbg() << "Handler registered with SPP" << endl;
-	}
-
-    return 0;
-}
-*/
diff --git a/src/remoteConfig.h b/src/remoteConfig.h
deleted file mode 100644
index 1f45556ce7b8d64757766be2d9e7fc0bad2beb95..0000000000000000000000000000000000000000
--- a/src/remoteConfig.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _REMOTECONFIG_H__
-#define _REMOTECONFIG_H__
-
-#define VARIABLE_NAME_LENGTH 64
-
-#include <awds/ext/Shell.h>
-#include <awds/MarshalStream.h>
-#include "configVariable.h"
-
-class RemoteConfig
-{
-
-private:
-	ostream *shellOut;
-	ShellClient* shellClient;
-
-protected:
-
-	std::map<char*, ConfigVariable* > remoteVariables;
-	std::map<gea::AbsTime,unsigned int> requests;
-	std::map<gea::AbsTime,std::string> response;
-
-	
-public:
-
-
-
-	RemoteConfig();
-	//int remoteConfigAnnounce(char* name,ConfigVariableType cvt,void* thisref,variableGetHandler vgh,variableSetHandler vsh,void* value=NULL);
-	int remoteConfigAnnounce(ConfigVariable* cv);
-	int remoteConfigAddCommand();
-	static int remoteconfig_command_fn(ShellClient &sc, void *data, int argc, char **argv);
-	static int requestHandler (void *data, ReadMarshalStream*  msIn, WriteMarshalStream* msOut, const awds::NodeId& src);
-	static int responseHandler (void *data, ReadMarshalStream*  msIn, const awds::NodeId& src);
-	static void requestCreator (void *data, WriteMarshalStream* msOut);
-	static void finishedHandler (void *data);
-	unsigned int hexToInt(char* string)
-	{
-		printf("\n\n");
-		unsigned int retval=0;
-		int faktor=1;
-		int length= strlen(string);
-		for (int i=length-1; i>=0; i--)
-		{
-			if(string[i]>64&&string[i]<91)
-			{
-				printf("1:%u|%u| ",string[i]-55,(unsigned int)(string[i]-55)*faktor);
-				retval+=(unsigned int)(string[i]-55)*faktor;
-			}
-			else
-			if(string[i]>47&&string[i]<58)
-			{
-				printf("2:%u|%u|",string[i]-48,(unsigned int)(string[i]-48)*faktor);
-				retval+=(unsigned int)(string[i]-48)*faktor;
-			}
-			faktor*=16;
-			printf("%u|\n",retval);
-		}
-		return retval;
-	}
-
-
-};
-
-#endif
\ No newline at end of file
diff --git a/src/testmodul.cc b/src/testmodul.cc
index c23fc57fb5222b47ddd9f7760adc0a167e0ff798..b061b50127e87d56c152633ef3dbcc6609e8489f 100644
--- a/src/testmodul.cc
+++ b/src/testmodul.cc
@@ -2,17 +2,17 @@
 #include <gea/API.h>
 #include <gea/gea_main.h>
 #include <gea/ObjRepository.h>
-#include <SPP2.h>
+#include <awds/SPP2.h>
 
 #include "testmodul.h"
-#include "remoteConfig.h"
+#include "awds/config.h"
 using namespace std;
 using namespace awds;
 
 
 RemoteConfigTestModule::RemoteConfigTestModule()
 {
-	REP_MAP_OBJ(RemoteConfig *,remoteConfig);
+	REP_MAP_OBJ(Config *,config);
 
 	this->testint=21;
 	this->testdouble=1982;
@@ -24,11 +24,11 @@ RemoteConfigTestModule::RemoteConfigTestModule()
 
 	//ConfigVariableInt(const char* name, const int value, variableGetHandler vgh,variableSetHandler vsh,void* classref):
 
-	remoteConfig->remoteConfigAnnounce(new ConfigVariableInt("testmodul.testint",getint,setint,this));
-	remoteConfig->remoteConfigAnnounce(new ConfigVariableDouble("testmodul.testdouble",getdouble,setdouble,this));
-	remoteConfig->remoteConfigAnnounce(new ConfigVariableFloat("testmodul.testfloat",getfloat,setfloat,this));
-	remoteConfig->remoteConfigAnnounce(new ConfigVariableBool("testmodul.testbool",getbool,setbool,this));
-	remoteConfig->remoteConfigAnnounce(new ConfigVariableString("testmodul.testchar",getchar,setchar,this));
+	config->registerVar(new ConfigVariableInt("testmodul.testint",getint,setint,this));
+	config->registerVar(new ConfigVariableDouble("testmodul.testdouble",getdouble,setdouble,this));
+	config->registerVar(new ConfigVariableFloat("testmodul.testfloat",getfloat,setfloat,this));
+	config->registerVar(new ConfigVariableBool("testmodul.testbool",getbool,setbool,this));
+	config->registerVar(new ConfigVariableString("testmodul.testchar",getchar,setchar,this));
 
 }
 
@@ -95,8 +95,8 @@ GEA_MAIN(argc, argv)
 {
 
 
-	RemoteConfig *remoteConfig = new RemoteConfig();
-	REP_INSERT_OBJ(RemoteConfig *, remoteConfig, remoteConfig);
+	Config *config = new Config();
+	REP_INSERT_OBJ(Config *, config, config);
 	REP_MAP_OBJ(SppManager *,sppManager);
 	if (!sppManager)
 	{
@@ -105,10 +105,10 @@ GEA_MAIN(argc, argv)
 	else
 	if (argc == 1)
 	{
-		sppManager->registerHandler(9876, 0, RemoteConfig::requestHandler);
+		sppManager->registerHandler(9876, 0, Config::requestHandler);
 		GEA.dbg() << "Handler registered with SPP" << endl;
 	}
-	remoteConfig->remoteConfigAddCommand();
+	config->configAddCommand();
 
 	RemoteConfigTestModule *remoteConfigTest = new RemoteConfigTestModule();
 	REP_INSERT_OBJ(RemoteConfigTestModule *, remoteConfigTest, remoteConfigTest);
diff --git a/src/testmodul.h b/src/testmodul.h
index 657f2730fa1a1f05a981aa5c38fd6a28e3ac73c1..11c718c60863923ee585c9f2271e7605781737b2 100644
--- a/src/testmodul.h
+++ b/src/testmodul.h
@@ -1,11 +1,10 @@
 #ifndef _REMOTECONFIGTEST_H__
 #define _REMOTECONFIGTEST_H__
 
+#include <awds/configVariable.h>
+#include <awds/config.h>
 
 
-#include "remoteConfig.h"
-#include "configVariable.h"
-
 class RemoteConfigTestModule
 {
 
@@ -27,42 +26,42 @@ public:
 	
 	static int remoteconfigTestModule_command_fn(ShellClient &sc, void *data, int argc, char **argv);
 
-	static int setint( void* thisref,const void* value)
+	static int setint( void* thisref,const int* value)
 	{
 		((RemoteConfigTestModule*)thisref)->testint=*((int*)value);
 		return CONFIG_VARIABLE_SUCCESS;
 	}
-	static int getint (void* thisref,void* value)
+	static int getint (void* thisref,int* value)
 	{
 		*((int*)value)=((RemoteConfigTestModule*)thisref)->testint;
 		return CONFIG_VARIABLE_SUCCESS;
 	}
 
-	static int setfloat( void* thisref,const void* value)
+	static int setfloat( void* thisref,const float* value)
 	{
 		
 		((RemoteConfigTestModule*)thisref)->testfloat=*((float*)value);
 		return CONFIG_VARIABLE_SUCCESS;
 	}
-	static int getfloat (void* thisref,void* value)
+	static int getfloat (void* thisref,float* value)
 	{
 		*((float*)value)=((RemoteConfigTestModule*)thisref)->testfloat;
 		return CONFIG_VARIABLE_SUCCESS;
 	}
 
-	static int setdouble( void* thisref,const void* value)
+	static int setdouble( void* thisref,const double* value)
 	{
 		
 		((RemoteConfigTestModule*)thisref)->testdouble=*((double*)value);
 		return CONFIG_VARIABLE_SUCCESS;
 	}
-	static int getdouble (void* thisref,void* value)
+	static int getdouble (void* thisref,double* value)
 	{
 		*((double*)value)=((RemoteConfigTestModule*)thisref)->testdouble;
 		return CONFIG_VARIABLE_SUCCESS;
 	}
 
-	static int setchar( void* thisref,const void* value)
+	static int setchar( void* thisref,const char* value)
 	{
 		if(((RemoteConfigTestModule*)thisref)->testchar)
 		{
@@ -79,19 +78,19 @@ public:
 		}
 		return CONFIG_VARIABLE_FAILURE;
 	}
-	static int getchar (void* thisref,void* value)
+	static int getchar (void* thisref,char* value)
 	{
 		memcpy(value,((RemoteConfigTestModule*)thisref)->testchar,strlen(((RemoteConfigTestModule*)thisref)->testchar));
 		return CONFIG_VARIABLE_SUCCESS;
 	}
 
-	static int setbool( void* thisref,const void* value)
+	static int setbool( void* thisref,const bool* value)
 	{
 		
 		((RemoteConfigTestModule*)thisref)->testbool=*((bool*)value);
 		return CONFIG_VARIABLE_SUCCESS;
 	}
-	static int getbool(void* thisref,void* value)
+	static int getbool(void* thisref,bool* value)
 	{
 		*((bool*)value)=((RemoteConfigTestModule*)thisref)->testbool;
 		return CONFIG_VARIABLE_SUCCESS;
-- 
1.6.2.1


