diff --git a/MAC/APL/PAC/BS_Protocol/src/BS_Protocol.prot b/MAC/APL/PAC/BS_Protocol/src/BS_Protocol.prot
index 82e7a6734139af91a9b704a5c019aa2976e35c5d..a0c648fb8a92d25cb6c8f471f6f0bbac6afd124e 100644
--- a/MAC/APL/PAC/BS_Protocol/src/BS_Protocol.prot
+++ b/MAC/APL/PAC/BS_Protocol/src/BS_Protocol.prot
@@ -16,6 +16,8 @@ include = '<APL/RTCCommon/Timestamp.h>';
 
 prelude = << PRELUDE_END
 
+typedef		void*		memptr_t;
+
 	enum {
 	     SUCCESS = 0,
 	     ERR_RANGE,     // range error in message parameters
@@ -80,7 +82,7 @@ event = {
       dir = OUT;
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
       param = {
 	    name = "status";
@@ -95,7 +97,7 @@ event = {
 	// handle to the beam, previously received in BEAMALLOCACK
 	param = {
 		name = "handle";
-		type = "uint32";
+		type = "memptr_t";
 	};
 	
 	// New mapping of beamlets to subbands, the left-hand side of
@@ -116,7 +118,7 @@ event = {
 	// handle
 	param = {
 		name = "handle";
-		type = "uint32";
+		type = "memptr_t";
 	};
 	param = {
 		name = "status";
@@ -129,7 +131,7 @@ event = {
       dir = IN;
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
 };
 
@@ -138,7 +140,7 @@ event = {
       dir = OUT;
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
       param = {
 	    name = "status";
@@ -151,7 +153,7 @@ event = {
       dir = IN;
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
       param = {
 	    name = "pointing";
diff --git a/MAC/APL/PAC/BeamServer/configure.in b/MAC/APL/PAC/BeamServer/configure.in
index 4d1898b42cf12b45d7c8d3d2747d1d062e07efd2..568f25ba6b2d8c6defbb3721f5025962978520c7 100644
--- a/MAC/APL/PAC/BeamServer/configure.in
+++ b/MAC/APL/PAC/BeamServer/configure.in
@@ -62,7 +62,7 @@ lofar_GENERAL
 lofar_COMPILETOOLS
 
 lofar_INTERNAL(LCS/Common, common, , 1, Common/LofarTypes.h,,)
-lofar_INTERNAL(MAC/Test/Suite, suite, , 1, Suite/suite.h,,)
+dnl lofar_INTERNAL(MAC/Test/Suite, suite, , 1, Suite/suite.h,,)
 lofar_INTERNAL(MAC/APL/PIC/RSP_Protocol, rsp_protocol, , 1, APL/RSP_Protocol/RSP_Protocol.ph,,)
 lofar_INTERNAL(MAC/APL/PAC/CAL_Protocol, CAL_Protocol, , 1, APL/CAL_Protocol/CAL_Protocol.ph,,)
 lofar_INTERNAL(MAC/APL/PAC/BS_Protocol, BS_Protocol, , 1, APL/BS_Protocol/BS_Protocol.ph,,)
diff --git a/MAC/APL/PAC/BeamServer/src/BeamServer.cc b/MAC/APL/PAC/BeamServer/src/BeamServer.cc
index 7405b853e441fd019a70752d54ebd8273c9dcfde..65df063493414636841b2a6077fd34e00f11bba4 100644
--- a/MAC/APL/PAC/BeamServer/src/BeamServer.cc
+++ b/MAC/APL/PAC/BeamServer/src/BeamServer.cc
@@ -630,7 +630,7 @@ GCFEvent::TResult BeamServer::beamalloc_state(GCFEvent& event, GCFPortInterface&
 
 			// send succesful ack
 			beamallocack.status = BS_Protocol::SUCCESS;
-			beamallocack.handle = (uint32)m_bt.getBeam();
+			beamallocack.handle = (BS_Protocol::memptr_t)m_bt.getBeam();
 			m_bt.getPort()->send(beamallocack);
 		} 
 		else {
@@ -709,7 +709,7 @@ GCFEvent::TResult BeamServer::beamfree_state(GCFEvent& event, GCFPortInterface&
 
 		// send succesful ack
 		beamfreeack.status = BS_Protocol::SUCCESS;
-		beamfreeack.handle = (uint32)m_bt.getBeam();
+		beamfreeack.handle = (BS_Protocol::memptr_t)m_bt.getBeam();
 
 		m_bt.getPort()->send(beamfreeack);
 
diff --git a/MAC/APL/PAC/BeamServer/src/Beams.cc b/MAC/APL/PAC/BeamServer/src/Beams.cc
index 0fc430f8c9e509949b4eea4fafcd5f120e9897df..290b346ae6d09507d41da9c441d6dbb8b49568ef 100644
--- a/MAC/APL/PAC/BeamServer/src/Beams.cc
+++ b/MAC/APL/PAC/BeamServer/src/Beams.cc
@@ -61,7 +61,7 @@ Beams::Beams(int 	nbeamlets, int 	nsubbands) :
 //
 Beams::~Beams()
 {
-	for (map<Beam*,uint32>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
+	for (map<Beam*,CAL_Protocol::memptr_t>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
 		delete bi->first;
 	}
 	m_beams.clear();
@@ -92,7 +92,7 @@ Beam* Beams::create(string nodeid, string subarrayname, Beamlet2SubbandMap alloc
 //
 // setCalibrationHandle(beam, handle)
 //
-void Beams::setCalibrationHandle(Beam* beam, uint32 handle)
+void Beams::setCalibrationHandle(Beam* beam, CAL_Protocol::memptr_t handle)
 {
 	m_handle2beam[handle] = beam;
 	m_beams[beam]         = handle;
@@ -101,9 +101,9 @@ void Beams::setCalibrationHandle(Beam* beam, uint32 handle)
 //
 // findCalibrationHandle(beam)
 //
-uint32 Beams::findCalibrationHandle(Beam* beam) const
+CAL_Protocol::memptr_t Beams::findCalibrationHandle(Beam* beam) const
 {
-	map<Beam*,uint32>::const_iterator it = m_beams.find(beam);
+	map<Beam*,CAL_Protocol::memptr_t>::const_iterator it = m_beams.find(beam);
 
 	if (it != m_beams.end()) {
 		return (it->second);
@@ -115,9 +115,9 @@ uint32 Beams::findCalibrationHandle(Beam* beam) const
 //
 // updateCalibration(handle, gains)
 //
-bool Beams::updateCalibration(uint32 handle, CAL::AntennaGains& gains)
+bool Beams::updateCalibration(CAL_Protocol::memptr_t handle, CAL::AntennaGains& gains)
 {
-	map<uint32,Beam*>::iterator it = m_handle2beam.find(handle);
+	map<CAL_Protocol::memptr_t,Beam*>::iterator it = m_handle2beam.find(handle);
 
 	if ((it == m_handle2beam.end()) || (!it->second)) {
 		LOG_WARN_STR("No calibration found for " << handle);
@@ -134,7 +134,7 @@ bool Beams::updateCalibration(uint32 handle, CAL::AntennaGains& gains)
 bool Beams::exists(Beam *beam)
 {
 	// if beam not found, return 0
-	map<Beam*,uint32>::iterator it = m_beams.find(beam);
+	map<Beam*,CAL_Protocol::memptr_t>::iterator it = m_beams.find(beam);
 
 	if (it == m_beams.end()) {
 		return (false);
@@ -149,7 +149,7 @@ bool Beams::exists(Beam *beam)
 bool Beams::destroy(Beam* beam)
 {
 	// remove from handle2beam map
-	for (map<uint32,Beam*>::iterator it = m_handle2beam.begin();
+	for (map<CAL_Protocol::memptr_t,Beam*>::iterator it = m_handle2beam.begin();
 									it != m_handle2beam.end(); ++it) {
 		if (beam == it->second) {
 			m_handle2beam.erase(it);
@@ -157,7 +157,7 @@ bool Beams::destroy(Beam* beam)
 	}
 
 	// if beam not found, return false
-	map<Beam*,uint32>::iterator it = m_beams.find(beam);
+	map<Beam*,CAL_Protocol::memptr_t>::iterator it = m_beams.find(beam);
 	if (it != m_beams.end()) {
 		delete(it->first);
 		m_beams.erase(it);
@@ -176,7 +176,7 @@ void Beams::calculate_weights(Timestamp								 timestamp,
 							  blitz::Array<std::complex<double>, 3>& weights)
 {
 	// iterate over all beams and fill m_lmns with new track of Pointings
-	for (map<Beam*,uint32>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
+	for (map<Beam*,CAL_Protocol::memptr_t>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
 		bi->first->calcNewTrack(timestamp, compute_interval, conv);
 		LOG_DEBUG(formatString("current_pointing=(%f,%f)",
 										bi->first->getPointing().angle0(),
@@ -194,7 +194,7 @@ void Beams::calculate_weights(Timestamp								 timestamp,
 Beamlet2SubbandMap Beams::getSubbandSelection()
 {
 	Beamlet2SubbandMap selection;
-	for (map<Beam*,uint32>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
+	for (map<Beam*,CAL_Protocol::memptr_t>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
 		Beamlet2SubbandMap beammap = bi->first->getAllocation();
 		selection().insert(beammap().begin(), beammap().end());
 	}
@@ -212,7 +212,7 @@ void Beams::calculateHBAdelays (RTC::Timestamp	 					timestamp,
 								const blitz::Array<double,1>&		elementDelays)
 {
 	// iterate over all beams and fill AzEl coordinates of HBA beams
-	for (map<Beam*,uint32>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
+	for (map<Beam*,CAL_Protocol::memptr_t>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
 		if (!bi->first->getSPW().isForHBA()) {
 			LOG_DEBUG_STR("Beam " << bi->first->getName() << " is LBA");
 			continue;
@@ -235,7 +235,7 @@ void Beams::sendHBAdelays(RTC::Timestamp				time,
 						  GCF::TM::GCFPortInterface&	port)
 {
 	// iterate over all beams and fill AzEl coordinates of HBA beams
-	for (map<Beam*,uint32>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
+	for (map<Beam*,CAL_Protocol::memptr_t>::iterator bi = m_beams.begin(); bi != m_beams.end(); ++bi) {
 		if (!bi->first->getSPW().isForHBA()) {
 			continue;
 		}
diff --git a/MAC/APL/PAC/BeamServer/src/Beams.h b/MAC/APL/PAC/BeamServer/src/Beams.h
index bf4577293f23fd645f8ded106724a46d47402a97..ab2f27e89b37613fef24350a4efecc010b7d0582 100644
--- a/MAC/APL/PAC/BeamServer/src/Beams.h
+++ b/MAC/APL/PAC/BeamServer/src/Beams.h
@@ -26,6 +26,7 @@
 #include <APL/BS_Protocol/Pointing.h>
 #include <APL/BS_Protocol/Beamlet2SubbandMap.h>
 #include <APL/RTCCommon/Timestamp.h>
+#include <APL/CAL_Protocol/CAL_Protocol.ph>
 #include <APL/CAL_Protocol/SpectralWindow.h>
 #include <APL/CAL_Protocol/SubArray.h>
 #include <APL/CAL_Protocol/AntennaGains.h>
@@ -65,13 +66,13 @@ public:
 				 BS_Protocol::Beamlet2SubbandMap	allocation);
 
 	// Set calibration handle for a beam
-	void setCalibrationHandle(Beam* beam, uint32 handle);
+	void setCalibrationHandle(Beam* beam, CAL_Protocol::memptr_t handle);
 
 	// Find calibration handle.
-	uint32 findCalibrationHandle(Beam* beam) const;
+	CAL_Protocol::memptr_t findCalibrationHandle(Beam* beam) const;
 
 	// Update gains
-	bool updateCalibration(uint32 handle, CAL::AntennaGains& gains);
+	bool updateCalibration(CAL_Protocol::memptr_t handle, CAL::AntennaGains& gains);
 
 	// Check if a beam exists.
 	bool exists(Beam* beam);
@@ -108,11 +109,11 @@ private:
 	//# --- datamembers ---
 
 	// Registry of active beams with mapping to calibration handle.
-	std::map<Beam*, uint32> 	m_beams;
+	std::map<Beam*, CAL_Protocol::memptr_t> 	m_beams;
 
 	// Reverde map from handle to beam to find beam corresponding to
 	// calibration update.
-	std::map<uint32, Beam*> 	m_handle2beam;
+	std::map<CAL_Protocol::memptr_t, Beam*> 	m_handle2beam;
 
 	// Collection of all beamlets;
 	Beamlets					m_beamlets;
diff --git a/MAC/APL/PAC/BeamServer/src/beamctl.h b/MAC/APL/PAC/BeamServer/src/beamctl.h
index a92030499bad773fdf2656a01ad4e08a37241b0e..319d698988c0ffb72180afbec2f0dc9ca0e96cda 100644
--- a/MAC/APL/PAC/BeamServer/src/beamctl.h
+++ b/MAC/APL/PAC/BeamServer/src/beamctl.h
@@ -30,6 +30,7 @@
 #include <Common/lofar_bitset.h>
 #include <Common/lofar_list.h>
 #include <APL/RSP_Protocol/RCUSettings.h>
+#include <APL/BS_Protocol/BS_Protocol.ph>
 
 namespace LOFAR
 {
@@ -79,7 +80,7 @@ namespace LOFAR
 	  GCFPort m_beamserver;
 
 	  // handles
-	  uint32 m_beamhandle;
+	  BS_Protocol::memptr_t m_beamhandle;
 
 	  string                     m_parent; // name of the full array
 	  list<int>                  m_rcus;   // selection of rcus
diff --git a/MAC/APL/PAC/BeamServer/test/AVTStub.cc b/MAC/APL/PAC/BeamServer/test/AVTStub.cc
index ecc12707689a010f5908646072e639ac06140b70..90c3aecad00a3b468edc3768c2ee2081c1c2efe0 100644
--- a/MAC/APL/PAC/BeamServer/test/AVTStub.cc
+++ b/MAC/APL/PAC/BeamServer/test/AVTStub.cc
@@ -499,7 +499,7 @@ GCFEvent::TResult AVTStub::test005(GCFEvent& e, GCFPortInterface& port)
 {
   GCFEvent::TResult status = GCFEvent::HANDLED;
   static int timerid = 0;
-  static uint32 beam_handle = 0;
+  static void* beam_handle = 0;
   
   switch (e.signal)
   {
diff --git a/MAC/APL/PAC/BeamServer/test/Makefile.am b/MAC/APL/PAC/BeamServer/test/Makefile.am
index 1d50a6e0ebac6be751ca805ab6be76b92381b541..7059e3847400a7b3d39f54f719800ad716717460 100644
--- a/MAC/APL/PAC/BeamServer/test/Makefile.am
+++ b/MAC/APL/PAC/BeamServer/test/Makefile.am
@@ -16,11 +16,10 @@ TESTS = \
 	avtstub.sh \
 	BeamServerTest 
 
-bin_PROGRAMS = \
-	AVTStub \
-	EPATest \
-	SweepTest \
-	BeamServerTest
+#bin_PROGRAMS = BeamServerTest
+#	AVTStub 
+#	EPATest 
+#	SweepTest
 
 bin_SCRIPTS = \
 	beamctltest
@@ -28,50 +27,25 @@ bin_SCRIPTS = \
 #	BeamServerTest 
 #	CheckWeightsTest2 
 
-check_PROGRAMS = \
-	BeamServerTest
+#check_PROGRAMS = BeamServerTest
 
-BeamServerTest_SOURCES = \
-	BSTest.h \
-	BeamServerTest.cc
+#BeamServerTest_SOURCES	= BSTest.h  BeamServerTest.cc
+#BeamServerTest_LDADD 	= $(top_builddir)/src/libabsdevel.la
 
- BeamServerTest_LDADD = \
-	$(top_builddir)/src/libabsdevel.la
+#CheckWeightsTest_SOURCES = CheckWeightsTest.cc
+#CheckWeightsTest_LDADD = $(top_builddir)/src/libabs.la $(top_builddir)/src/libabsdevel.la
 
-#CheckWeightsTest_SOURCES = \
-#	CheckWeightsTest.cc
+#CheckWeightsTest2_SOURCES = CheckWeightsTest2.cc
+#CheckWeightsTest2_LDADD = $(top_builddir)/src/libabs.la $(top_builddir)/src/libabsdevel.la
 
-#CheckWeightsTest_LDADD = \
-#	$(top_builddir)/src/libabs.la \
-#	$(top_builddir)/src/libabsdevel.la
+#AVTStub_SOURCES 	= AVTStub.h AVTStub.cc
+#AVTStub_LDADD 		= $(top_builddir)/src/libabsdevel.la
 
-# CheckWeightsTest2_SOURCES = \
-# 	CheckWeightsTest2.cc
+#EPATest_SOURCES 	= EPATest.h EPATest.cc
+#EPATest_LDADD 		= $(top_builddir)/src/libabsdevel.la
 
-# CheckWeightsTest2_LDADD = \
-# 	$(top_builddir)/src/libabs.la \
-# 	$(top_builddir)/src/libabsdevel.la
-
-AVTStub_SOURCES = \
-	AVTStub.h \
-	AVTStub.cc
-
-AVTStub_LDADD = \
-	$(top_builddir)/src/libabsdevel.la
-
-EPATest_SOURCES = \
-	EPATest.h \
-	EPATest.cc
-
-EPATest_LDADD = \
-	$(top_builddir)/src/libabsdevel.la
-
-SweepTest_SOURCES = \
-	SweepTest.h \
-	SweepTest.cc
-
-SweepTest_LDADD = \
-	$(top_builddir)/src/libabsdevel.la
+#SweepTest_SOURCES 	=  SweepTest.h  SweepTest.cc
+#SweepTest_LDADD 	= $(top_builddir)/src/libabsdevel.la
 
 BUILT_SOURCES = \
 	AVTStub.conf \
diff --git a/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot b/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot
index a921077559c19fcedca24e17e377c97bedbb6c01..97b29f7c22e1246b7c080c406c50ca0cf230a52a 100644
--- a/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot
+++ b/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot
@@ -23,6 +23,8 @@ include = '<Common/LofarTypes.h>';
 
 prelude = << PRELUDE_END
 
+typedef	void*	memptr_t;
+
 enum {
 	SUCCESS = 0,
 	ERR_RANGE,       		// range error in message parameters
@@ -152,7 +154,7 @@ event = {
       };
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
       param = { // return the subarray class
 	    name = "subarray";
@@ -179,7 +181,7 @@ event = {
       };
       param = { // handle
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
       // TODO: AntennaGains is not good name, since the gains are
       // computed for the complete signal path for a receiver.
@@ -199,7 +201,7 @@ event = {
       };
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
 };
 
@@ -216,7 +218,7 @@ event = {
       };
       param = {
 	    name = "handle";
-	    type = "uint32";
+	    type = "memptr_t";
       };
 };
 
diff --git a/MAC/APL/PAC/CalServer/src/ACMProxy.h b/MAC/APL/PAC/CalServer/src/ACMProxy.h
index 07a74ff7ac31e68804fb3bce523a3b51d2d978fa..b6c0c46aaf29602c6c0f3c8560e77808a0481536 100644
--- a/MAC/APL/PAC/CalServer/src/ACMProxy.h
+++ b/MAC/APL/PAC/CalServer/src/ACMProxy.h
@@ -31,6 +31,7 @@
 #include <GCF/TM/GCF_Control.h>
 
 namespace LOFAR {
+typedef		void*		memptr_t;
   namespace CAL {
 
     class ACMProxy : public GCFTask
@@ -74,8 +75,8 @@ namespace LOFAR {
       /**
        * Port to the RSPDriver.
        */
-      GCFPort m_rspdriver; // connection to the RSPDriver
-      uint32  m_handle; // handle for the UPDXCSTATS events
+      GCFPort 	m_rspdriver;	// connection to the RSPDriver
+      memptr_t	m_handle; 		// handle for the UPDXCSTATS events
 
       RTC::Timestamp m_starttime; // first ACM will be received at this time
       int     m_request_subband;  // current index for request subband
diff --git a/MAC/APL/PAC/CalServer/src/CalServer.cc b/MAC/APL/PAC/CalServer/src/CalServer.cc
index 6fa971fdd2bedd40521adefc3a5674db954e357e..94dce934cb029f4a6837194594efc25f69994417 100644
--- a/MAC/APL/PAC/CalServer/src/CalServer.cc
+++ b/MAC/APL/PAC/CalServer/src/CalServer.cc
@@ -669,7 +669,7 @@ GCFEvent::TResult CalServer::handle_cal_subscribe(GCFEvent& e, GCFPortInterface
 														subscribe.subbandset,
 														port);
 
-		ack.handle = (uint32)subscription;
+		ack.handle = (CAL_Protocol::memptr_t)subscription;
 		subarray->attach(subscription); // attach subscription to the subarray
 		ack.subarray = *subarray; 		// return subarray positions
 
diff --git a/MAC/APL/PAC/CalServer/src/SubArraySubscription.cc b/MAC/APL/PAC/CalServer/src/SubArraySubscription.cc
index 55045e33cf7dcf8f71a8d6cab5f4bf3027c395bc..70a6d88e988ee41e4f0bf26bd73f51c6762d005c 100644
--- a/MAC/APL/PAC/CalServer/src/SubArraySubscription.cc
+++ b/MAC/APL/PAC/CalServer/src/SubArraySubscription.cc
@@ -43,7 +43,7 @@ void SubArraySubscription::update(Subject* subject)
     CALUpdateEvent update;
     update.timestamp.setNow(0);
     update.status = SUCCESS;
-    update.handle = (uint32)this;
+    update.handle = (memptr_t)this;
 
     update.gains = *calibratedGains;
 
diff --git a/MAC/APL/PAC/CalServer/test/CalTest.cc b/MAC/APL/PAC/CalServer/test/CalTest.cc
index 5e8fc7206e030a26a6519b7603d559cf3d78cace..8ee439a1a650ef6c37bb201960e4ad1d618bac4d 100644
--- a/MAC/APL/PAC/CalServer/test/CalTest.cc
+++ b/MAC/APL/PAC/CalServer/test/CalTest.cc
@@ -50,7 +50,7 @@ CalTest::CalTest(string name, string arrayname, string parentname, int nantennas
   : GCFTask((State)&CalTest::initial, name), Test(name), m_handle(0), m_counter1(0),
     m_arrayname(arrayname), m_parentname(parentname), m_nantennas(nantennas), m_nyquistzone(nyquistzone), m_rcucontrol(rcucontrol), m_subarrayid(subarrayid)
 {
-  registerProtocol(CAL_PROTOCOL, CAL_PROTOCOL_signalnames);
+  registerProtocol(CAL_PROTOCOL, CAL_PROTOCOL_STRINGS);
 
   m_server.init(*this, MAC_SVCMASK_CALSERVER, GCFPortInterface::SAP, CAL_PROTOCOL);
 }
diff --git a/MAC/APL/PAC/CalServer/test/CalTest.h b/MAC/APL/PAC/CalServer/test/CalTest.h
index 2ec4bbf1e0ecbe8715e1052c343b7407b01ae73c..0232d1516fc8f818c98210475f0f2861300bc98a 100644
--- a/MAC/APL/PAC/CalServer/test/CalTest.h
+++ b/MAC/APL/PAC/CalServer/test/CalTest.h
@@ -76,8 +76,8 @@ namespace LOFAR
 	  // ports
 	  GCFPort m_server;
 
-	  LOFAR::uint32 m_handle; // subscription handle
-	  int m_counter1; // general purpose test counter, semantics assigned per test
+	  memptr_t	m_handle; // subscription handle
+	  int 		m_counter1; // general purpose test counter, semantics assigned per test
 
 	  string  m_name;        // name of the current array
 	  string  m_arrayname;   // name of the new subarray
diff --git a/MAC/APL/PIC/RSPDriver/src/RSPDriver.cc b/MAC/APL/PIC/RSPDriver/src/RSPDriver.cc
index 26a83c068818ccececd1682fef73f07da2532d6a..0f45aae1cc892acf303449666573f316679a2530 100644
--- a/MAC/APL/PIC/RSPDriver/src/RSPDriver.cc
+++ b/MAC/APL/PIC/RSPDriver/src/RSPDriver.cc
@@ -1514,7 +1514,7 @@ void RSPDriver::rsp_subsubbands(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -1626,7 +1626,7 @@ void RSPDriver::rsp_subrcu(GCFEvent& event, GCFPortInterface& port)
 
   ack.timestamp = m_scheduler.getCurrentTime();
   ack.status = SUCCESS;
-  ack.handle = (uint32)&(*command);
+  ack.handle = (memptr_t)&(*command);
   port.send(ack);
 
   (void)m_scheduler.enter(Ptr<Command>(&(*command)),
@@ -1747,7 +1747,7 @@ void RSPDriver::rsp_subhba(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -1896,7 +1896,7 @@ void RSPDriver::rsp_substatus(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -1978,7 +1978,7 @@ void RSPDriver::rsp_substats(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -2060,7 +2060,7 @@ void RSPDriver::rsp_subxcstats(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -2251,7 +2251,7 @@ void RSPDriver::rsp_subclock(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -2307,7 +2307,7 @@ void RSPDriver::rsp_subtdstatus(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
@@ -2420,7 +2420,7 @@ void RSPDriver::rsp_subregisterstate(GCFEvent& event, GCFPortInterface& port)
   {
     ack.timestamp = m_scheduler.getCurrentTime();
     ack.status = SUCCESS;
-    ack.handle = (uint32)&(*command);
+    ack.handle = (memptr_t)&(*command);
     port.send(ack);
   }
 
diff --git a/MAC/APL/PIC/RSPDriver/src/Scheduler.cc b/MAC/APL/PIC/RSPDriver/src/Scheduler.cc
index 561e72d7da49f2636a4021666147d1de55a6f541..465178f5d5ae60657d7000a65b060fd5ebd66d29 100644
--- a/MAC/APL/PIC/RSPDriver/src/Scheduler.cc
+++ b/MAC/APL/PIC/RSPDriver/src/Scheduler.cc
@@ -191,7 +191,7 @@ bool Scheduler::syncHasCompleted()
 
 int Scheduler::pqueue_remove_commands(pqueue& pq,
 				      GCFPortInterface& port,
-				      uint32 handle)
+				      memptr_t handle)
 {
   int count = 0;
   
@@ -234,7 +234,7 @@ int Scheduler::cancel(GCFPortInterface& port)
   return count;
 }
 
-int Scheduler::remove_subscription(GCFPortInterface& port, uint32 handle)
+int Scheduler::remove_subscription(GCFPortInterface& port, memptr_t handle)
 {
   int count = 0;
 
diff --git a/MAC/APL/PIC/RSPDriver/src/Scheduler.h b/MAC/APL/PIC/RSPDriver/src/Scheduler.h
index 9c9c7a17cef0f4dc66e6cae5c7bf953897a4fbe4..feff67fae6c9585fed5c1d6b0d8728d981f573de 100644
--- a/MAC/APL/PIC/RSPDriver/src/Scheduler.h
+++ b/MAC/APL/PIC/RSPDriver/src/Scheduler.h
@@ -79,7 +79,7 @@ namespace LOFAR {
       /**
        * Remove commands matching the specified port and handle.
        */
-      int remove_subscription(GCFPortInterface& port, uint32 handle);
+      int remove_subscription(GCFPortInterface& port, memptr_t handle);
       
       /**
        * Add a synchronization action to be carried out
@@ -114,7 +114,7 @@ namespace LOFAR {
        */
       int pqueue_remove_commands(pqueue& p,
 				 GCFPortInterface& port,
-				 uint32 handle = 0);
+				 memptr_t handle = 0);
 
       /**
        * Constants from the config file converted to the correct type.
diff --git a/MAC/APL/PIC/RSPDriver/src/SetHBACmd.cc b/MAC/APL/PIC/RSPDriver/src/SetHBACmd.cc
index 7752fde9ed44b69eb8743eb289227b42b1895c54..e2af5e8f41708f4c16a77f0b93cf0bfbcfa14af5 100644
--- a/MAC/APL/PIC/RSPDriver/src/SetHBACmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/SetHBACmd.cc
@@ -100,6 +100,6 @@ bool SetHBACmd::validate() const
   
   return ((m_event->rcumask.count() <= (unsigned int)StationSettings::instance()->nrRcus())
 	  	&& (2 == m_event->settings().dimensions())
-			&& (m_event->rcumask.count() == m_event->settings().extent(firstDim))		// check number off selected rcus
-			&& (MEPHeader::N_HBA_DELAYS == m_event->settings().extent(secondDim))); // check number of delays
+		&& (m_event->rcumask.count() == (unsigned int)m_event->settings().extent(firstDim))		// check number off selected rcus
+		&& (MEPHeader::N_HBA_DELAYS == (unsigned int)m_event->settings().extent(secondDim))); // check number of delays
 }
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdClocksCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdClocksCmd.cc
index 582064dfd00c468010084fdae7b75a1b7d1724d9..b3659c3709bdf3876161a197076ece73164ba07f 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdClocksCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdClocksCmd.cc
@@ -69,7 +69,7 @@ void UpdClocksCmd::complete(CacheBuffer& cache)
     
     ack.timestamp = getTimestamp();
     ack.status = SUCCESS;
-    ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+    ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
     ack.clock = cache.getClock();
 
     getPort()->send(ack);
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdHBACmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdHBACmd.cc
index ef21ecf25bf4b70bbae142487f9e509d963c67aa..22908a0f5a616739c2c648556f45c01ad83ce376 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdHBACmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdHBACmd.cc
@@ -85,7 +85,7 @@ void UpdHBACmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status 	  = SUCCESS;
-  ack.handle 	  = (uint32)this; // opaque ptr used to refer to the subscr.
+  ack.handle 	  = (memptr_t)this; // opaque ptr used to refer to the subscr.
 
   // Allocate room in subbands array
   ack.settings().resize(m_event->rcumask.count(), MEPHeader::N_HBA_DELAYS);
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdRCUCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdRCUCmd.cc
index 060bef79841ac76370950884a26a5c84b2e9a709..eded7a2cd4fc714f01768ab036b927c00a7223b8 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdRCUCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdRCUCmd.cc
@@ -85,7 +85,7 @@ void UpdRCUCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status 	  = SUCCESS;
-  ack.handle 	  = (uint32)this; // opaque ptr used to refer to the subscr.
+  ack.handle 	  = (memptr_t)this; // opaque ptr used to refer to the subscr.
 
   // Allocate room in subbands array
   ack.settings().resize(m_event->rcumask.count());
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdRegisterStateCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdRegisterStateCmd.cc
index 109fca9897f5e258545a0c2edb37d059fb2b5002..afc7fd921513e69707e4f10d52483fc88257aece 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdRegisterStateCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdRegisterStateCmd.cc
@@ -66,7 +66,7 @@ void UpdRegisterStateCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status = SUCCESS;
-  ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+  ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
 
   ack.state = cache.getCache().getState();
 
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdStatsCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdStatsCmd.cc
index 016ae733cf74c58ec2bc85e737ecb18c59410013..c5f70e2804a1f34bbff863d5970296dd4b596012 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdStatsCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdStatsCmd.cc
@@ -70,7 +70,7 @@ void UpdStatsCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status = SUCCESS;
-  ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+  ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
 
   if (m_event->type <= Statistics::SUBBAND_POWER)
   {
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdStatusCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdStatusCmd.cc
index 67b5c6036e087a0030a6c3c006e71b2839c0ce5e..0bb6affb208af03f7670317b9c358cf5f4b510c9 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdStatusCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdStatusCmd.cc
@@ -66,7 +66,7 @@ void UpdStatusCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status = SUCCESS;
-  ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+  ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
 
   ack.sysstatus.board().resize(m_event->rspmask.count());
 
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdSubbandsCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdSubbandsCmd.cc
index 19702ce756de30ab36df6584cabb467c74095f7d..dac7d3273983ea277b3902f23d0e19e5f7f483d5 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdSubbandsCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdSubbandsCmd.cc
@@ -84,7 +84,7 @@ void UpdSubbandsCmd::complete(CacheBuffer& cache)
 
 	ack.timestamp = getTimestamp();
 	ack.status 	  = SUCCESS;
-	ack.handle 	  = (uint32)this; // opaque ptr used to refer to the subscr.
+	ack.handle 	  = (memptr_t)this; // opaque ptr used to refer to the subscr.
 
 	// Allocate room in subbands array
 	// Note: XLETS are allocated at the first 8 registers in the subbands
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdTDStatusCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdTDStatusCmd.cc
index 48c1fa65e14e8497df944d6e37dc4637dc207745..f27ffe2867806d4ef17e5d8845842ce732daa4ee 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdTDStatusCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdTDStatusCmd.cc
@@ -66,7 +66,7 @@ void UpdTDStatusCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status = SUCCESS;
-  ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+  ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
 
   ack.tdstatus.board().resize(m_event->rspmask.count());
 
diff --git a/MAC/APL/PIC/RSPDriver/src/UpdXCStatsCmd.cc b/MAC/APL/PIC/RSPDriver/src/UpdXCStatsCmd.cc
index 0273e9ec2a8f9e361a241590f8b1f2ec68729e7d..ab94144ee1cbe4648f7c345ed54eabe5a2ab8807 100644
--- a/MAC/APL/PIC/RSPDriver/src/UpdXCStatsCmd.cc
+++ b/MAC/APL/PIC/RSPDriver/src/UpdXCStatsCmd.cc
@@ -68,7 +68,7 @@ void UpdXCStatsCmd::complete(CacheBuffer& cache)
 
   ack.timestamp = getTimestamp();
   ack.status = SUCCESS;
-  ack.handle = (uint32)this; // opaque pointer used to refer to the subscription
+  ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription
   ack.stats().resize(cache.getXCStats()().shape());
   ack.stats() = cache.getXCStats()();
 
diff --git a/MAC/APL/PIC/RSPDriver/src/rspctl.h b/MAC/APL/PIC/RSPDriver/src/rspctl.h
index bf3d71887ac4d3f5df2c9cc90cf5a8015bf93632..a46ed3fa5ea058dc3560ce390b125f4116b4ee6a 100644
--- a/MAC/APL/PIC/RSPDriver/src/rspctl.h
+++ b/MAC/APL/PIC/RSPDriver/src/rspctl.h
@@ -476,8 +476,8 @@ namespace LOFAR {
         return m_file[rcu];
       }
     protected:
-      uint32 m_subscriptionhandle;
-      uint32 m_duration;
+      memptr_t 	m_subscriptionhandle;
+      uint32 	m_duration;
       RTC::Timestamp m_endTime;
       int32  m_integration;
       uint32 m_nseconds;
@@ -664,7 +664,7 @@ namespace LOFAR {
       virtual GCFEvent::TResult ack(GCFEvent& e);
       void stop();
     protected:
-      uint32 m_subscriptionhandle;
+      memptr_t	 m_subscriptionhandle;
     private:
     };
 
diff --git a/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot b/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot
index ef5f340ad245cc76b45c3eea1b6081f43d089b2a..8f07d2740a45782647cf0befa9df0c186c4f5e0d 100644
--- a/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot
+++ b/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot
@@ -33,9 +33,11 @@ include = '<APL/RSP_Protocol/XCStatistics.h>';
 
 prelude = << PRELUDE_END
 
-  static const int MAX_N_RSPBOARDS = 24;
-  static const int SUCCESS         = 1;
-  static const int FAILURE         = 0;
+typedef	void*	memptr_t;
+
+static const int MAX_N_RSPBOARDS = 24;
+static const int SUCCESS         = 1;
+static const int FAILURE         = 0;
 
 // The protocol implements the following messages.
 // SETWEIGHTS			(timestamp,	rcumask,weights)
@@ -343,7 +345,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -361,7 +363,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "subbands";
@@ -375,7 +377,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -393,7 +395,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -502,7 +504,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -520,7 +522,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "settings";
@@ -534,7 +536,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -552,7 +554,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -697,7 +699,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -706,7 +708,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -724,7 +726,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -742,7 +744,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "sysstatus";
@@ -828,7 +830,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -837,7 +839,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -855,7 +857,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -873,7 +875,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "stats";
@@ -951,7 +953,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -960,7 +962,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -978,7 +980,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -996,7 +998,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "stats";
@@ -1184,7 +1186,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1202,7 +1204,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "clock";
@@ -1215,7 +1217,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1233,7 +1235,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1294,7 +1296,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1312,7 +1314,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "state";
@@ -1326,7 +1328,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1344,7 +1346,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1453,7 +1455,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1471,7 +1473,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "settings";
@@ -1485,7 +1487,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1503,7 +1505,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1576,7 +1578,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1594,7 +1596,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
   param = {
     name = "tdstatus";
@@ -1608,7 +1610,7 @@ event = {
   dir = IN;
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };
 
@@ -1626,7 +1628,7 @@ event = {
   };
   param = {
     name = "handle";
-    type = "uint32";
+    type = "memptr_t";
   };
 };