diff --git a/simulators/c++2/src_simulator/TMLTransaction.cpp b/simulators/c++2/src_simulator/TMLTransaction.cpp
index 81af72533be70b835674b3f5ae1a4449b321d992..4cb3a37ffb143adfa54a8a618d60bec200f5c621 100755
--- a/simulators/c++2/src_simulator/TMLTransaction.cpp
+++ b/simulators/c++2/src_simulator/TMLTransaction.cpp
@@ -129,7 +129,7 @@ TMLTime TMLTransaction::getEndTime() const{
 	//return _startTime  + _length;
 }
 
-unsigned int TMLTransaction::getIdlePenalty() const{
+TMLTime TMLTransaction::getIdlePenalty() const{
 #ifdef PENALTIES_ENABLED
 	return _idlePenalty;
 #else
@@ -137,13 +137,13 @@ unsigned int TMLTransaction::getIdlePenalty() const{
 #endif
 }
 
-void TMLTransaction::setIdlePenalty(unsigned int iIdlePenalty){
+void TMLTransaction::setIdlePenalty(TMLTime iIdlePenalty){
 #ifdef PENALTIES_ENABLED
 	_idlePenalty=iIdlePenalty;
 #endif
 }
 
-unsigned int TMLTransaction::getTaskSwitchingPenalty() const{
+TMLTime TMLTransaction::getTaskSwitchingPenalty() const{
 #ifdef PENALTIES_ENABLED
 	return _taskSwitchingPenalty;
 #else
@@ -151,13 +151,13 @@ unsigned int TMLTransaction::getTaskSwitchingPenalty() const{
 #endif
 }
 
-void TMLTransaction::setTaskSwitchingPenalty(unsigned int iTaskSwitchingPenalty){
+void TMLTransaction::setTaskSwitchingPenalty(TMLTime iTaskSwitchingPenalty){
 #ifdef PENALTIES_ENABLED
 	_taskSwitchingPenalty=iTaskSwitchingPenalty;
 #endif	
 }
 
-unsigned int TMLTransaction::getBranchingPenalty() const{
+TMLTime TMLTransaction::getBranchingPenalty() const{
 #ifdef PENALTIES_ENABLED
 	return _branchingPenalty;
 #else
@@ -165,7 +165,7 @@ unsigned int TMLTransaction::getBranchingPenalty() const{
 #endif
 }
 
-void TMLTransaction::setBranchingPenalty(unsigned int iBranchingPenalty){
+void TMLTransaction::setBranchingPenalty(TMLTime iBranchingPenalty){
 #ifdef PENALTIES_ENABLED
 	_branchingPenalty=iBranchingPenalty;
 #endif
diff --git a/simulators/c++2/src_simulator/TMLTransaction.h b/simulators/c++2/src_simulator/TMLTransaction.h
index f2576bae6eb163212df207c46cf7a7d5c2ac60ec..0acab758550f9d3458983f048b2ef1e1f2eb8278 100644
--- a/simulators/c++2/src_simulator/TMLTransaction.h
+++ b/simulators/c++2/src_simulator/TMLTransaction.h
@@ -126,32 +126,32 @@ public:
 	/**
       	\return Idle panalty
     	*/
-	unsigned int getIdlePenalty() const;
+	TMLTime getIdlePenalty() const;
 	///Sets the idle panalty of the transaction
 	/**
       	\param iIdlePenalty Idle penalty
     	*/
-	void setIdlePenalty(unsigned int iIdlePenalty);
+	void setIdlePenalty(TMLTime iIdlePenalty);
 	///Returns the task switching panalty of the transaction
 	/**
       	\return Task switching penalty
     	*/	
-	unsigned int getTaskSwitchingPenalty() const;
+	TMLTime getTaskSwitchingPenalty() const;
 	///Sets the task switching panalty of the transaction
 	/**
       	\param iTaskSwitchingPenalty Task switching penalty
     	*/	
-	void setTaskSwitchingPenalty(unsigned int iTaskSwitchingPenalty);
+	void setTaskSwitchingPenalty(TMLTime iTaskSwitchingPenalty);
 	///Returns the branching panalty of the transaction
 	/**
       	\return Branching penalty
     	*/	
-	unsigned int getBranchingPenalty() const;
+	TMLTime getBranchingPenalty() const;
 	///Sets the branching panalty of the transaction
 	/**
       	\param iBranchingPenalty Branching penalty
     	*/
-	void setBranchingPenalty(unsigned int iBranchingPenalty);
+	void setBranchingPenalty(TMLTime iBranchingPenalty);
 	/////Returns the terminated flag of the transaction
 	//bool getTerminatedFlag() const;
 	/////Sets the terminated flag of the transaction to true
@@ -192,11 +192,11 @@ protected:
 	TMLCommand* _command;
 #ifdef PENALTIES_ENABLED
 	///Idle penalty
-	unsigned int _idlePenalty;
+	TMLTime _idlePenalty;
 	///Task switching penalty
-	unsigned int _taskSwitchingPenalty;
+	TMLTime _taskSwitchingPenalty;
 	///Branching penalty
-	unsigned int _branchingPenalty;
+	TMLTime _branchingPenalty;
 #endif
 	///Channel on which data was conveyed
 	TMLChannel* _channel;
diff --git a/simulators/c++2/src_simulator/app/ChannelAbstr.h b/simulators/c++2/src_simulator/app/ChannelAbstr.h
index 2430cfc6b0bb0b83bf408039dfc0b4e199854907..1965715dbdeb2992c16f27e512f60df473b6ed23 100644
--- a/simulators/c++2/src_simulator/app/ChannelAbstr.h
+++ b/simulators/c++2/src_simulator/app/ChannelAbstr.h
@@ -65,7 +65,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	inline unsigned int getID() const{
+	inline ID getID() const{
 		return _channel->getID();
 	}
 	///Returns a flag indicating if a channel overflow has been encoutered
diff --git a/simulators/c++2/src_simulator/app/CommandAbstr.h b/simulators/c++2/src_simulator/app/CommandAbstr.h
index a497497c6bd026b8d8aadf245942a5a98a44f25d..cf1b920ede8136f0acd2c626883dbe68ff2e1c02 100644
--- a/simulators/c++2/src_simulator/app/CommandAbstr.h
+++ b/simulators/c++2/src_simulator/app/CommandAbstr.h
@@ -65,7 +65,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	inline unsigned int getID() const{
+	inline ID getID() const{
 		return _cmd->getID();
 	}
 	///Returns the progress of the command
diff --git a/simulators/c++2/src_simulator/app/TMLActionCommand.cpp b/simulators/c++2/src_simulator/app/TMLActionCommand.cpp
index f4e82d52c7cfe69513ac4844566da4ec5cc962e5..2d20d2abee13e2328c88722b39fcf40b8b8019ef 100755
--- a/simulators/c++2/src_simulator/app/TMLActionCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLActionCommand.cpp
@@ -43,7 +43,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <SimComponents.h>
 #include <CommandListener.h>
 
-TMLActionCommand::TMLActionCommand(unsigned int iID, TMLTask* iTask, ActionFuncPointer iActionFunc):TMLCommand(iID, iTask, 1, 1),_actionFunc(iActionFunc){
+TMLActionCommand::TMLActionCommand(ID iID, TMLTask* iTask, ActionFuncPointer iActionFunc):TMLCommand(iID, iTask, 1, 1),_actionFunc(iActionFunc){
 }
 
 void TMLActionCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLActionCommand.h b/simulators/c++2/src_simulator/app/TMLActionCommand.h
index c069e7ed6a2fa92e58880ea83e40fef4116ea61a..c5ba7668aa235401ce34f909be37b4f79fc7cda2 100755
--- a/simulators/c++2/src_simulator/app/TMLActionCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLActionCommand.h
@@ -55,7 +55,7 @@ public:
       	\param iTask Pointer to the task the command belongs to
 	\param iActionFunc Member function pointer to the action function
     	*/
-	TMLActionCommand(unsigned int iID, TMLTask* iTask, ActionFuncPointer iActionFunc);
+	TMLActionCommand(ID iID, TMLTask* iTask, ActionFuncPointer iActionFunc);
 	void execute();
 	//TMLTask* getDependentTask() const;
 	std::string toString() const;
diff --git a/simulators/c++2/src_simulator/app/TMLChannel.cpp b/simulators/c++2/src_simulator/app/TMLChannel.cpp
index 9769066ef007e3d1b71c29c056ccaea4d3adb93a..4cfd051c2e849c36a81e460a3f6c07fe6368e95d 100755
--- a/simulators/c++2/src_simulator/app/TMLChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLChannel.cpp
@@ -43,7 +43,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLCommand.h>
 #include <TMLTransaction.h>
 
-TMLChannel::TMLChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, unsigned int iPriority): _ID(iID), _name(iName), _width(iWidth), _readTask(0), _writeTask(0), _writeTrans(0), _readTrans(0),_numberOfHops(iNumberOfHops), _masters(iMasters), _slaves(iSlaves), _writeTransCurrHop(0), _readTransCurrHop(iNumberOfHops-1), _priority(iPriority){
+TMLChannel::TMLChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, Priority iPriority): _ID(iID), _name(iName), _width(iWidth), _readTask(0), _writeTask(0), _writeTrans(0), _readTrans(0),_numberOfHops(iNumberOfHops), _masters(iMasters), _slaves(iSlaves), _writeTransCurrHop(0), _readTransCurrHop(iNumberOfHops-1), _priority(iPriority){
 }
 
 TMLChannel::~TMLChannel(){
@@ -126,11 +126,11 @@ void TMLChannel::reset(){
 	//std::cout << "Channel reset end" << std::endl;
 }
 
-unsigned int TMLChannel::getID() const {
+ID TMLChannel::getID() const {
 	return _ID;
 }
 
-unsigned int TMLChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
+TMLLength TMLChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
 	return iNbOfSamples;
 }
 
@@ -150,7 +150,7 @@ bool TMLChannel::getUnderflow() const{
 	return false;
 }
 
-unsigned int TMLChannel::getPriority(){
+Priority TMLChannel::getPriority(){
 	return _priority;
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLChannel.h b/simulators/c++2/src_simulator/app/TMLChannel.h
index d88bc2bf447cf5dbefe49ac6c02e462697e8cc41..8eaef59a189909479eb0d26c33361f01f0f7dbd1 100755
--- a/simulators/c++2/src_simulator/app/TMLChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLChannel.h
@@ -66,7 +66,7 @@ public:
 	\param iSlaves Pointers to the slaves on which the channel is mapped
 	\param iPrio Priority of the channel
     	*/
-	TMLChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, unsigned int iPriority);
+	TMLChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, Priority iPriority);
 	///Destructor
 	virtual ~TMLChannel();
 	///Prepares a write operation
@@ -141,14 +141,14 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const;
+	ID getID() const;
 	///Inserts samples into the channel
 	/**
 	\param iNbOfSamples Number of samples to insert
 	\param iParam Parameter to insert
       	\return Returns true if successful
     	*/ 
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 	///Writes XML information about the component to a stream
 	/**
       	\param s Reference to an output stream
@@ -178,7 +178,7 @@ public:
 	/**
 	\return Hash Value
 	*/
-	unsigned int getPriority();
+	Priority getPriority();
 	///Returns the width of the channel
 	/**
 	\return Channel width
@@ -186,7 +186,7 @@ public:
 	unsigned int getWidth();
 protected:
 	///ID of channel
-	unsigned int _ID;
+	ID _ID;
 	///Name of the channel
 	std::string _name;
 	///Channel size
@@ -210,7 +210,7 @@ protected:
 	///Keeps track of the current Hop of a read Transaction
 	unsigned int _readTransCurrHop;
 	///channel priority
-	unsigned int _priority;
+	Priority _priority;
 };
 
 #endif
diff --git a/simulators/c++2/src_simulator/app/TMLChoiceCommand.cpp b/simulators/c++2/src_simulator/app/TMLChoiceCommand.cpp
index 3fd2a09cb7a6776d0d5412466d2ccd4690c32d34..19fb790145e606fd5b7f06b6e4304619c5b574e2 100755
--- a/simulators/c++2/src_simulator/app/TMLChoiceCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLChoiceCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <SimComponents.h>
 #include <CommandListener.h>
 
-TMLChoiceCommand::TMLChoiceCommand(unsigned int iID, TMLTask* iTask, CondFuncPointer iCondFunc, unsigned int iNbOfBranches, bool iNonDeterm):TMLCommand(iID, iTask, 1, iNbOfBranches), _condFunc(iCondFunc), _indexNextCommand(0), /*_nbOfBranches(iNbOfBranches),*/ _preferredBranch(-1), _nonDeterm(iNonDeterm){
+TMLChoiceCommand::TMLChoiceCommand(ID iID, TMLTask* iTask, CondFuncPointer iCondFunc, unsigned int iNbOfBranches, bool iNonDeterm):TMLCommand(iID, iTask, 1, iNbOfBranches), _condFunc(iCondFunc), _indexNextCommand(0), /*_nbOfBranches(iNbOfBranches),*/ _preferredBranch(-1), _nonDeterm(iNonDeterm){
 }
 
 void TMLChoiceCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLChoiceCommand.h b/simulators/c++2/src_simulator/app/TMLChoiceCommand.h
index 6d9d661c6b5419e22b38d8f96dd16b604a308084..8c63a39d1f66ba2ab791d58dcf957434d8f6fa65 100755
--- a/simulators/c++2/src_simulator/app/TMLChoiceCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLChoiceCommand.h
@@ -57,7 +57,7 @@ public:
 	\param iNbOfBranches Number of branches of the choice
 	\param iNonDeterm Flag is true for non deterministic commands
     	*/
-	TMLChoiceCommand(unsigned int iID, TMLTask* iTask, CondFuncPointer iCondFunc, unsigned int iNbOfBranches, bool iNonDeterm);
+	TMLChoiceCommand(ID iID, TMLTask* iTask, CondFuncPointer iCondFunc, unsigned int iNbOfBranches, bool iNonDeterm);
 	void execute();
 	//TMLTask* getDependentTask() const;
 	std::string toString() const;
diff --git a/simulators/c++2/src_simulator/app/TMLCommand.cpp b/simulators/c++2/src_simulator/app/TMLCommand.cpp
index 5e58afa5a1c3093ce4c74dd99d74f0c31aea17bd..f8e5903ce9053beaeaafa5f22081ee7cccc86a1c 100755
--- a/simulators/c++2/src_simulator/app/TMLCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLCommand.cpp
@@ -53,7 +53,7 @@ Ludovic Apvrille, Renaud Pacalet
 std::list<TMLCommand*> TMLCommand::_instanceList;
 SimComponents* TMLCommand::_simComp=0;
 
-TMLCommand::TMLCommand(unsigned int iID, TMLTask* iTask, TMLLength iLength, unsigned int iNbOfNextCmds): _ID(iID), _length(iLength), _progress(0), _currTransaction(0), _task(iTask), _nextCommand(0), /*_paramFunc(iParamFunc),*/ _nbOfNextCmds(iNbOfNextCmds), _breakpoint(0), _justStarted(true){
+TMLCommand::TMLCommand(ID iID, TMLTask* iTask, TMLLength iLength, unsigned int iNbOfNextCmds): _ID(iID), _length(iLength), _progress(0), _currTransaction(0), _task(iTask), _nextCommand(0), /*_paramFunc(iParamFunc),*/ _nbOfNextCmds(iNbOfNextCmds), _breakpoint(0), _justStarted(true){
 	_instanceList.push_back(this);
 	_task->addCommand(iID, this);
 }
@@ -254,7 +254,7 @@ void TMLCommand::removeGlobalListener(CommandListener* iListener){
 	}
 }
 
-unsigned int TMLCommand::getID() const{
+ID TMLCommand::getID() const{
 	return _ID;
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLCommand.h b/simulators/c++2/src_simulator/app/TMLCommand.h
index 4b09f9e933436b2adae467d6bcb784fc3fa3baac..b75ad799afe564847910248cca269242dd13ef93 100755
--- a/simulators/c++2/src_simulator/app/TMLCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLCommand.h
@@ -64,7 +64,7 @@ public:
 	\param iNbOfNextCmds Number of next commands
     	*/
 	//TMLCommand(unsigned int iID, TMLTask* iTask, TMLLength iLength, ParamFuncPointer iParamFunc, unsigned int iNbOfNextCmds);
-	TMLCommand(unsigned int iID, TMLTask* iTask, TMLLength iLength, unsigned int iNbOfNextCmds);
+	TMLCommand(ID iID, TMLTask* iTask, TMLLength iLength, unsigned int iNbOfNextCmds);
 	///Destructor
 	virtual ~TMLCommand();
 	///Initializes the command and passes the control flow to the prepare() method of the next command if necessary
@@ -158,7 +158,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const;
+	ID getID() const;
 	///Sets a new breakpoint
 	/**
       	\param iBreakp Pointer to breakpoint
@@ -189,7 +189,7 @@ public:
 	unsigned long getStateHash() const;
 protected:
 	///ID of the command
-	unsigned int _ID;
+	ID _ID;
 	///Length of the command
 	TMLLength _length;
 	///Progress of the command (in execution units)
diff --git a/simulators/c++2/src_simulator/app/TMLEventBChannel.cpp b/simulators/c++2/src_simulator/app/TMLEventBChannel.cpp
index 282ecd62912dc2e7d85d87224a1b90654b0c4b6e..c232192f87abec48b8c7ce39c723a57d5a82eb6a 100644
--- a/simulators/c++2/src_simulator/app/TMLEventBChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLEventBChannel.cpp
@@ -42,7 +42,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <TMLCommand.h>
 
-TMLEventBChannel::TMLEventBChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, bool iRequestChannel, bool iSourceIsFile):TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent), _requestChannel(iRequestChannel), _sourceIsFile(iSourceIsFile),_eventFile(0) {
+TMLEventBChannel::TMLEventBChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, bool iRequestChannel, bool iSourceIsFile):TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent), _requestChannel(iRequestChannel), _sourceIsFile(iSourceIsFile),_eventFile(0) {
 	_overflow = false; 
 	if (_sourceIsFile){
 		std::cout << "try to open Event file " << _name.c_str() << std::endl;
@@ -62,7 +62,7 @@ TMLEventBChannel::~TMLEventBChannel(){
 void TMLEventBChannel::readNextEvents(){
 	//std::cout << "vv" << std::endl;
 	if (_eventFile->is_open()){
-		int i=0;
+		unsigned int i=0;
 		Parameter<ParamType> aNewParam; //NEW
 		while (++i<NO_EVENTS_TO_LOAD && !_eventFile->eof()){
 			_content++;
@@ -191,8 +191,8 @@ void TMLEventBChannel::reset(){
 	}
 }
 
-unsigned int TMLEventBChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
-	unsigned int aNbToInsert;
+TMLLength TMLEventBChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
+	TMLLength aNbToInsert;
 	if (iNbOfSamples==0){
 		_content=0;
 		_paramQueue.clear();
@@ -200,7 +200,7 @@ unsigned int TMLEventBChannel::insertSamples(unsigned int iNbOfSamples, Paramete
 	}else{
 		aNbToInsert=iNbOfSamples;
 		_content+=iNbOfSamples;
-		for (unsigned int i=0; i<iNbOfSamples; i++) _paramQueue.push_back(iParam);
+		for (TMLLength i=0; i<iNbOfSamples; i++) _paramQueue.push_back(iParam);
 	} 
 	if (_readTrans!=0) _readTrans->setVirtualLength((_content>0)?WAIT_SEND_VLEN:0);
 	return aNbToInsert;
diff --git a/simulators/c++2/src_simulator/app/TMLEventBChannel.h b/simulators/c++2/src_simulator/app/TMLEventBChannel.h
index 389af613db4c597e3002a6caec7f3fda2d9f9eca..8c8df2581d4839c599232a8f8d84da21187ce398 100644
--- a/simulators/c++2/src_simulator/app/TMLEventBChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLEventBChannel.h
@@ -61,7 +61,7 @@ public:
 	\param iRequestChannel Flag indicating if channel is used by a request
 	\param iSourceIsFile Flag indicating if events are read from a file
     	*/
-	TMLEventBChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, bool iRequestChannel=false, bool iSourceIsFile=false);
+	TMLEventBChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, bool iRequestChannel=false, bool iSourceIsFile=false);
 	~TMLEventBChannel();
 	void testWrite(TMLTransaction* iTrans);
 	void testRead(TMLTransaction* iTrans);
@@ -76,7 +76,7 @@ public:
 	std::ostream& writeObject(std::ostream& s);
 	std::istream& readObject(std::istream& s);
 	void reset();
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 protected:
 	void readNextEvents();
 	///Flag indicating if channel is used by a request
diff --git a/simulators/c++2/src_simulator/app/TMLEventChannel.cpp b/simulators/c++2/src_simulator/app/TMLEventChannel.cpp
index ab6c04847a25a2a6218e0876c1e62c3102443345..6fcd513375a115c78d090d8ac789db1a401c09d0 100644
--- a/simulators/c++2/src_simulator/app/TMLEventChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLEventChannel.cpp
@@ -40,7 +40,7 @@ Ludovic Apvrille, Renaud Pacalet
 
 #include <TMLEventChannel.h>
 
-TMLEventChannel::TMLEventChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent): TMLStateChannel(iID, iName, 1, iNumberOfHops, iMasters, iSlaves, iContent, 0),_tmpParam(0,0,0), _stateHash(0){
+TMLEventChannel::TMLEventChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent): TMLStateChannel(iID, iName, 1, iNumberOfHops, iMasters, iSlaves, iContent, 0),_tmpParam(0,0,0), _stateHash(0){
 }
 
 TMLEventChannel::~TMLEventChannel(){
diff --git a/simulators/c++2/src_simulator/app/TMLEventChannel.h b/simulators/c++2/src_simulator/app/TMLEventChannel.h
index 4de0cda6d8b67cd687dce321e3d3e4325716512f..c9476d314d0c7ad9d25d9ca4c0533ca67cddb892 100644
--- a/simulators/c++2/src_simulator/app/TMLEventChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLEventChannel.h
@@ -59,7 +59,7 @@ public:
 	\param iSlaves Pointers to the slaves on which the channel is mapped
 	\param iContent Initial content of the channel
     	*/
-	TMLEventChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent);
+	TMLEventChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent);
 	///Destructor
 	virtual ~TMLEventChannel();
 	///Cancels a pending read operation 
diff --git a/simulators/c++2/src_simulator/app/TMLEventFBChannel.cpp b/simulators/c++2/src_simulator/app/TMLEventFBChannel.cpp
index 853f2122331a0138a39cb2e36d8971cb70789686..1f42284509e026643dfb69718844ff10a743e42a 100644
--- a/simulators/c++2/src_simulator/app/TMLEventFBChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLEventFBChannel.cpp
@@ -42,7 +42,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <TMLCommand.h>
 
-TMLEventFBChannel::TMLEventFBChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent): TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent),_length(iLength){
+TMLEventFBChannel::TMLEventFBChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent): TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent),_length(iLength){
 }
 
 void TMLEventFBChannel::testWrite(TMLTransaction* iTrans){
@@ -114,8 +114,8 @@ std::string TMLEventFBChannel::toString() const{
 	return outp.str();
 }
 
-unsigned int TMLEventFBChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
-	unsigned int aNbToInsert;
+TMLLength TMLEventFBChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
+	TMLLength aNbToInsert;
 	if (iNbOfSamples==0){
 		_content=0;
 		_paramQueue.clear();
@@ -123,7 +123,7 @@ unsigned int TMLEventFBChannel::insertSamples(unsigned int iNbOfSamples, Paramet
 	}else{
 		aNbToInsert=min(iNbOfSamples, _length-_content);
 		_content+=aNbToInsert;
-		for (unsigned int i=0; i<aNbToInsert; i++) _paramQueue.push_back(iParam);
+		for (TMLLength i=0; i<aNbToInsert; i++) _paramQueue.push_back(iParam);
 	} 
 	if (_writeTrans!=0) _writeTrans->setVirtualLength((_length-_content>0)?WAIT_SEND_VLEN:0);
 	if (_readTrans!=0) _readTrans->setVirtualLength((_content>0)?WAIT_SEND_VLEN:0);
diff --git a/simulators/c++2/src_simulator/app/TMLEventFBChannel.h b/simulators/c++2/src_simulator/app/TMLEventFBChannel.h
index 7c398afd96da6143185ebd3341b40bd62fc04b8c..27b0baa73c734d1d3afecf771d53985e0db43862 100644
--- a/simulators/c++2/src_simulator/app/TMLEventFBChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLEventFBChannel.h
@@ -60,7 +60,7 @@ public:
 	\param iLength Length of the channel
 	\param iContent Initial content of the channel
     	*/
-	TMLEventFBChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent);
+	TMLEventFBChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent);
 	void testWrite(TMLTransaction* iTrans);
 	void testRead(TMLTransaction* iTrans);
 	void write();
@@ -69,7 +69,7 @@ public:
 	TMLTask* getBlockedReadTask() const;
 	TMLTask* getBlockedWriteTask() const;
 	std::string toString() const;
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 protected:
 	///Length of the channel
 	TMLLength _length;
diff --git a/simulators/c++2/src_simulator/app/TMLEventFChannel.cpp b/simulators/c++2/src_simulator/app/TMLEventFChannel.cpp
index c0a95c78cb5cdcd97a29d13be25bbf207d614d2a..9c9a4b5b7c892f6d23c36552bdbcc4ca48dce489 100644
--- a/simulators/c++2/src_simulator/app/TMLEventFChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLEventFChannel.cpp
@@ -42,7 +42,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <TMLCommand.h>
 
-TMLEventFChannel::TMLEventFChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent): TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent),_length(iLength){
+TMLEventFChannel::TMLEventFChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent): TMLEventChannel(iID, iName, iNumberOfHops, iMasters, iSlaves, iContent),_length(iLength){
 }
 
 void TMLEventFChannel::testWrite(TMLTransaction* iTrans){
@@ -112,8 +112,8 @@ std::string TMLEventFChannel::toString() const{
 	return outp.str();
 }
 
-unsigned int TMLEventFChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
-	unsigned int aNbToInsert;
+TMLLength TMLEventFChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
+	TMLLength aNbToInsert;
 	if (iNbOfSamples==0){
 		_content=0;
 		_paramQueue.clear();
@@ -121,7 +121,7 @@ unsigned int TMLEventFChannel::insertSamples(unsigned int iNbOfSamples, Paramete
 	}else{
 		aNbToInsert=min(iNbOfSamples, _length-_content);
 		_content+=aNbToInsert;
-		for (unsigned int i=0; i<aNbToInsert; i++) _paramQueue.push_back(iParam);
+		for (TMLLength i=0; i<aNbToInsert; i++) _paramQueue.push_back(iParam);
 	} 
 	if (_readTrans!=0) _readTrans->setVirtualLength((_content>0)?WAIT_SEND_VLEN:0);
 	return aNbToInsert;
diff --git a/simulators/c++2/src_simulator/app/TMLEventFChannel.h b/simulators/c++2/src_simulator/app/TMLEventFChannel.h
index a16ffcbe7cdb75b7afff0952fabbc5e43ab52536..e22f1030dc4e00fd344a284a3306d833534e4e3e 100644
--- a/simulators/c++2/src_simulator/app/TMLEventFChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLEventFChannel.h
@@ -60,7 +60,7 @@ public:
 	\param iLength Length of the channel
 	\param iContent Initial content of the channel
     	*/
-	TMLEventFChannel(unsigned int iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent);
+	TMLEventFChannel(ID iID, std::string iName, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent);
 	void testWrite(TMLTransaction* iCommand);
 	void testRead(TMLTransaction* iCommand);
 	void write();
@@ -69,7 +69,7 @@ public:
 	TMLTask* getBlockedReadTask() const;
 	TMLTask* getBlockedWriteTask() const;
 	std::string toString() const;
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 protected:
 	///Length of the channel
 	TMLLength _length;
diff --git a/simulators/c++2/src_simulator/app/TMLExeciCommand.cpp b/simulators/c++2/src_simulator/app/TMLExeciCommand.cpp
index 37ff0d05734d02c16e46876cec2a3b0a9a637558..c13bf810f5bceb507e72c1ce9728c6d80d0da208 100755
--- a/simulators/c++2/src_simulator/app/TMLExeciCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLExeciCommand.cpp
@@ -43,7 +43,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 
 
-TMLExeciCommand::TMLExeciCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, unsigned int iType, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _type(iType){
+TMLExeciCommand::TMLExeciCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, unsigned int iType, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _type(iType){
 	_length=iStatLength;
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLExeciCommand.h b/simulators/c++2/src_simulator/app/TMLExeciCommand.h
index 0bf4a113c74678f17c2d65efb7611fcf7d04bd7d..006eb2f30f20ada11bba0d3038a2ea20d69bebef 100755
--- a/simulators/c++2/src_simulator/app/TMLExeciCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLExeciCommand.h
@@ -56,7 +56,7 @@ public:
 	\param iType Exec Type (ExecI, ExecC,...) 
 	\param iStatLength Static length of command if applicable
     	*/
-	TMLExeciCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, unsigned int iType, TMLLength iStatLength=1);
+	TMLExeciCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, unsigned int iType, TMLLength iStatLength=1);
 	void execute();
 	//TMLTask* getDependentTask() const;
 	std::string toString() const;
diff --git a/simulators/c++2/src_simulator/app/TMLNotifiedCommand.cpp b/simulators/c++2/src_simulator/app/TMLNotifiedCommand.cpp
index b5c58b2bea1820910d6af76850b15cb6e92ba686..49bceb5ab976543a28d83040ca5c7bb88d95d0f1 100644
--- a/simulators/c++2/src_simulator/app/TMLNotifiedCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLNotifiedCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLNotifiedCommand::TMLNotifiedCommand(unsigned int iID, TMLTask* iTask,TMLEventChannel* iChannel,TMLLength* iResultVar, const std::string& iResultVarDescr):TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1),_channel(iChannel),_resultVar(iResultVar),_resultVarDescr(iResultVarDescr){
+TMLNotifiedCommand::TMLNotifiedCommand(ID iID, TMLTask* iTask,TMLEventChannel* iChannel,TMLLength* iResultVar, const std::string& iResultVarDescr):TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1),_channel(iChannel),_resultVar(iResultVar),_resultVarDescr(iResultVarDescr){
 }
 
 void TMLNotifiedCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLNotifiedCommand.h b/simulators/c++2/src_simulator/app/TMLNotifiedCommand.h
index f27630331f0f92e720ca78ed98d31d2078d1effb..9fc22edfb6d91fa74d95ee8472ab77e1f2c42811 100644
--- a/simulators/c++2/src_simulator/app/TMLNotifiedCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLNotifiedCommand.h
@@ -57,7 +57,7 @@ public:
 	\param iResultVar Pointer to the variable which has to contain the result
 	\param iResultVarDescr String representation of the result variable
 	*/
-	TMLNotifiedCommand(unsigned int iID, TMLTask* iTask,TMLEventChannel* iChannel,TMLLength* iResultVar,const std::string& iResultVarDescr);
+	TMLNotifiedCommand(ID iID, TMLTask* iTask,TMLEventChannel* iChannel,TMLLength* iResultVar,const std::string& iResultVarDescr);
 	void execute();
 	//TMLTask* getDependentTask() const;
 	TMLChannel* getChannel() const;
diff --git a/simulators/c++2/src_simulator/app/TMLReadCommand.cpp b/simulators/c++2/src_simulator/app/TMLReadCommand.cpp
index 9fdc80320330be6e2d650114a15914b12379957e..0f8b00bc1e45e09d83df0d85c1275bdf77cb8337 100755
--- a/simulators/c++2/src_simulator/app/TMLReadCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLReadCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLReadCommand::TMLReadCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1),_lengthFunc(iLengthFunc), _channel(iChannel){
+TMLReadCommand::TMLReadCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1),_lengthFunc(iLengthFunc), _channel(iChannel){
 	_length = iStatLength * _channel->getWidth();
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLReadCommand.h b/simulators/c++2/src_simulator/app/TMLReadCommand.h
index cf19ce01dd14fc526c56712f23f287c559244f9d..1a690280a58c39fd87d9243a7720d65ef29da9ff 100755
--- a/simulators/c++2/src_simulator/app/TMLReadCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLReadCommand.h
@@ -57,7 +57,7 @@ public:
 	\param iChannel Pointer to the channel which is read
 	\param iStatLength Static length of command if applicable
 	*/
-	TMLReadCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength=1);
+	TMLReadCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength=1);
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLRequestCommand.cpp b/simulators/c++2/src_simulator/app/TMLRequestCommand.cpp
index b3c5ce44b742e275f2a43967f7d3b31d15fd1e76..4744a82c56ff39a3e08b9863f5bbd6646ef813b7 100644
--- a/simulators/c++2/src_simulator/app/TMLRequestCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLRequestCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLRequestCommand::TMLRequestCommand(unsigned int iID, TMLTask* iTask, TMLEventBChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam): TMLCommand(iID,  iTask, WAIT_SEND_VLEN, 1), _channel(iChannel), _statParam(iStatParam){
+TMLRequestCommand::TMLRequestCommand(ID iID, TMLTask* iTask, TMLEventBChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam): TMLCommand(iID,  iTask, WAIT_SEND_VLEN, 1), _channel(iChannel), _statParam(iStatParam){
 }
 
 void TMLRequestCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLRequestCommand.h b/simulators/c++2/src_simulator/app/TMLRequestCommand.h
index 12f181ad300ab2ee7ad6f4b7beeffda6a025ffce..00c5fe402bd6f28402f2e83758c156b686411aef 100644
--- a/simulators/c++2/src_simulator/app/TMLRequestCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLRequestCommand.h
@@ -58,7 +58,7 @@ public:
 	\param iParamFunc Pointer to a parameter function
 	\param statParam Static parameter if applicable 
 	*/
-	TMLRequestCommand(unsigned int iID, TMLTask* iTask, TMLEventBChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam = Parameter<ParamType>(0,0,0));
+	TMLRequestCommand(ID iID, TMLTask* iTask, TMLEventBChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam = Parameter<ParamType>(0,0,0));
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLSelectCommand.cpp b/simulators/c++2/src_simulator/app/TMLSelectCommand.cpp
index fc815f4f88baf83e250972a91cecd300990cd89a..fa2edcb9aaa1005db46b6a4f4c8ae85ec83175c3 100644
--- a/simulators/c++2/src_simulator/app/TMLSelectCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLSelectCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLSelectCommand::TMLSelectCommand(unsigned int iID, TMLTask* iTask, TMLEventChannel** iChannel, unsigned int iNumbChannels, ParamFuncPointer* iParamFuncs):TMLCommand(iID, iTask, WAIT_SEND_VLEN, iNumbChannels), _channel(iChannel), _paramFuncs(iParamFuncs), /*_numbChannels(iNumbChannels),*/ _indexNextCommand(0), _maxChannelIndex(0){
+TMLSelectCommand::TMLSelectCommand(ID iID, TMLTask* iTask, TMLEventChannel** iChannel, unsigned int iNumbChannels, ParamFuncPointer* iParamFuncs):TMLCommand(iID, iTask, WAIT_SEND_VLEN, iNumbChannels), _channel(iChannel), _paramFuncs(iParamFuncs), /*_numbChannels(iNumbChannels),*/ _indexNextCommand(0), _maxChannelIndex(0){
 }
 
 TMLSelectCommand::~TMLSelectCommand(){
diff --git a/simulators/c++2/src_simulator/app/TMLSelectCommand.h b/simulators/c++2/src_simulator/app/TMLSelectCommand.h
index 1abcf6754225e54f9502a64744255c2235e644e0..89fc1a937d23861d2b39047245eaa3ee21297f49 100644
--- a/simulators/c++2/src_simulator/app/TMLSelectCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLSelectCommand.h
@@ -57,7 +57,7 @@ public:
 	\param iNumbChannels Number of channels in the array
 	\param iParamFunc Pointer to an array of parameter functions pointers
 	*/
-	TMLSelectCommand(unsigned int iID, TMLTask* iTask,TMLEventChannel** iChannel, unsigned int iNumbChannels, ParamFuncPointer* iParamFunc);
+	TMLSelectCommand(ID iID, TMLTask* iTask,TMLEventChannel** iChannel, unsigned int iNumbChannels, ParamFuncPointer* iParamFunc);
 	///Destructor
 	~TMLSelectCommand();
 	void execute();
diff --git a/simulators/c++2/src_simulator/app/TMLSendCommand.cpp b/simulators/c++2/src_simulator/app/TMLSendCommand.cpp
index 7e713135f95a83f76ed452afe283540feddff49d..65bd0191c8ee55fdf20557928a34936867d357d5 100644
--- a/simulators/c++2/src_simulator/app/TMLSendCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLSendCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLSendCommand::TMLSendCommand(unsigned int iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam): TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1), _channel(iChannel), _paramFunc(iParamFunc), _statParam(iStatParam){
+TMLSendCommand::TMLSendCommand(ID iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam): TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1), _channel(iChannel), _paramFunc(iParamFunc), _statParam(iStatParam){
 }
 
 void TMLSendCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLSendCommand.h b/simulators/c++2/src_simulator/app/TMLSendCommand.h
index 2b4149389b5091735b05274d320faba1510b09b7..ba6cea9cdff9d69bda27b76e2530ab06a41aaa7c 100644
--- a/simulators/c++2/src_simulator/app/TMLSendCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLSendCommand.h
@@ -58,7 +58,7 @@ public:
 	\param iParamFunc Pointer to a parameter function
 	\param statParam Static parameter if applicable 
 	*/
-	TMLSendCommand(unsigned int iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam=Parameter<ParamType>(0,0,0));
+	TMLSendCommand(ID iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam=Parameter<ParamType>(0,0,0));
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLStateChannel.cpp b/simulators/c++2/src_simulator/app/TMLStateChannel.cpp
index e010266b43d18d1cea7643faee75b218f674113d..543e040aa222a5db6d60f3c89aa1ee7074505829 100644
--- a/simulators/c++2/src_simulator/app/TMLStateChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLStateChannel.cpp
@@ -40,7 +40,7 @@ Ludovic Apvrille, Renaud Pacalet
 
 #include <TMLStateChannel.h>
 
-TMLStateChannel::TMLStateChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, unsigned int iPriority): TMLChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iPriority), _content(iContent), _nbToWrite(0), _nbToRead(0), _overflow(false), _underflow(false){
+TMLStateChannel::TMLStateChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, unsigned int iPriority): TMLChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iPriority), _content(iContent), _nbToWrite(0), _nbToRead(0), _overflow(false), _underflow(false){
 }
 
 TMLStateChannel::~TMLStateChannel(){}
diff --git a/simulators/c++2/src_simulator/app/TMLStateChannel.h b/simulators/c++2/src_simulator/app/TMLStateChannel.h
index 3e88c530074a15b1c15593a2655b3fcfc27bd957..2d270df3a3b8c79dc204e3f7688ceda0970bec4f 100644
--- a/simulators/c++2/src_simulator/app/TMLStateChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLStateChannel.h
@@ -60,7 +60,7 @@ public:
 	\param iContent Initial content of the channel
 	\param iPriority Priority of the channel
     	*/
-	TMLStateChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves ,TMLLength iContent, unsigned int iPriority);
+	TMLStateChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves ,TMLLength iContent, unsigned int iPriority);
 	///Destructor
 	virtual ~TMLStateChannel();
 	virtual std::ostream& writeObject(std::ostream& s);
diff --git a/simulators/c++2/src_simulator/app/TMLStopCommand.cpp b/simulators/c++2/src_simulator/app/TMLStopCommand.cpp
index be1981c18b0f078584e2181f7378a4deacd16fa0..cdd41b9427f800b1c32993dd364da4176ed826b5 100644
--- a/simulators/c++2/src_simulator/app/TMLStopCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLStopCommand.cpp
@@ -41,7 +41,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLStopCommand.h>
 #include <TMLTask.h>
 
-TMLStopCommand::TMLStopCommand(unsigned int iID, TMLTask* iTask): TMLCommand(iID, iTask, 1, 0){
+TMLStopCommand::TMLStopCommand(ID iID, TMLTask* iTask): TMLCommand(iID, iTask, 1, 0){
 }
 
 void TMLStopCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLStopCommand.h b/simulators/c++2/src_simulator/app/TMLStopCommand.h
index 7f54bd4acbf90ad99f4a55417539743d7afb38b1..106fd83211c98de48816708e9dee71403a04aaeb 100644
--- a/simulators/c++2/src_simulator/app/TMLStopCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLStopCommand.h
@@ -53,7 +53,7 @@ public:
       	\param iID ID of the command
       	\param iTask Pointer to the task the command belongs to
     	*/
-	TMLStopCommand(unsigned int iID, TMLTask* iTask);
+	TMLStopCommand(ID iID, TMLTask* iTask);
 	void execute();
 	//TMLTask* getDependentTask() const;
 	std::string toString() const;
diff --git a/simulators/c++2/src_simulator/app/TMLTask.cpp b/simulators/c++2/src_simulator/app/TMLTask.cpp
index aed7cb87e73c015c6f86c9f98471db874081dfe5..2632db4e74feafb67a2347f18e183f85b6165b04 100755
--- a/simulators/c++2/src_simulator/app/TMLTask.cpp
+++ b/simulators/c++2/src_simulator/app/TMLTask.cpp
@@ -43,7 +43,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLStopCommand.h>
 #include <CPU.h>
 
-TMLTask::TMLTask(unsigned int iID, unsigned int iPriority, std::string iName, CPU* iCPU): WorkloadSource(iPriority), _ID(iID), _name(iName), _endLastTransaction(0), _currCommand(0), _firstCommand(0), _cpu(iCPU), _comment(0), _busyCycles(0), _CPUContentionDelay(0), _noCPUTransactions(0), _justStarted(true) {
+TMLTask::TMLTask(ID iID, Priority iPriority, std::string iName, CPU* iCPU): WorkloadSource(iPriority), _ID(iID), _name(iName), _endLastTransaction(0), _currCommand(0), _firstCommand(0), _cpu(iCPU), _comment(0), _busyCycles(0), _CPUContentionDelay(0), _noCPUTransactions(0), _justStarted(true) {
 	_cpu->registerTask(this);
 #ifdef ADD_COMMENTS
 	_commentList.reserve(BLOCK_SIZE);
@@ -60,7 +60,7 @@ TMLTask::~TMLTask(){
 	if (_comment!=0) delete [] _comment;
 }
 
-unsigned int TMLTask::getPriority() const{
+Priority TMLTask::getPriority() const{
 	return _priority;
 }
 
@@ -91,7 +91,7 @@ std::string TMLTask::toShortString() const{
 	return outp.str();
 }
 
-unsigned int TMLTask::getID() const{
+ID TMLTask::getID() const{
 	return _ID;
 }
 
@@ -200,7 +200,7 @@ TMLTime TMLTask::getNextSignalChange(bool iInit, std::string& oSigChange, bool&
 }
 
 std::ostream& TMLTask::writeObject(std::ostream& s){
-	unsigned int aCurrCmd;
+	ID aCurrCmd;
 	WRITE_STREAM(s,_endLastTransaction);
 #ifdef DEBUG_SERIALIZE
 	std::cout << "Write: TMLTask " << _name << " endLastTransaction: " << _endLastTransaction << std::endl;
@@ -237,7 +237,7 @@ std::ostream& TMLTask::writeObject(std::ostream& s){
 }
 
 std::istream& TMLTask::readObject(std::istream& s){
-	unsigned int aCurrCmd;
+	ID aCurrCmd;
 	//_previousTransEndTime=0; _busyCycles=0; _CPUContentionDelay=0; _noCPUTransactions=0;
 	READ_STREAM(s, _endLastTransaction);
 #ifdef DEBUG_SERIALIZE
@@ -321,21 +321,21 @@ void TMLTask::reset(){
 ParamType* TMLTask::getVariableByName(std::string& iVarName ,bool& oIsId){
 	if (iVarName[0]>='0' && iVarName[0]<='9'){
 		oIsId=true;
-		return getVariableByID(StringToNum<unsigned int>(iVarName));
+		return getVariableByID(StringToNum<ID>(iVarName));
 	}
 	oIsId=false;
 	return _varLookUpName[iVarName.c_str()];
 }
 
-ParamType* TMLTask::getVariableByID(unsigned int iVarID){
+ParamType* TMLTask::getVariableByID(ID iVarID){
 	return _varLookUpID[iVarID];
 }
 
-void TMLTask::addCommand(unsigned int iID, TMLCommand* iCmd){
+void TMLTask::addCommand(ID iID, TMLCommand* iCmd){
 	_commandHash[iID]=iCmd;
 }
 
-TMLCommand* TMLTask::getCommandByID(unsigned int iID){
+TMLCommand* TMLTask::getCommandByID(ID iID){
 	return _commandHash[iID];
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLTask.h b/simulators/c++2/src_simulator/app/TMLTask.h
index 2411cf4fd03817a741d7c31d349d4da2979a1490..bee1eaae887fee18dff9399d13ac7a225f0b68c5 100755
--- a/simulators/c++2/src_simulator/app/TMLTask.h
+++ b/simulators/c++2/src_simulator/app/TMLTask.h
@@ -71,14 +71,14 @@ public:
 	\param iName Name of the task
 	\param iCPU pointer to the CPU which executes the task
     	*/
-	TMLTask(unsigned int iID, unsigned int iPriority, std::string iName, CPU* iCPU);
+	TMLTask(ID iID, Priority iPriority, std::string iName, CPU* iCPU);
 	///Destructor
 	virtual ~TMLTask();
 	///Returns the priority of the task
 	/**
       	\return Priority
     	*/
-	unsigned int getPriority() const;
+	Priority getPriority() const;
 	///Returns the end of the last scheduled transaction of the task
 	/**
       	\return End of transaction
@@ -113,7 +113,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const;
+	ID getID() const;
 #ifdef ADD_COMMENTS
 	///Adds a new execution comment to the internal list
 	/**
@@ -150,19 +150,19 @@ public:
 	\param iID ID of the Command
 	\return Pointer to the Commmand
 	*/
-	TMLCommand* getCommandByID(unsigned int iID);
+	TMLCommand* getCommandByID(ID iID);
 	///Adds a new command to the internal list
 	/**
 	\param iID ID of the command
 	\param iCmd Pointer to the command
 	*/
-	void addCommand(unsigned int iID, TMLCommand* iCmd);
+	void addCommand(ID iID, TMLCommand* iCmd);
 	///Returns a pointer to the task variable specified by its ID
 	/**
 	\param iVarID ID of the task variable
 	\return Pointer to the variable
 	*/
-	ParamType* getVariableByID(unsigned int iVarID);
+	ParamType* getVariableByID(ID iVarID);
 	void streamStateXML(std::ostream& s) const;
 	///Returns an iterator for the internal variable ID hash table
 	/**
@@ -191,7 +191,7 @@ public:
 	virtual unsigned long getStateHash() const=0;
 protected:
 	///ID of the task
-	unsigned int _ID;
+	ID _ID;
 	///Name of the task
 	std::string _name;
 	///End of the last scheduled transaction of the task
diff --git a/simulators/c++2/src_simulator/app/TMLWaitCommand.cpp b/simulators/c++2/src_simulator/app/TMLWaitCommand.cpp
index 20ed8d66b683fbebd0fbec4c0e6e99de83b7c1d6..00e1fcb64d8aa622784c6d6b438601fb70e31068 100644
--- a/simulators/c++2/src_simulator/app/TMLWaitCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLWaitCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLWaitCommand::TMLWaitCommand(unsigned int iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam):TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1),_channel(iChannel), _paramFunc(iParamFunc){
+TMLWaitCommand::TMLWaitCommand(ID iID, TMLTask* iTask, TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam):TMLCommand(iID, iTask, WAIT_SEND_VLEN, 1),_channel(iChannel), _paramFunc(iParamFunc){
 }
 
 void TMLWaitCommand::execute(){
diff --git a/simulators/c++2/src_simulator/app/TMLWaitCommand.h b/simulators/c++2/src_simulator/app/TMLWaitCommand.h
index 77a8179f4266bdb78a33c2b1c74d482a116589c6..04c501836e5092e0ce8d4115c7e19cd8f20910ef 100644
--- a/simulators/c++2/src_simulator/app/TMLWaitCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLWaitCommand.h
@@ -58,7 +58,7 @@ public:
 	\param iParamFunc Pointer to a parameter function
 	\param statParam Static parameter if applicable 
 	*/
-	TMLWaitCommand(unsigned int iID, TMLTask* iTask,TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam = Parameter<ParamType>(0,0,0));
+	TMLWaitCommand(ID iID, TMLTask* iTask,TMLEventChannel* iChannel, ParamFuncPointer iParamFunc, Parameter<ParamType> iStatParam = Parameter<ParamType>(0,0,0));
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLWriteCommand.cpp b/simulators/c++2/src_simulator/app/TMLWriteCommand.cpp
index d8ee9e64c09f3671a220f691a2a55cd66426aae8..76d00d16b406cf97478ff83227079d39f9e5c3d6 100755
--- a/simulators/c++2/src_simulator/app/TMLWriteCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLWriteCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLWriteCommand::TMLWriteCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _channel(iChannel){
+TMLWriteCommand::TMLWriteCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _channel(iChannel){
 	_length = iStatLength * _channel->getWidth();
 }
 
diff --git a/simulators/c++2/src_simulator/app/TMLWriteCommand.h b/simulators/c++2/src_simulator/app/TMLWriteCommand.h
index 14feb82f128fa32a98411ae8ea29bd2ddb0c0000..de3939f88eeb0b0eca044f0bfd0c2cc9a742cf54 100755
--- a/simulators/c++2/src_simulator/app/TMLWriteCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLWriteCommand.h
@@ -57,7 +57,7 @@ public:
 	\param iChannel Pointer to the channel to which is written
 	\param iStatLength Static length of command if applicable
 	*/
-	TMLWriteCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength=1);
+	TMLWriteCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel* iChannel, TMLLength iStatLength=1);
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLWriteMultCommand.cpp b/simulators/c++2/src_simulator/app/TMLWriteMultCommand.cpp
index afb67fd0c1bb7f430a5591a71b548b12c5bf806f..f689c3ad455fe574eeaf333f6731b19a8d56c83b 100644
--- a/simulators/c++2/src_simulator/app/TMLWriteMultCommand.cpp
+++ b/simulators/c++2/src_simulator/app/TMLWriteMultCommand.cpp
@@ -44,13 +44,13 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <Bus.h>
 
-TMLWriteMultCommand::TMLWriteMultCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel** iChannels, unsigned int iNbOfChannels, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _channels(iChannels), _nbOfChannels(iNbOfChannels){
+TMLWriteMultCommand::TMLWriteMultCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel** iChannels, unsigned int iNbOfChannels, TMLLength iStatLength): TMLCommand(iID, iTask, 1, 1), _lengthFunc(iLengthFunc), _channels(iChannels), _nbOfChannels(iNbOfChannels){
 	_length=iStatLength * _channels[0]->getWidth();
 }
 
 void TMLWriteMultCommand::execute(){
 	//std::cout << "--begin-- TMLWriteMultCommand::execute\n"; 
-	for (int i=0; i< _nbOfChannels; i++){
+	for (unsigned int i=0; i< _nbOfChannels; i++){
 		_channels[i]->write();
 	}
 	//std::cout << "--end-- TMLWriteMultCommand::execute\n"; 
@@ -74,7 +74,7 @@ TMLCommand* TMLWriteMultCommand::prepareNextTransaction(){
 	//_channels[0]->testWrite(_currTransaction);
 	//minLength=_currTransaction->getVirtualLength();
 	//std::cout << "--begin-- TMLWriteMultCommand::prepareNextTransaction\n"; 
-	for (int i=0; i< _nbOfChannels; i++){
+	for (unsigned int i=0; i< _nbOfChannels; i++){
 		//_currTransaction->setVirtualLength(unitsLeft);
 		_channels[i]->testWrite(_currTransaction);
 		//minLength=min(minLength,_currTransaction->getVirtualLength());
diff --git a/simulators/c++2/src_simulator/app/TMLWriteMultCommand.h b/simulators/c++2/src_simulator/app/TMLWriteMultCommand.h
index d539c4f41544a0cd3f1a61201df2225469a255ed..2b11c20739c67bca9ec3e7d85f9a57d5d310c754 100644
--- a/simulators/c++2/src_simulator/app/TMLWriteMultCommand.h
+++ b/simulators/c++2/src_simulator/app/TMLWriteMultCommand.h
@@ -58,7 +58,7 @@ public:
 	\param iNbOfChannels Number of channels
 	\param iStatLength Static length of command if applicable
 	*/
-	TMLWriteMultCommand(unsigned int iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel** iChannels, unsigned int iNbOfChannels, TMLLength iStatLength=1);
+	TMLWriteMultCommand(ID iID, TMLTask* iTask, LengthFuncPointer iLengthFunc, TMLChannel** iChannels, unsigned int iNbOfChannels, TMLLength iStatLength=1);
 	void execute();
 	TMLChannel* getChannel(unsigned int iIndex) const;
 	unsigned int getNbOfChannels() const;
diff --git a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp
index aae723b1be7980332762edf884ed624f9e73e399..693a2fbd396fa00fb7458da3bb0ab8b6d9e657e0 100755
--- a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp
@@ -42,7 +42,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <TMLCommand.h>
 
-TMLbrbwChannel::TMLbrbwChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength,TMLLength iContent, unsigned int iPriority):TMLStateChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iWidth*iContent, iPriority),_length(iLength){
+TMLbrbwChannel::TMLbrbwChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength,TMLLength iContent, Priority iPriority):TMLStateChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iWidth*iContent, iPriority),_length(iLength){
 }
 
 void TMLbrbwChannel::testWrite(TMLTransaction* iTrans){
@@ -143,8 +143,8 @@ std::string TMLbrbwChannel::toString() const{
 	return outp.str();
 }
 
-unsigned int TMLbrbwChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
-	unsigned int aNbToInsert;
+TMLLength TMLbrbwChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
+	TMLLength aNbToInsert;
 	if (iNbOfSamples==0){
 		_content=0;
 		aNbToInsert=0;
diff --git a/simulators/c++2/src_simulator/app/TMLbrbwChannel.h b/simulators/c++2/src_simulator/app/TMLbrbwChannel.h
index d5537b1e4678358e6fce6a22cf81c0956ffb137f..9b3a0a0092c4d45a448f936829200fceddec0e0d 100755
--- a/simulators/c++2/src_simulator/app/TMLbrbwChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLbrbwChannel.h
@@ -62,7 +62,7 @@ public:
 	\param iContent Initial content of the channel
 	\param iPriority Priority of the channel
     	*/
-	TMLbrbwChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent, unsigned int iPriority);
+	TMLbrbwChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iLength, TMLLength iContent, Priority iPriority);
 	void testWrite(TMLTransaction* iTrans);
 	void testRead(TMLTransaction* iTrans);
 	void write();
@@ -70,7 +70,7 @@ public:
 	TMLTask* getBlockedReadTask() const;
 	TMLTask* getBlockedWriteTask() const;
 	std::string toString() const;
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 protected:
 	///Determines the virtual length of read and write transactions based on the state of the channel
 	void setTransactionLength() const;
diff --git a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp
index 4e94600c33f6c451be004d1312050f7883b13965..36df297c3217ad35a0808f8f43b0e2a38fc20b58 100644
--- a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp
+++ b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.cpp
@@ -41,7 +41,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLbrnbwChannel.h>
 #include <TMLTransaction.h>
 
-TMLbrnbwChannel::TMLbrnbwChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, unsigned int iPriority):TMLStateChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iWidth*iContent, iPriority){
+TMLbrnbwChannel::TMLbrnbwChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, Priority iPriority):TMLStateChannel(iID, iName, iWidth, iNumberOfHops, iMasters, iSlaves, iWidth*iContent, iPriority){
 	_overflow=false;
 }
 
@@ -126,8 +126,8 @@ std::string TMLbrnbwChannel::toString() const{
 	return outp.str();
 }
 
-unsigned int TMLbrnbwChannel::insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam){
-	unsigned int aNbToInsert;
+TMLLength TMLbrnbwChannel::insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam){
+	TMLLength aNbToInsert;
 	if (iNbOfSamples==0){
 		_content=0;
 		aNbToInsert=0;
diff --git a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h
index 0fe74a23f121b1dc2fd89072013e8f15153f7127..fa051bd7ec631f709fed70b5217e246c05784bbc 100644
--- a/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h
+++ b/simulators/c++2/src_simulator/app/TMLbrnbwChannel.h
@@ -61,7 +61,7 @@ public:
 	\param iContent Initial content of the channel
 	\param iPriority Priority of the channel
     	*/
-	TMLbrnbwChannel(unsigned int iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, unsigned int iPriority);
+	TMLbrnbwChannel(ID iID, std::string iName, unsigned int iWidth, unsigned int iNumberOfHops, BusMaster** iMasters, Slave** iSlaves, TMLLength iContent, Priority iPriority);
 	void testWrite(TMLTransaction* iTrans);
 	void testRead(TMLTransaction* iTrans);
 	void write();
@@ -69,7 +69,7 @@ public:
 	TMLTask* getBlockedReadTask() const;
 	TMLTask* getBlockedWriteTask() const;
 	std::string toString() const;
-	virtual unsigned int insertSamples(unsigned int iNbOfSamples, Parameter<ParamType>& iParam);
+	virtual TMLLength insertSamples(TMLLength iNbOfSamples, Parameter<ParamType>& iParam);
 protected:
 	///Determines the virtual length of read and write transactions based on the state of the channel
 	void setTransactionLength() const;
diff --git a/simulators/c++2/src_simulator/app/TaskAbstr.h b/simulators/c++2/src_simulator/app/TaskAbstr.h
index 4cb467e27b48aa605124ba73a0e2840aad0415b3..a239e32db1067a7215fc857132cd45b98407273d 100644
--- a/simulators/c++2/src_simulator/app/TaskAbstr.h
+++ b/simulators/c++2/src_simulator/app/TaskAbstr.h
@@ -58,7 +58,7 @@ public:
 	/**
       	\return Priority
     	*/
-	inline unsigned int getPriority() const{
+	inline Priority getPriority() const{
 		return _task->getPriority();
 	}
 
@@ -73,7 +73,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	inline unsigned int getID() const{
+	inline ID getID() const{
 		return _task->getID();
 	}
 	//getExecTime()
diff --git a/simulators/c++2/src_simulator/arch/Bridge.cpp b/simulators/c++2/src_simulator/arch/Bridge.cpp
index 3a02e9773032eb1c9b649a0796a1c95d51406028..6f32276f8a7cdae9b49d916f8f8152b276cf5405 100644
--- a/simulators/c++2/src_simulator/arch/Bridge.cpp
+++ b/simulators/c++2/src_simulator/arch/Bridge.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLTransaction.h>
 #include <TMLCommand.h>
 
-Bridge::Bridge(unsigned int iID, std::string iName, TMLTime iTimePerCycle, unsigned int iBufferSize): Slave(iID, iName), _timePerCycle(iTimePerCycle), _bufferSize(iBufferSize){
+Bridge::Bridge(ID iID, std::string iName, TMLTime iTimePerCycle, unsigned int iBufferSize): Slave(iID, iName), _timePerCycle(iTimePerCycle), _bufferSize(iBufferSize){
 }
 
 void Bridge::CalcTransactionLength(TMLTransaction* iTrans) const{
diff --git a/simulators/c++2/src_simulator/arch/Bridge.h b/simulators/c++2/src_simulator/arch/Bridge.h
index fb6f43f9ba6961f2d6adc84e53d406cb7a1a28d9..a3463b0f31a79822e50661bd078cbb232e23d660 100644
--- a/simulators/c++2/src_simulator/arch/Bridge.h
+++ b/simulators/c++2/src_simulator/arch/Bridge.h
@@ -57,7 +57,7 @@ public:
 	\param iTimePerCycle 1/Bridge frequency
 	\param iBufferSize Buffer size
 	*/
-	Bridge(unsigned int iID, std::string iName, TMLTime iTimePerCycle, unsigned int iBufferSize);
+	Bridge(ID iID, std::string iName, TMLTime iTimePerCycle, unsigned int iBufferSize);
 	///Accounts for the delay caused by the bridge
 	/**
 	\param iTrans Pointer to the transaction to be processed
diff --git a/simulators/c++2/src_simulator/arch/Bus.cpp b/simulators/c++2/src_simulator/arch/Bus.cpp
index f9aa529d8dce7e539b4fc23ef5dc747fbf632d38..851680bee307248c86b6e8beeacdd39b861de9d6 100644
--- a/simulators/c++2/src_simulator/arch/Bus.cpp
+++ b/simulators/c++2/src_simulator/arch/Bus.cpp
@@ -47,7 +47,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TransactionListener.h>
 #include <WorkloadSource.h>
 
-Bus::Bus(unsigned int iID, std::string iName, WorkloadSource* iScheduler, TMLLength iBurstSize, unsigned int ibusWidth, TMLTime iTimePerSample, bool iChannelBasedPrio): SchedulableCommDevice(iID, iName, iScheduler, iChannelBasedPrio), _burstSize(iBurstSize), _schedulingNeeded(true), _timePerSample(iTimePerSample), _busWidth(ibusWidth), _busyCycles(0){}
+Bus::Bus(ID iID, std::string iName, WorkloadSource* iScheduler, TMLLength iBurstSize, unsigned int ibusWidth, TMLTime iTimePerSample, bool iChannelBasedPrio): SchedulableCommDevice(iID, iName, iScheduler, iChannelBasedPrio), _burstSize(iBurstSize), _schedulingNeeded(true), _timePerSample(iTimePerSample), _busWidth(ibusWidth), _busyCycles(0){}
 
 Bus::~Bus(){
 	delete _scheduler;
@@ -91,7 +91,7 @@ bool Bus::addTransaction(){
 }
 
 void Bus::calcStartTimeLength(TMLTime iTimeSlice) const{
-	_nextTransaction->setStartTime(max(static_cast<int>(_endSchedule)-static_cast<int>(_nextTransaction->getPenalties()),static_cast<int>(_nextTransaction->getStartTime())));
+	_nextTransaction->setStartTime(max(static_cast<TMLTime>(_endSchedule)-static_cast<TMLTime>(_nextTransaction->getPenalties()),static_cast<TMLTime>(_nextTransaction->getStartTime())));
 	
 	//if (_nextTransaction->getOperationLength()!=-1){
 	if (iTimeSlice!=0){
diff --git a/simulators/c++2/src_simulator/arch/Bus.h b/simulators/c++2/src_simulator/arch/Bus.h
index 07c92c77df6add1c51365a306271e75b79120c90..200e434c64125dc0916405885731673c4d86e598 100644
--- a/simulators/c++2/src_simulator/arch/Bus.h
+++ b/simulators/c++2/src_simulator/arch/Bus.h
@@ -68,7 +68,7 @@ public:
 	\param ibusWidth Bus width
 	\param iTimePerSample Transfer time per sample
     	*/
-	Bus(unsigned int iID, std::string iName, WorkloadSource* iScheduler, TMLLength iBurstSize, unsigned int ibusWidth, TMLTime iTimePerSample, bool iChannelBasedPrio);
+	Bus(ID iID, std::string iName, WorkloadSource* iScheduler, TMLLength iBurstSize, unsigned int ibusWidth, TMLTime iTimePerSample, bool iChannelBasedPrio);
 	///Destructor
 	virtual ~Bus();
 	///Add a transaction waiting for execution to the internal list
diff --git a/simulators/c++2/src_simulator/arch/BusAbstr.h b/simulators/c++2/src_simulator/arch/BusAbstr.h
index 83a5eb0f7cf9a428443215f80425e7c84e64eabf..beef0c5d93380dc83a7e328fd8c5c09ed25a6f42 100644
--- a/simulators/c++2/src_simulator/arch/BusAbstr.h
+++ b/simulators/c++2/src_simulator/arch/BusAbstr.h
@@ -72,7 +72,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	inline unsigned int getID() const{
+	inline ID getID() const{
 		return _bus->getID();
 	}
 private:
diff --git a/simulators/c++2/src_simulator/arch/BusMaster.h b/simulators/c++2/src_simulator/arch/BusMaster.h
index acc932822531eaaa458dfa2d3a4f5f05fa98b4bd..c1b481ebf51ed1912ab42ff40ee0a93885de5558 100644
--- a/simulators/c++2/src_simulator/arch/BusMaster.h
+++ b/simulators/c++2/src_simulator/arch/BusMaster.h
@@ -59,7 +59,7 @@ public:
 	\param iNbOfBuses Number of buses(bus channels) the master is connected to
 	\param iBusArray Pointer to the buses(bus channels) the master is connected to
     	*/
-	BusMaster(const std::string& iName, unsigned int iPriority, unsigned int iNbOfBuses, SchedulableCommDevice** iBusArray): WorkloadSource(iPriority), _name(iName), _nbOfBuses(iNbOfBuses), _busArray(iBusArray), _busSortArray(0), _nextTransaction(0), _nextBus(iBusArray[0]), _lastSimTime(-1), _contentionDelay(0), _noTransactions(0), _channelBasedPrioEnabled(false), _channelBasedPrio(0){
+	BusMaster(const std::string& iName, Priority iPriority, unsigned int iNbOfBuses, SchedulableCommDevice** iBusArray): WorkloadSource(iPriority), _name(iName), _nbOfBuses(iNbOfBuses), _busArray(iBusArray), _busSortArray(0), _nextTransaction(0), _nextBus(iBusArray[0]), _lastSimTime(-1), _contentionDelay(0), _noTransactions(0), _channelBasedPrioEnabled(false), _channelBasedPrio(0){
 		_busSortArray=new SchedulableCommDevice*[_nbOfBuses];
 		for (unsigned int i=0; i <_nbOfBuses; i++) _busSortArray[i]=_busArray[i];
 		_channelBasedPrioEnabled = _busArray[0]->ChannelBasedPrio();
@@ -176,7 +176,7 @@ public:
 		return _name;
 	}
 
-	unsigned int getPriority() const{
+	Priority getPriority() const{
 		return (_channelBasedPrioEnabled)?_channelBasedPrio: _priority;
 	}
 
@@ -250,7 +250,7 @@ protected:
 	unsigned long _noTransactions;
 	//
 	bool _channelBasedPrioEnabled;
-	unsigned int _channelBasedPrio;
+	Priority _channelBasedPrio;
 };
 
 #endif
diff --git a/simulators/c++2/src_simulator/arch/CPU.cpp b/simulators/c++2/src_simulator/arch/CPU.cpp
index ac8bd73cc706c8dc5fb15a100090437c9158de75..d13a12c8f0d79c28349a9b37d0ba871e54abedac 100755
--- a/simulators/c++2/src_simulator/arch/CPU.cpp
+++ b/simulators/c++2/src_simulator/arch/CPU.cpp
@@ -47,7 +47,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLChannel.h>
 #include <TransactionListener.h>
 
-CPU::CPU(unsigned int iID, std::string iName, WorkloadSource* iScheduler, TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize): SchedulableDevice(iID, iName, iScheduler), _lastTransaction(0), _masterNextTransaction(0), _timePerCycle(iTimePerCycle),
+CPU::CPU(ID iID, std::string iName, WorkloadSource* iScheduler, TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize): SchedulableDevice(iID, iName, iScheduler), _lastTransaction(0), _masterNextTransaction(0), _timePerCycle(iTimePerCycle),
 #ifdef PENALTIES_ENABLED
 _pipelineSize(iPipelineSize), _taskSwitchingCycles(iTaskSwitchingCycles),_brachingMissrate(iBranchingMissrate), _changeIdleModeCycles(iChangeIdleModeCycles), _cyclesBeforeIdle(iCyclesBeforeIdle),
 #endif 
diff --git a/simulators/c++2/src_simulator/arch/CPU.h b/simulators/c++2/src_simulator/arch/CPU.h
index 9c3e085e988f105217b10b7b238a60f2d7c4fb8d..07633f4c14759ac10890723f5c9b28131764e8ab 100755
--- a/simulators/c++2/src_simulator/arch/CPU.h
+++ b/simulators/c++2/src_simulator/arch/CPU.h
@@ -76,7 +76,7 @@ public:
 	\param iCyclesBeforeIdle Idle cycles which elapse before entering idle mode
 	\param ibyteDataSize Machine word length
     	*/
-	CPU(unsigned int iID, std::string iName, WorkloadSource* iScheduler, TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize);
+	CPU(ID iID, std::string iName, WorkloadSource* iScheduler, TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize);
 	///Destructor
 	virtual ~CPU();
 	///Determines the next CPU transaction to be executed
diff --git a/simulators/c++2/src_simulator/arch/CPUAbstr.h b/simulators/c++2/src_simulator/arch/CPUAbstr.h
index 605735855cb58c42a53ee10b29f7401597a5c8da..dbd87f423936f15b97be7910bc269b4eeb7f428e 100644
--- a/simulators/c++2/src_simulator/arch/CPUAbstr.h
+++ b/simulators/c++2/src_simulator/arch/CPUAbstr.h
@@ -65,7 +65,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	inline unsigned int getID() const{
+	inline ID getID() const{
 		return _cpu->getID();
 	}
 private:
diff --git a/simulators/c++2/src_simulator/arch/Memory.cpp b/simulators/c++2/src_simulator/arch/Memory.cpp
index bfba0198de1851e15a79bee11f990e92eebc2426..e1de258548aa14987f54cc22643d255e36697078 100644
--- a/simulators/c++2/src_simulator/arch/Memory.cpp
+++ b/simulators/c++2/src_simulator/arch/Memory.cpp
@@ -40,7 +40,7 @@ Ludovic Apvrille, Renaud Pacalet
 
 #include <Memory.h>
 
-Memory::Memory(unsigned int iID, std::string iName, TMLTime iTimePerCycle, unsigned int iDataSize): Slave(iID, iName), _timePerCycle(iTimePerCycle), _dataSize(iDataSize){
+Memory::Memory(ID iID, std::string iName, TMLTime iTimePerCycle, unsigned int iDataSize): Slave(iID, iName), _timePerCycle(iTimePerCycle), _dataSize(iDataSize){
 }
 
 void Memory::CalcTransactionLength(TMLTransaction* iTrans) const{
diff --git a/simulators/c++2/src_simulator/arch/Memory.h b/simulators/c++2/src_simulator/arch/Memory.h
index 22d210a27246e994666ab7ae81351d8a1bce78d8..1a0255706163ffcf0cae8bc1514fe7e549c871ba 100644
--- a/simulators/c++2/src_simulator/arch/Memory.h
+++ b/simulators/c++2/src_simulator/arch/Memory.h
@@ -56,7 +56,7 @@ public:
 	\param iTimePerCycle 1/Memory frequency
 	\param iDataSize Width of a data word
 	*/
-	Memory(unsigned int iID, std::string iName, TMLTime iTimePerCycle, unsigned int iDataSize);
+	Memory(ID iID, std::string iName, TMLTime iTimePerCycle, unsigned int iDataSize);
 	///Accounts for the delay caused by the memory
 	/**
 	\param iTrans Pointer to the transaction to be processed
diff --git a/simulators/c++2/src_simulator/arch/PrioScheduler.cpp b/simulators/c++2/src_simulator/arch/PrioScheduler.cpp
index e3b669ad39328295f05ca27efd19ac6f8b28c194..c6b1ec0193f066a5e909f61b19918c4b1d8dfbd6 100644
--- a/simulators/c++2/src_simulator/arch/PrioScheduler.cpp
+++ b/simulators/c++2/src_simulator/arch/PrioScheduler.cpp
@@ -40,16 +40,16 @@ Ludovic Apvrille, Renaud Pacalet
 #include<PrioScheduler.h>
 #include <TMLTransaction.h>
 
-PrioScheduler::PrioScheduler(const std::string& iName, unsigned int iPrio): WorkloadSource(iPrio), _name(iName), _nextTransaction(0) /*,_lastSourceIndex(0)*/{
+PrioScheduler::PrioScheduler(const std::string& iName, Priority iPrio): WorkloadSource(iPrio), _name(iName), _nextTransaction(0) /*,_lastSourceIndex(0)*/{
 }
 
-PrioScheduler::PrioScheduler(const std::string& iName, unsigned int iPrio, WorkloadSource** aSourceArray, unsigned int iNbOfSources): WorkloadSource(iPrio, aSourceArray, iNbOfSources), _name(iName), _nextTransaction(0), _lastSource(0) {
+PrioScheduler::PrioScheduler(const std::string& iName, Priority iPrio, WorkloadSource** aSourceArray, unsigned int iNbOfSources): WorkloadSource(iPrio, aSourceArray, iNbOfSources), _name(iName), _nextTransaction(0), _lastSource(0) {
 }
 
 TMLTime PrioScheduler::schedule(TMLTime iEndSchedule){
 	TaskList::iterator i;
 	TMLTransaction *aMarkerPast=0, *aMarkerFuture=0,*aTempTrans;
-	unsigned int aHighestPrioPast=-1;
+	Priority aHighestPrioPast=-1;
 	TMLTime aTransTimeFuture=-1,aRunnableTime;
 	WorkloadSource *aSourcePast=0, *aSourceFuture=0;  //NEW
 	for(WorkloadList::iterator i=_workloadList.begin(); i != _workloadList.end(); ++i){
diff --git a/simulators/c++2/src_simulator/arch/PrioScheduler.h b/simulators/c++2/src_simulator/arch/PrioScheduler.h
index cf08c1ecde42b87653ee0311167c18e84e2aadc4..af24f57baab428c985687c8f635700f116142de1 100644
--- a/simulators/c++2/src_simulator/arch/PrioScheduler.h
+++ b/simulators/c++2/src_simulator/arch/PrioScheduler.h
@@ -51,7 +51,7 @@ public:
 	\param iName Name of the scheduler
       	\param iPrio Priority of the scheduler
     	*/
-	PrioScheduler(const std::string& iName, unsigned int iPrio);
+	PrioScheduler(const std::string& iName, Priority iPrio);
 	///Constructor
     	/**
 	\param iName Name of the scheduler
@@ -59,7 +59,7 @@ public:
 	\param aSourceArray Array of pointers to workload ressources from which transactions may be received
 	\param iNbOfSources Length of the array
     	*/
-	PrioScheduler(const std::string& iName, unsigned int iPrio, WorkloadSource** aSourceArray, unsigned int iNbOfSources);
+	PrioScheduler(const std::string& iName, Priority iPrio, WorkloadSource** aSourceArray, unsigned int iNbOfSources);
 	~PrioScheduler();
 	TMLTime schedule(TMLTime iEndSchedule);
 	TMLTransaction* getNextTransaction() const;
diff --git a/simulators/c++2/src_simulator/arch/RRScheduler.cpp b/simulators/c++2/src_simulator/arch/RRScheduler.cpp
index 5142731243207d5a7462ef6b1d7b710db81ee8a8..9fab560e21720d699ac64fcce127aba1cdaca342 100644
--- a/simulators/c++2/src_simulator/arch/RRScheduler.cpp
+++ b/simulators/c++2/src_simulator/arch/RRScheduler.cpp
@@ -42,10 +42,10 @@ Ludovic Apvrille, Renaud Pacalet
 #include <TMLCommand.h>
 #include <TMLTask.h>
 
-RRScheduler::RRScheduler(const std::string& iName, unsigned int iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize): WorkloadSource(iPrio), _name(iName), _nextTransaction(0), _timeSlice(iTimeSlice), _minSliceSize(iMinSliceSize), _elapsedTime(0), _lastSource(0){
+RRScheduler::RRScheduler(const std::string& iName, Priority iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize): WorkloadSource(iPrio), _name(iName), _nextTransaction(0), _timeSlice(iTimeSlice), _minSliceSize(iMinSliceSize), _elapsedTime(0), _lastSource(0){
 }
 
-RRScheduler::RRScheduler(const std::string& iName, unsigned int iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize, WorkloadSource** aSourceArray, unsigned int iNbOfSources): WorkloadSource(iPrio, aSourceArray, iNbOfSources), _name(iName), _nextTransaction(0), _timeSlice(iTimeSlice), _minSliceSize(iMinSliceSize), _elapsedTime(0), _lastSource(0){
+RRScheduler::RRScheduler(const std::string& iName, Priority iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize, WorkloadSource** aSourceArray, unsigned int iNbOfSources): WorkloadSource(iPrio, aSourceArray, iNbOfSources), _name(iName), _nextTransaction(0), _timeSlice(iTimeSlice), _minSliceSize(iMinSliceSize), _elapsedTime(0), _lastSource(0){
 }
 
 TMLTime RRScheduler::schedule(TMLTime iEndSchedule){
diff --git a/simulators/c++2/src_simulator/arch/RRScheduler.h b/simulators/c++2/src_simulator/arch/RRScheduler.h
index 2fb03b0fbf074f0e9abf917ad6ad18e7fbc0fd26..824c2fb7e035aceec7e007eda14c761a49c43213 100644
--- a/simulators/c++2/src_simulator/arch/RRScheduler.h
+++ b/simulators/c++2/src_simulator/arch/RRScheduler.h
@@ -53,7 +53,7 @@ public:
 	\param iTimeSlice Time slice which is granted to clients
 	\param iMinSliceSize Minimum size of a time slice
     	*/
-	RRScheduler(const std::string& iName, unsigned int iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize);
+	RRScheduler(const std::string& iName, Priority iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize);
 	///Constructor
     	/**
 	\param iName Name of the scheduler
@@ -63,7 +63,7 @@ public:
 	\param aSourceArray Array of pointers to workload ressources from which transactions may be received
 	\param iNbOfSources Length of the array
     	*/
-	RRScheduler(const std::string& iName, unsigned int iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize, WorkloadSource** aSourceArray, unsigned int iNbOfSources);
+	RRScheduler(const std::string& iName, Priority iPrio, TMLTime iTimeSlice, TMLTime iMinSliceSize, WorkloadSource** aSourceArray, unsigned int iNbOfSources);
 	///Destructor
 	~RRScheduler();
 	TMLTime schedule(TMLTime iEndSchedule);
diff --git a/simulators/c++2/src_simulator/arch/SchedulableCommDevice.h b/simulators/c++2/src_simulator/arch/SchedulableCommDevice.h
index aac122e8a18bb0caa9d202fc22f77fbdcfaa0fcd..6cc070e9e5f0a552ed53cf661f159d4f4cd0485d 100644
--- a/simulators/c++2/src_simulator/arch/SchedulableCommDevice.h
+++ b/simulators/c++2/src_simulator/arch/SchedulableCommDevice.h
@@ -54,7 +54,7 @@ public:
 	\param iName Name of the device
 	\param iScheduler Pointer to the scheduler object
 	*/
-	SchedulableCommDevice(unsigned int iID, std::string iName, WorkloadSource* iScheduler,bool iChannelBasedPrio): SchedulableDevice(iID, iName, iScheduler), _channelBasedPrio(iChannelBasedPrio){}
+	SchedulableCommDevice(ID iID, std::string iName, WorkloadSource* iScheduler,bool iChannelBasedPrio): SchedulableDevice(iID, iName, iScheduler), _channelBasedPrio(iChannelBasedPrio){}
 	///Returns the size of an atomic bus transaction
 	/**
 	\return Size of an atomic bus transaction
diff --git a/simulators/c++2/src_simulator/arch/SchedulableDevice.h b/simulators/c++2/src_simulator/arch/SchedulableDevice.h
index 87c36532b6844afe33d946c82405fe80d746ff23..b2881d16352a82176236ba73d749bede30f87716 100644
--- a/simulators/c++2/src_simulator/arch/SchedulableDevice.h
+++ b/simulators/c++2/src_simulator/arch/SchedulableDevice.h
@@ -59,7 +59,7 @@ public:
 	\param iName Name of the device
 	\param iScheduler Pointer to the scheduler object
 	*/
-	SchedulableDevice(unsigned int iID, std::string iName, WorkloadSource* iScheduler):_ID(iID), _name(iName), _endSchedule(0), _scheduler(iScheduler), _nextTransaction(0){
+	SchedulableDevice(ID iID, std::string iName, WorkloadSource* iScheduler):_ID(iID), _name(iName), _endSchedule(0), _scheduler(iScheduler), _nextTransaction(0){
 		_transactList.reserve(BLOCK_SIZE);
 	}
 	///Determines the next transaction to be executed
@@ -110,12 +110,15 @@ public:
 	/**
 	\param iSimulatedTime Number of simulated clock cycles
 	*/
-	static void setSimulatedTime(TMLTime iSimulatedTime) {_simulatedTime=iSimulatedTime;}
+	static void setSimulatedTime(TMLTime iSimulatedTime) {
+		//if (iSimulatedTime<_simulatedTime) std::cout << "FAILURE SIMULATION TIME!!!!!!!!!!\n";
+		_simulatedTime=iSimulatedTime;
+	}
 	///Returns the unique ID of the device
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const {return _ID;}
+	ID getID() const {return _ID;}
 	///Destructor
 	virtual ~SchedulableDevice(){}
 	///Returns the end time of the last scheduled transaction of the device 
@@ -142,7 +145,7 @@ public:
 	}
 protected:
 	///Unique ID of the device
-	unsigned int _ID;
+	ID _ID;
 	///Name of the device
 	std::string _name;
 	///Class variable holding the simulation time
diff --git a/simulators/c++2/src_simulator/arch/Slave.h b/simulators/c++2/src_simulator/arch/Slave.h
index 3432faed70842ce24e096eecd1d388317c9e5a75..f4b49e05f49ae8a03e31d5c5bc304c89b213f724 100644
--- a/simulators/c++2/src_simulator/arch/Slave.h
+++ b/simulators/c++2/src_simulator/arch/Slave.h
@@ -52,7 +52,7 @@ class TMLTransaction;
 class Slave: public ListenerSubject <TransactionListener> {
 public:
 	///Constructor
-	Slave(unsigned int iID, std::string iName):_name(iName), _ID(iID) {}
+	Slave(ID iID, std::string iName):_name(iName), _ID(iID) {}
 	///Destructor
 	virtual ~Slave(){}
 	///Calculates the time it takes to process the transaction within the slave node
@@ -77,11 +77,11 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const {return _ID;}
+	ID getID() const {return _ID;}
 protected:
 	///Name of the slave
 	std::string _name;
-	unsigned int _ID;
+	ID _ID;
 };
 
 #endif
diff --git a/simulators/c++2/src_simulator/arch/WorkloadSource.h b/simulators/c++2/src_simulator/arch/WorkloadSource.h
index 0b5b9964cf693d344e936685d2df29e36306a003..e8b0eb0e95949b696af5222c6094233085d2ed28 100644
--- a/simulators/c++2/src_simulator/arch/WorkloadSource.h
+++ b/simulators/c++2/src_simulator/arch/WorkloadSource.h
@@ -53,14 +53,14 @@ public:
 	/**
 	\param iPriority Priority of the workload source
 	*/
-	WorkloadSource(unsigned int iPriority): _priority(iPriority), _srcArraySpecified(false) {}
+	WorkloadSource(Priority iPriority): _priority(iPriority), _srcArraySpecified(false) {}
 	///Constructor
     	/**
       	\param iPriority Priority of the scheduler
 	\param aSourceArray Array of pointers to workload ressources from which transactions may be received
 	\param iNbOfSources Length of the array
     	*/
-	WorkloadSource(unsigned int iPriority, WorkloadSource** aSourceArray, unsigned int iNbOfSources): _priority(iPriority), _srcArraySpecified(true){
+	WorkloadSource(Priority iPriority, WorkloadSource** aSourceArray, unsigned int iNbOfSources): _priority(iPriority), _srcArraySpecified(true){
 		for (unsigned int i=0;i<iNbOfSources;i++){
 			addWorkloadSource(aSourceArray[i]);
 			std::cout << "Workload source added " << aSourceArray[i]->toString() << "\n";
@@ -78,7 +78,7 @@ public:
 	/**
 	\return Priority of the workload source
 	*/
-	virtual inline unsigned int getPriority() const{return _priority;}
+	virtual inline Priority getPriority() const{return _priority;}
 	///Add a source which provides transactions to the scheduler
 	/**
 	\param iSource Pointer to workload source
@@ -105,7 +105,7 @@ protected:
 	///List of sources which provide transactions to the scheduler
 	WorkloadList _workloadList;
 	///Priority of the workload source
-	unsigned int _priority;
+	Priority _priority;
 	///Indicates whether sources contained in workload list have to be deleted
 	bool _srcArraySpecified;
 };
diff --git a/simulators/c++2/src_simulator/definitions.h b/simulators/c++2/src_simulator/definitions.h
index 5aaaef3371e15a03dc741a652ddf94812f41c802..10058b6dfca1a0fe15036b620483507a9ce7396f 100644
--- a/simulators/c++2/src_simulator/definitions.h
+++ b/simulators/c++2/src_simulator/definitions.h
@@ -190,9 +190,15 @@ class EBRDD;
 class EBRDDCommand;
 
 ///Datatype used for time measurements
+//typedef unsigned long long TMLTime;
 typedef unsigned int TMLTime;
 ///Datatype used to indicate the virtual length of commands (execution units, data units)
+//typedef unsigned long long TMLLength;
 typedef unsigned int TMLLength;
+///Priorities
+typedef unsigned int Priority;
+///IDs
+typedef unsigned int ID;
 ///Datatype used by the CPU to store pointers to associated tasks
 typedef std::list<TMLTask*> TaskList;
 ///Datatype used by CPU and bus to store already scheduled transactions
@@ -214,9 +220,9 @@ typedef std::list<EBRDD*> EBRDDList;
 ///Datatype used in Tasks to store comments concerning the task execution
 typedef std::vector<Comment*> CommentList;
 ///Datatype used in Tasks in order to associate a command with an ID 
-typedef std::map<unsigned int, TMLCommand*> CommandHashTab;
+typedef std::map<ID, TMLCommand*> CommandHashTab;
 ///Datatype used in EBRDD Tasks in order to associate a command with an ID 
-typedef std::map<unsigned int, EBRDDCommand*> CommandHashTabEBRDD;
+typedef std::map<ID, EBRDDCommand*> CommandHashTabEBRDD;
 ///Datatype for event parameters
 typedef int ParamType;
 ///Datatype used in EventChannels to store parameters of events
@@ -226,7 +232,7 @@ typedef unsigned int (TMLTask::*CondFuncPointer) ();
 ///Type of member function pointer used to indicate a function encapsulating an action (for TMLActionCommand)
 typedef unsigned int (TMLTask::*ActionFuncPointer) ();
 ///Type of member function pointer used to indicate a function encapsulating a condition (for TMLChoiceCommand)
-typedef unsigned int (TMLTask::*LengthFuncPointer) ();
+typedef TMLTime (TMLTask::*LengthFuncPointer) ();
 ///Type of member function pointer used to indicate a function encapsulating a condition (for TMLChoiceCommand)
 typedef int (EBRDD::*EBRDDFuncPointer) ();
 ///Type of member function pointer used to indicate a function encapsulating parameter manipulation (for TMLWaitCommand, TMLSendCommand)
@@ -254,7 +260,7 @@ struct ltstr{
 ///Datatype which associates a variable name with the coresponding pointer to that variable, used for look-up table of tasks
 typedef std::map<const char*, ParamType*, ltstr> VariableLookUpTableName;
 ///Datatype which associates a variable ID with the coresponding pointer to that variable, used for look-up table of tasks
-typedef std::map<unsigned int, ParamType*> VariableLookUpTableID;
+typedef std::map<ID, ParamType*> VariableLookUpTableID;
 
 
 ///Minimum of three values
@@ -325,7 +331,7 @@ public:
 	\param iTime Time when the change occurred 
 	\param iDevice Pointer to the device the signal belongs to
 	*/
-	SignalChangeData( std::string& iSigChange, unsigned int iTime, TraceableDevice* iDevice):_sigChange(iSigChange),_time(iTime),_device(iDevice){
+	SignalChangeData( std::string& iSigChange, TMLTime iTime, TraceableDevice* iDevice):_sigChange(iSigChange),_time(iTime),_device(iDevice){
 	}
 	///String representation of the signal change in VCD format
 	std::string _sigChange;
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.cpp b/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.cpp
index ff857888b02dfba77076c14404a2a1bf45ab2021..9c4163aaac3069e77ca6841c4075828ddd8b51de 100755
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.cpp
@@ -41,7 +41,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <EBRDDActionCommand.h>
 #include <EBRDD.h>
 
-EBRDDActionCommand::EBRDDActionCommand(unsigned int iID, EBRDD* iEBRDD, EBRDDFuncPointer iEBRDDFunc): EBRDDCommand(iID, iEBRDD),_ebrddFunc(iEBRDDFunc){
+EBRDDActionCommand::EBRDDActionCommand(ID iID, EBRDD* iEBRDD, EBRDDFuncPointer iEBRDDFunc): EBRDDCommand(iID, iEBRDD),_ebrddFunc(iEBRDDFunc){
 }
 
 EBRDDCommand* EBRDDActionCommand::prepare(){
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.h b/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.h
index 0d6bd82da2f61720e6d49c4795d175d82a25fc5c..d4d649e90cbea331efffa1f880e0aef0dc38c8cc 100755
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.h
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDActionCommand.h
@@ -54,7 +54,7 @@ public:
       	\param iEBRDD Pointer to the EBRDD the command belongs to
 	\param iEBRDDFunc Member function pointer to the action function
     	*/
-	EBRDDActionCommand(unsigned int iID, EBRDD* iEBRDD, EBRDDFuncPointer iEBRDDFunc);
+	EBRDDActionCommand(ID iID, EBRDD* iEBRDD, EBRDDFuncPointer iEBRDDFunc);
 	EBRDDCommand* prepare();
 	std::string toString() const;
 protected:
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.cpp b/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.cpp
index de695730cd2c89a9c1cc4e4d4d6bc3b25afc07c2..091a0d3c13479c4257267c29b02df4062489f381 100755
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.cpp
@@ -44,7 +44,7 @@ Ludovic Apvrille, Renaud Pacalet
 
 //SimComponents* TMLCommand::_simComp=0;
 
-EBRDDCommand::EBRDDCommand(unsigned int iID, EBRDD* iEBRDD): _ID(iID), _ebrdd(iEBRDD), _nextCommand(0){
+EBRDDCommand::EBRDDCommand(ID iID, EBRDD* iEBRDD): _ID(iID), _ebrdd(iEBRDD), _nextCommand(0){
 	_ebrdd->addCommand(iID, this);
 }
 
@@ -87,7 +87,7 @@ std::istream& EBRDDCommand::readObject(std::istream& s){
 void EBRDDCommand::reset(){
 }
 
-unsigned int EBRDDCommand::getID() const{
+ID EBRDDCommand::getID() const{
 	return _ID;
 }
 
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.h b/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.h
index 1a636aaa1375235d9dff6ddaf9d16da31d1f73a4..f831ba559b33d46a147904db2ee2de11a392132b 100755
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.h
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDCommand.h
@@ -54,7 +54,7 @@ public:
       	\param iID ID of the command
 	\param iEBRDD Pointer to the EBRDD the command belongs to
     	*/
-	EBRDDCommand(unsigned int iID, EBRDD* iEBRDD);
+	EBRDDCommand(ID iID, EBRDD* iEBRDD);
 	///Destructor
 	virtual ~EBRDDCommand();
 	///Initializes the command and passes the control flow to the prepare() method of the next command if necessary
@@ -84,7 +84,7 @@ public:
 	/**
       	\return Unique ID
     	*/ 
-	unsigned int getID() const;
+	ID getID() const;
 	////Sets the internal pointer to the simulation components
 	////**
       	//\param iSimComp Pointer to simulation components
@@ -98,7 +98,7 @@ public:
 	//EBRDDCommand** getNextCommands(unsigned int& oNbOfCmd) const;
 protected:
 	///ID of the command
-	unsigned int _ID;
+	ID _ID;
 	///Pointer to the EBRDD the command belongs to
 	EBRDD* _ebrdd;
 	///Pointer to an array of pointers to the next commands
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.cpp b/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.cpp
index 765cbcabb7e404ce57b7f2ee09ed7df276901a15..eb697db0c6be3f18c2e080b4e6dcc23a08b85c03 100644
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.cpp
@@ -41,7 +41,7 @@ Ludovic Apvrille, Renaud Pacalet
 #include <EBRDDStopCommand.h>
 #include <EBRDD.h>
 
-EBRDDStopCommand::EBRDDStopCommand(unsigned int iID, EBRDD* iEBRDD): EBRDDCommand(iID, iEBRDD){
+EBRDDStopCommand::EBRDDStopCommand(ID iID, EBRDD* iEBRDD): EBRDDCommand(iID, iEBRDD){
 }
 
 EBRDDCommand* EBRDDStopCommand::prepare(){
diff --git a/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.h b/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.h
index 77014a13a4e08b56cade87275d25516c2ead6938..e7d34d09f42c2d7680739385896e2c8fa9fa246f 100644
--- a/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.h
+++ b/simulators/c++2/src_simulator/ebrdd/EBRDDStopCommand.h
@@ -53,7 +53,7 @@ public:
       	\param iID ID of the command
       	\param iTask Pointer to the task the command belongs to
     	*/
-	EBRDDStopCommand(unsigned int iID, EBRDD* iTask);
+	EBRDDStopCommand(ID iID, EBRDD* iTask);
 	EBRDDCommand* prepare();
 	std::string toString() const;
 protected:
diff --git a/simulators/c++2/src_simulator/ebrdd/ERB.cpp b/simulators/c++2/src_simulator/ebrdd/ERB.cpp
index 7b7fbacc7fa1c4659fa3f04a3d8aa5068c01e49d..67a59aff5690fd9afa7b9d06ee56aade221504bc 100644
--- a/simulators/c++2/src_simulator/ebrdd/ERB.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/ERB.cpp
@@ -62,7 +62,7 @@ char* ERB::_evtString[] ={
       "simulationStopped"
 };
 
-ERB::ERB(ERC* iContainer, NotifyIF* iAncestorNode, bool iNegated, const std::string& iName, unsigned int iEvtID, unsigned int iSourceClass, unsigned int* iArrayOfSources, unsigned int iNbOfSources, EBRDDFuncPointer iEbrddFunc, const std::string& iCondString): EventIF(iAncestorNode, iNegated), _container(iContainer), _name(iName), _evtID(iEvtID), _sourceClass(iSourceClass), _arrayOfSources(iArrayOfSources), _nbOfSources(iNbOfSources), _ebrddFunc(iEbrddFunc), _condString(iCondString){
+ERB::ERB(ERC* iContainer, NotifyIF* iAncestorNode, bool iNegated, const std::string& iName, ID iEvtID, unsigned int iSourceClass, unsigned int* iArrayOfSources, unsigned int iNbOfSources, EBRDDFuncPointer iEbrddFunc, const std::string& iCondString): EventIF(iAncestorNode, iNegated), _container(iContainer), _name(iName), _evtID(iEvtID), _sourceClass(iSourceClass), _arrayOfSources(iArrayOfSources), _nbOfSources(iNbOfSources), _ebrddFunc(iEbrddFunc), _condString(iCondString){
 }
 
 ERB::~ERB(){
@@ -73,7 +73,7 @@ void ERB::timeTick(TMLTime iNewTime){
 	//std::cout << "TimeTick ERB: " << iNewTime << std::endl;
 }
 
-void ERB::notifyAncestor(unsigned int iEvtSourceID){
+void ERB::notifyAncestor(ID iEvtSourceID){
 	//std::cout << "* evt in " << _name << " t:" << SchedulableDevice::getSimulatedTime() << " n:" << _evtString[_evtID] << " src: " << _simComp->getCmpNameByID(iEvtSourceID) << "\n";
 	_nbOfNotific++;
 	if (_ebrddFunc!=0 && !(_container->getEBRDD()->*_ebrddFunc)()){
@@ -214,47 +214,47 @@ void ERB::deactivate(){
 }*/
 
 //void ERB::transExecuted(TMLTransaction* iTrans){
-void ERB::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void ERB::transExecuted(TMLTransaction* iTrans, ID iID){
 	//std::cout << "transExecuted notified: " << _name << "\n";
 	if (_evtID==0 && _active) notifyAncestor(iID);
 }
 
-void ERB::commandEntered(TMLCommand* iComm, unsigned int iID){
+void ERB::commandEntered(TMLCommand* iComm, ID iID){
 	//std::cout << "commandEntered notified: " << _name << "\n";
 	if (_evtID==1 && _active) notifyAncestor(iID);
 }
 
-void ERB::commandStarted(TMLCommand* iComm, unsigned int iID){
+void ERB::commandStarted(TMLCommand* iComm, ID iID){
 	//std::cout << "commandStarted notified: " << _name << "\n";
 	if (_evtID==2 && _active) notifyAncestor(iID);
 }
 	
-void ERB::commandExecuted(TMLCommand* iComm, unsigned int iID){
+void ERB::commandExecuted(TMLCommand* iComm,ID iID){
 	//std::cout << "commandExecuted: " << _name << "\n";
 	if (_evtID==3 && _active) notifyAncestor(iID);
 }
 
-void ERB::commandFinished(TMLCommand* iComm, unsigned int iID){
+void ERB::commandFinished(TMLCommand* iComm, ID iID){
 	//std::cout << "commandFinished notified: " << _name << "\n";
 	if (_evtID==4 && _active) notifyAncestor(iID);
 }
 
-void ERB::taskStarted(TMLTransaction* iTrans, unsigned int iID){
+void ERB::taskStarted(TMLTransaction* iTrans,ID iID){
 	//std::cout << "taskStarted notified: " << _name << "\n";
 	if (_evtID==5 && _active) notifyAncestor(iID);
 }
 
-void ERB::taskFinished(TMLTransaction* iTrans, unsigned int iID){
+void ERB::taskFinished(TMLTransaction* iTrans, ID iID){
 	//std::cout << "taskFinished notified: " << _name << "\n";
 	if (_evtID==6 && _active) notifyAncestor(iID);
 }
 
-void ERB::readTrans(TMLTransaction* iTrans, unsigned int iID){
+void ERB::readTrans(TMLTransaction* iTrans, ID iID){
 	//std::cout << "readTrans notified: " << _name << "\n";
 	if (_evtID==7 && _active) notifyAncestor(iID);
 }
 
-void ERB::writeTrans(TMLTransaction* iTrans, unsigned int iID){
+void ERB::writeTrans(TMLTransaction* iTrans, ID iID){
 	//std::cout << "writeTrans notified: " << _name << "\n";
 	if (_evtID==8 && _active) notifyAncestor(iID);
 }
diff --git a/simulators/c++2/src_simulator/ebrdd/ERB.h b/simulators/c++2/src_simulator/ebrdd/ERB.h
index 86e33e169a5aa801a91dcacd97abc26b30fa27c4..e728f9617227a7870abe1bdf498333f76f2b639a 100644
--- a/simulators/c++2/src_simulator/ebrdd/ERB.h
+++ b/simulators/c++2/src_simulator/ebrdd/ERB.h
@@ -69,7 +69,7 @@ public:
 	\param iEbrddFunc Member function pointer to EBRDD function
 	\param iCondString ERB Condition in string format
 	*/
-	ERB(ERC* iContainer, NotifyIF* iAncestorNode, bool iNegated, const std::string& iName, unsigned int iEvtID, unsigned int iSourceClass, unsigned int* iArrayOfSources, unsigned int iNbOfSources, EBRDDFuncPointer iEbrddFunc, const std::string& iCondString);
+	ERB(ERC* iContainer, NotifyIF* iAncestorNode, bool iNegated, const std::string& iName, ID iEvtID, unsigned int iSourceClass, unsigned int* iArrayOfSources, unsigned int iNbOfSources, EBRDDFuncPointer iEbrddFunc, const std::string& iCondString);
 	///Destructor
 	virtual ~ERB();
 	void timeTick(TMLTime iNewTime);
@@ -79,15 +79,15 @@ public:
 	//void reset();
 	virtual std::ostream& writeObject(std::ostream& s);
 	virtual std::istream& readObject(std::istream& s);
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
-	void commandEntered(TMLCommand* iComm, unsigned int iID);
-	void commandStarted(TMLCommand* iComm, unsigned int iID);
-	void commandExecuted(TMLCommand* iComm, unsigned int iID);
-	void commandFinished(TMLCommand* iComm, unsigned int iID);
-	void taskStarted(TMLTransaction* iTrans, unsigned int iID);
-	void taskFinished(TMLTransaction* iTrans, unsigned int iID);
-	void readTrans(TMLTransaction* iTrans, unsigned int iID);
-	void writeTrans(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
+	void commandEntered(TMLCommand* iComm, ID iID);
+	void commandStarted(TMLCommand* iComm, ID iID);
+	void commandExecuted(TMLCommand* iComm, ID iID);
+	void commandFinished(TMLCommand* iComm, ID iID);
+	void taskStarted(TMLTransaction* iTrans, ID iID);
+	void taskFinished(TMLTransaction* iTrans, ID iID);
+	void readTrans(TMLTransaction* iTrans, ID iID);
+	void writeTrans(TMLTransaction* iTrans, ID iID);
 	void simulationStarted();
 	void simulationStopped();
 	///Sets the class variable pointing to the simulation objects
@@ -101,7 +101,7 @@ protected:
 	///Name of ERB
 	std::string _name;
 	///ID of event to be received
-	unsigned int _evtID;
+	ID _evtID;
 	///Category of then event source (CPU, Bus, Slave, ...)
 	unsigned int _sourceClass;
 	///Array of event sources
@@ -120,6 +120,6 @@ protected:
 	/**
 	\param iEvtSourceID  ID of event source
 	*/
-	void notifyAncestor(unsigned int iEvtSourceID);
+	void notifyAncestor(ID iEvtSourceID);
 };
 #endif
diff --git a/simulators/c++2/src_simulator/ebrdd/ERC.cpp b/simulators/c++2/src_simulator/ebrdd/ERC.cpp
index 7c66cbb604b9c380435fd9d6f6b7bc834810be05..ed6ebbb16d7d86f6fbbd71512a4989e91db16de8 100644
--- a/simulators/c++2/src_simulator/ebrdd/ERC.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/ERC.cpp
@@ -46,10 +46,10 @@ Ludovic Apvrille, Renaud Pacalet
 
 SimComponents* ERC::_simComp=0;
 
-ERC::ERC(unsigned int iID, EBRDD* iEBRDD): NotifyIF(1), EBRDDCommand(iID, iEBRDD), _ebrdd(iEBRDD), _wasPrepared(false), _once(true) {
+ERC::ERC(ID iID, EBRDD* iEBRDD): NotifyIF(1), EBRDDCommand(iID, iEBRDD), _ebrdd(iEBRDD), _wasPrepared(false), _once(true) {
 }
 
-void ERC::notifyEvent(unsigned int iID){
+void ERC::notifyEvent(ID iID){
 	//std::cout << "***** Container " << _ID << " notified *****\n";
 	_wasPrepared=false;
 	//_simComp->getSimulator()->removeListener(this); ///////////////////NEW!!!!!!!!!!!!
@@ -58,7 +58,7 @@ void ERC::notifyEvent(unsigned int iID){
 	if (_nextCommand[0]!=0) _nextCommand[0]->prepare(); 
 	//std::cout << "end notify event\n";
 }
-void ERC::notifyAbort(unsigned int iID){
+void ERC::notifyAbort(ID iID){
 	_wasPrepared=false;
  	_simComp->getSimulator()->removeListener(this);
 	std::cout << "***** Container aborted " << _ID << " *****\n";
diff --git a/simulators/c++2/src_simulator/ebrdd/ERC.h b/simulators/c++2/src_simulator/ebrdd/ERC.h
index 924d8885e2808010a8f10a67f421fd12b7e38a7e..88313950e797359af0fb1abb7f5a77f53c92144a 100644
--- a/simulators/c++2/src_simulator/ebrdd/ERC.h
+++ b/simulators/c++2/src_simulator/ebrdd/ERC.h
@@ -57,9 +57,9 @@ public:
 	\param iID ID of the ERC
 	\param iEBRDD Pointer to the subordinate EBRDD 
 	*/
-	ERC(unsigned int iID, EBRDD* iEBRDD);
-	void notifyEvent(unsigned int iID);
-	void notifyAbort(unsigned int iID);
+	ERC(ID iID, EBRDD* iEBRDD);
+	void notifyEvent(ID iID);
+	void notifyAbort(ID iID);
 	///Returns a pointer to the subordinate EBRDD
 	/**
 	\return Pointer to EBRDD
diff --git a/simulators/c++2/src_simulator/ebrdd/EventIF.cpp b/simulators/c++2/src_simulator/ebrdd/EventIF.cpp
index 73f84af768abcc7d841a411d8e8c4925616448cb..790bde777029a477f3a785bb7c34bf663457b473 100644
--- a/simulators/c++2/src_simulator/ebrdd/EventIF.cpp
+++ b/simulators/c++2/src_simulator/ebrdd/EventIF.cpp
@@ -46,7 +46,7 @@ EventIF::EventIF(NotifyIF* iAncestorNode, bool iNegated):_ancestorNode(iAncestor
 	iAncestorNode->registerEvent(this);
 }
 
-void EventIF::setEventID(unsigned int iID){
+void EventIF::setEventID(ID iID){
 	_ID=iID;
 	//std::cout << "setEventID: " << _ID << "\n";
 }
diff --git a/simulators/c++2/src_simulator/ebrdd/EventIF.h b/simulators/c++2/src_simulator/ebrdd/EventIF.h
index 72c204bee68fe452ee29959d84170d372d4b1288..edbd76d280bf1ad24381a811c2f92ad7982775bd 100644
--- a/simulators/c++2/src_simulator/ebrdd/EventIF.h
+++ b/simulators/c++2/src_simulator/ebrdd/EventIF.h
@@ -59,7 +59,7 @@ public:
 	/**
 	\param iID ID of the node
 	*/
-	void setEventID(unsigned int iID);
+	void setEventID(ID iID);
 	///Returns whether the event source has already generated an event
 	/**
 	\return Returns true if event has already been notified
@@ -102,7 +102,7 @@ protected:
 	///Negated flag
 	bool _negated;
 	///ID of the node
-	unsigned int _ID;
+	ID _ID;
 	///Number of event notifications
 	unsigned int _nbOfNotific;
 	///Aborted flag
diff --git a/simulators/c++2/src_simulator/ebrdd/NotifyIF.h b/simulators/c++2/src_simulator/ebrdd/NotifyIF.h
index f2cb875adfd742093db2b28039052997ac0ae146..6cb8b737c15ee418a291031d97c716c17f2ff0fb 100644
--- a/simulators/c++2/src_simulator/ebrdd/NotifyIF.h
+++ b/simulators/c++2/src_simulator/ebrdd/NotifyIF.h
@@ -58,12 +58,12 @@ public:
 	/**
 	\param iID ID of the event
 	*/
-	virtual void notifyEvent(unsigned int iID)=0;
+	virtual void notifyEvent(ID iID)=0;
 	///Called by event source to signal that an event cannot be received any more
 	/**
 	\param iID ID of the event
 	*/
-	virtual void notifyAbort(unsigned int iID)=0;
+	virtual void notifyAbort(ID iID)=0;
 	virtual void reset();
 	virtual std::ostream& writeObject(std::ostream& s);
 	virtual std::istream& readObject(std::istream& s);
@@ -76,7 +76,7 @@ public:
 	virtual ~NotifyIF();
 protected:
 	///ID of the node
-	unsigned int _nextID;
+	ID _nextID;
 	///Number of descendants within the event tree
 	unsigned int _nbOfEvents;
 	///Array of descendants within the event tree
diff --git a/simulators/c++2/src_simulator/evt/ChannelListener.h b/simulators/c++2/src_simulator/evt/ChannelListener.h
index d531c3ba71635352ecb6da88293097b0758aa734..f52e0c2bb99bcc97ac4e5028a592e619697bd0c8 100644
--- a/simulators/c++2/src_simulator/evt/ChannelListener.h
+++ b/simulators/c++2/src_simulator/evt/ChannelListener.h
@@ -52,19 +52,19 @@ public:
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void transExecuted(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void transExecuted(TMLTransaction* iTrans, ID iID){}
 	///Gets called when a read transaction is executed
 	/**
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void readTrans(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void readTrans(TMLTransaction* iTrans, ID iID){}
 	///Gets called when a write transaction is executed
 	/**
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void writeTrans(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void writeTrans(TMLTransaction* iTrans, ID iID){}
 	virtual ~ChannelListener(){}
 protected:
 };
diff --git a/simulators/c++2/src_simulator/evt/CommandListener.h b/simulators/c++2/src_simulator/evt/CommandListener.h
index 89281977277ef44b3caec69a2e9eb79759a80366..48eeae69226ac0b211065db776b860b9698ba28c 100644
--- a/simulators/c++2/src_simulator/evt/CommandListener.h
+++ b/simulators/c++2/src_simulator/evt/CommandListener.h
@@ -55,25 +55,25 @@ public:
 	\param iComm Pointer to the command
 	\param iID ID of the event source
 	*/
-	virtual void commandEntered(TMLCommand* iComm, unsigned int iID){}
+	virtual void commandEntered(TMLCommand* iComm, ID iID){}
 	///Gets called when a transaction of the command is executed
 	/**
 	\param iComm Pointer to the command
 	\param iID ID of the event source
 	*/
-	virtual	void commandExecuted(TMLCommand* iComm, unsigned int iID){}
+	virtual	void commandExecuted(TMLCommand* iComm, ID iID){}
 	///Gets called when a the last transaction of the command is executed
 	/**
 	\param iComm Pointer to the command
 	\param iID ID of the event source
 	*/
-	virtual void commandFinished(TMLCommand* iComm, unsigned int iID){}
+	virtual void commandFinished(TMLCommand* iComm, ID iID){}
 	///Gets called when a the first transaction of the command is executed
 	/**
 	\param iComm Pointer to the command
 	\param iID ID of the event source
 	*/
-	virtual void commandStarted(TMLCommand* iComm, unsigned int iID){}
+	virtual void commandStarted(TMLCommand* iComm, ID iID){}
 	///Destructor
 	virtual ~CommandListener(){}
 protected:
diff --git a/simulators/c++2/src_simulator/evt/ListenersSimCmd.cpp b/simulators/c++2/src_simulator/evt/ListenersSimCmd.cpp
index 4f3be7bd649333aefce4d43e0124c3b0b9553742..071980564457dd7c6101ab3bf6346bd5d27d8e24 100644
--- a/simulators/c++2/src_simulator/evt/ListenersSimCmd.cpp
+++ b/simulators/c++2/src_simulator/evt/ListenersSimCmd.cpp
@@ -50,7 +50,7 @@ Ludovic Apvrille, Renaud Pacalet
 #define COND_SOURCE_FILE_NAME "newlib.c"
 #define COND_OBJ_FILE_NAME "newlib.o"
 
-unsigned int CondBreakpoint::_freeID=0;
+ID CondBreakpoint::_freeID=0;
 bool Breakpoint::_enabled=true;
 bool CondBreakpoint::_enabled=true;
 
@@ -67,7 +67,7 @@ RunXTransactions::~RunXTransactions(){
 }
 
 //void RunXTransactions::transExecuted(TMLTransaction* iTrans){
-void RunXTransactions::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void RunXTransactions::transExecuted(TMLTransaction* iTrans, ID iID){
 	_count++;
 	if (_count>=_transToExecute){
 		std::ostringstream aOut;
@@ -86,7 +86,7 @@ void RunXTransactions::setTransToExecute(unsigned int iTransToExecute){
 Breakpoint::Breakpoint(SimComponents* iSimComp):_simComp(iSimComp){
 }
 
-void Breakpoint::commandEntered(TMLCommand* iComm, unsigned int iID){
+void Breakpoint::commandEntered(TMLCommand* iComm, ID iID){
 	if (_enabled){
 		_simComp->setStopFlag(true, MSG_BREAKPOINT);
 		//return true;
@@ -163,7 +163,7 @@ CondBreakpoint::CondBreakpoint(SimComponents* iSimComp, std::string iCond, TMLTa
 	TMLCommand::registerGlobalListenerForType<TMLWaitCommand>(this, iTask);
 }
 
-void CondBreakpoint::commandFinished(TMLCommand* iComm, unsigned int iID){
+void CondBreakpoint::commandFinished(TMLCommand* iComm, ID iID){
 	if (_enabled && _condFunc!=0){
 		if ((*_condFunc)(_task)){
 			std::ostringstream aOut;
@@ -202,7 +202,7 @@ RunTillNextRandomChoice::RunTillNextRandomChoice(SimComponents* iSimComp):_simCo
 	TMLCommand::registerGlobalListenerForType<TMLChoiceCommand>(this,0);
 }
 
-void RunTillNextRandomChoice::commandEntered(TMLCommand* iComm, unsigned int iID){
+void RunTillNextRandomChoice::commandEntered(TMLCommand* iComm, ID iID){
 	TMLChoiceCommand* aChoice=dynamic_cast<TMLChoiceCommand*>(iComm);
 	if (_enabled && aChoice!=0 && aChoice->isNonDeterministic()){
 		_simComp->setStopFlag(true, MSG_RANDOMCHOICE);
@@ -225,7 +225,7 @@ RunXCommands::~RunXCommands(){
 	TMLCommand::removeGlobalListener(this);
 }
 
-void RunXCommands::commandFinished(TMLCommand* iComm, unsigned int iID){
+void RunXCommands::commandFinished(TMLCommand* iComm, ID iID){
 	_count++;
 	if (_count>=_commandsToExecute){
 		std::ostringstream aOut;
@@ -254,7 +254,7 @@ RunXTimeUnits::~RunXTimeUnits(){
 }
 
 //void RunXTimeUnits::transExecuted(TMLTransaction* iTrans){
-void RunXTimeUnits::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void RunXTimeUnits::transExecuted(TMLTransaction* iTrans, ID iID){
 	if (SchedulableDevice::getSimulatedTime()>=_endTime){
 		_simComp->setStopFlag(true, MSG_RUNXTIMEUNITS);
 		//return true;
@@ -276,7 +276,7 @@ RunTillTransOnDevice::~RunTillTransOnDevice(){
 }
 
 //void RunTillTransOnDevice::transExecuted(TMLTransaction* iTrans){
-void RunTillTransOnDevice::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void RunTillTransOnDevice::transExecuted(TMLTransaction* iTrans, ID iID){
 	_simComp->setStopFlag(true, MSG_TRANSONDEVICE);
 	//return true;
 }
@@ -292,7 +292,7 @@ RunTillTransOnTask::~RunTillTransOnTask(){
 }
 
 //void RunTillTransOnTask::transExecuted(TMLTransaction* iTrans){
-void RunTillTransOnTask::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void RunTillTransOnTask::transExecuted(TMLTransaction* iTrans, ID iID){
 	_simComp->setStopFlag(true, MSG_TRANSONTASK);
 	//return true;
 }
@@ -308,7 +308,7 @@ RunTillTransOnChannel::~RunTillTransOnChannel(){
 }
 
 //void RunTillTransOnChannel::transExecuted(TMLTransaction* iTrans){
-void RunTillTransOnChannel::transExecuted(TMLTransaction* iTrans, unsigned int iID){
+void RunTillTransOnChannel::transExecuted(TMLTransaction* iTrans, ID iID){
 	_simComp->setStopFlag(true, MSG_TRANSONCHANNEL);
 	//return true;
 }
diff --git a/simulators/c++2/src_simulator/evt/ListenersSimCmd.h b/simulators/c++2/src_simulator/evt/ListenersSimCmd.h
index 3b475e9a3e6291588b344e7c0748ed0937091dfa..a40cff8acd2aaa9ba99b9ba90df6a6f44adb2a4d 100644
--- a/simulators/c++2/src_simulator/evt/ListenersSimCmd.h
+++ b/simulators/c++2/src_simulator/evt/ListenersSimCmd.h
@@ -76,7 +76,7 @@ public:
 	RunXTransactions(SimComponents* iSimComp, unsigned int iTransToExecute);
 	///Destructor
 	virtual ~RunXTransactions();
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
 	///Sets the number of transactions to execute
 	/**
 	\param  iTransToExecute Number of transactions to execute
@@ -100,7 +100,7 @@ public:
 	\param iSimComp Pointer to a SimComponents object
 	*/
 	Breakpoint(SimComponents* iSimComp);
-	void commandEntered(TMLCommand* iComm, unsigned int iID);
+	void commandEntered(TMLCommand* iComm, ID iID);
 	///Enable/disable all breakpoints
 	/**
 	\param iEnabled true=enable, false=disable
@@ -127,7 +127,7 @@ public:
 	CondBreakpoint(SimComponents* iSimComp, std::string iCond, TMLTask* iTask);
 	///Destructor
 	~CondBreakpoint();
-	void commandFinished(TMLCommand* iComm, unsigned int iID);
+	void commandFinished(TMLCommand* iComm, ID iID);
 	///Enable/disable all conditional breakpoints
 	/**
 	\param iEnabled true=enable, false=disable
@@ -150,11 +150,11 @@ protected:
 	///Handle of shared library
 	void * _dlHandle;
 	///ID of the breakpoint
-	unsigned int _ID;
+	ID _ID;
 	///Task for which the condition is evaluated
 	TMLTask* _task;
 	///Keeps track of the IDs already in use
-	static unsigned int _freeID;
+	static ID _freeID;
 	///Flag indicating that the C source file has been created
 	bool _cSourceFileCreated;
 	///Flag indicating that the object file has been created
@@ -173,7 +173,7 @@ public:
 	\param iSimComp Pointer to a SimComponents object
 	*/
 	RunTillNextRandomChoice(SimComponents* iSimComp);
-	void commandEntered(TMLCommand* iComm, unsigned int iID);
+	void commandEntered(TMLCommand* iComm, ID iID);
 	///Enable/disable the Listener
 	/**
 	\param iEnabled true=enable, false=disable
@@ -199,7 +199,7 @@ public:
 	RunXCommands(SimComponents* iSimComp, unsigned int iCommandsToExecute);
 	///Destructor
 	virtual ~RunXCommands();
-	void commandFinished(TMLCommand* iComm, unsigned int iID);
+	void commandFinished(TMLCommand* iComm, ID iID);
 	///Sets the number of commands to execute
 	/**
 	\param  iCommandsToExecute Number of commands to execute
@@ -228,7 +228,7 @@ public:
 	RunXTimeUnits(SimComponents* iSimComp, TMLTime iEndTime);
 	///Destructor
 	virtual ~RunXTimeUnits();
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
 	///Sets the end time of the simulation
 	/**
 	\param  iEndTime End time of the simulation
@@ -255,7 +255,7 @@ public:
 	RunTillTransOnDevice(SimComponents* iSimComp, ListenerSubject<TransactionListener>* iSubject);
 	///Destructor
 	virtual ~RunTillTransOnDevice();
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
 protected:
 	///Pointer to a SimComponents object
 	SimComponents* _simComp;
@@ -276,7 +276,7 @@ public:
 	RunTillTransOnTask(SimComponents* iSimComp, ListenerSubject<TaskListener>* iSubject);
 	///Destructor
 	virtual ~RunTillTransOnTask();
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
 protected:
 	///Pointer to a SimComponents object
 	SimComponents* _simComp;
@@ -297,7 +297,7 @@ public:
 	RunTillTransOnChannel(SimComponents* iSimComp, ListenerSubject<ChannelListener>* iSubject);
 	///Destructor
 	virtual ~RunTillTransOnChannel();
-	void transExecuted(TMLTransaction* iTrans, unsigned int iID);
+	void transExecuted(TMLTransaction* iTrans, ID iID);
 protected:
 	///Pointer to a SimComponents object
 	SimComponents* _simComp;
diff --git a/simulators/c++2/src_simulator/evt/TaskListener.h b/simulators/c++2/src_simulator/evt/TaskListener.h
index a9be3a5a04498a3538e401e88073200c67fb7941..28b8e0afa414d1daf57159495346c34160ec2f38 100644
--- a/simulators/c++2/src_simulator/evt/TaskListener.h
+++ b/simulators/c++2/src_simulator/evt/TaskListener.h
@@ -54,20 +54,20 @@ public:
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void taskStarted(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void taskStarted(TMLTransaction* iTrans, ID iID){}
 	///Gets called when a task executes its last transaction
 	/**
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual	void taskFinished(TMLTransaction* iTrans, unsigned int iID){}
+	virtual	void taskFinished(TMLTransaction* iTrans, ID iID){}
 	///Destructor
 	///Gets called when a transaction is executed
 	/**
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void transExecuted(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void transExecuted(TMLTransaction* iTrans, ID iID){}
 	virtual ~TaskListener(){}
 protected:
 };
diff --git a/simulators/c++2/src_simulator/evt/TransactionListener.h b/simulators/c++2/src_simulator/evt/TransactionListener.h
index 51066bc578676f301bc278b382a29213c8775546..f3013f764cb4e48646fa6235ade2fac51aaaefee 100644
--- a/simulators/c++2/src_simulator/evt/TransactionListener.h
+++ b/simulators/c++2/src_simulator/evt/TransactionListener.h
@@ -51,7 +51,7 @@ public:
 	\param iTrans Pointer to the transaction
 	\param iID ID of the event source
 	*/
-	virtual void transExecuted(TMLTransaction* iTrans, unsigned int iID){}
+	virtual void transExecuted(TMLTransaction* iTrans, ID iID){}
 	/////Gets called when a transaction is scheduled
 	////**
 	//\param  iTrans Pointer to the transaction
diff --git a/simulators/c++2/src_simulator/sim/SimComponents.cpp b/simulators/c++2/src_simulator/sim/SimComponents.cpp
index 02b40ea6ecbd6ffd965ae9cf56e47d1ac847cf8a..42a61580a227400c76148e2c26eb75ee2423872f 100644
--- a/simulators/c++2/src_simulator/sim/SimComponents.cpp
+++ b/simulators/c++2/src_simulator/sim/SimComponents.cpp
@@ -180,7 +180,7 @@ void SimComponents::reset(){
 }
 
 SchedulableDevice* SimComponents::getCPUByName(const std::string& iCPU) const{
-	if (iCPU[0]>='0' && iCPU[0]<='9') return getCPUByID(StringToNum<unsigned int>(iCPU));
+	if (iCPU[0]>='0' && iCPU[0]<='9') return getCPUByID(StringToNum<ID>(iCPU));
 	for(SchedulingList::const_iterator i=_cpuList.begin(); i != _cpuList.end(); ++i){
 		if ((*i)->toString()==iCPU) return (*i);
 	}
@@ -188,7 +188,7 @@ SchedulableDevice* SimComponents::getCPUByName(const std::string& iCPU) const{
 }
 
 TMLTask* SimComponents::getTaskByName(const std::string& iTask) const{
-	if (iTask[0]>='0' && iTask[0]<='9') return getTaskByID(StringToNum<unsigned int>(iTask));
+	if (iTask[0]>='0' && iTask[0]<='9') return getTaskByID(StringToNum<ID>(iTask));
 	for(TaskList::const_iterator i=_taskList.begin(); i != _taskList.end(); ++i){
 		if ((*i)->toString()==iTask) return (*i);
 	}
@@ -196,7 +196,7 @@ TMLTask* SimComponents::getTaskByName(const std::string& iTask) const{
 }
 
 SchedulableCommDevice* SimComponents::getBusByName(const std::string& iBus) const{
-	if (iBus[0]>='0' && iBus[0]<='9') return getBusByID(StringToNum<unsigned int>(iBus));
+	if (iBus[0]>='0' && iBus[0]<='9') return getBusByID(StringToNum<ID>(iBus));
 	for(BusList::const_iterator i=_busList.begin(); i != _busList.end(); ++i){
 		if ((*i)->toString()==iBus) return (*i);
 	}
@@ -204,7 +204,7 @@ SchedulableCommDevice* SimComponents::getBusByName(const std::string& iBus) cons
 }
 
 Slave* SimComponents::getSlaveByName(const std::string& iSlave) const{
-	if (iSlave[0]>='0' && iSlave[0]<='9') return getSlaveByID(StringToNum<unsigned int>(iSlave));
+	if (iSlave[0]>='0' && iSlave[0]<='9') return getSlaveByID(StringToNum<ID>(iSlave));
 	for(SlaveList::const_iterator i=_slList.begin(); i != _slList.end(); ++i){
 		if ((*i)->toString()==iSlave) return (*i);
 	}
@@ -212,42 +212,42 @@ Slave* SimComponents::getSlaveByName(const std::string& iSlave) const{
 }
 
 TMLChannel* SimComponents::getChannelByName(const std::string& iChannel) const{
-	if (iChannel[0]>='0' && iChannel[0]<='9') return getChannelByID(StringToNum<unsigned int>(iChannel));
+	if (iChannel[0]>='0' && iChannel[0]<='9') return getChannelByID(StringToNum<ID>(iChannel));
 	for(ChannelList::const_iterator i=_channelList.begin(); i != _channelList.end(); ++i){
 		if ((*i)->toShortString()==iChannel) return (*i);
 	}
 	return NULL;
 }
 
-SchedulableDevice* SimComponents::getCPUByID(unsigned int iID) const{
+SchedulableDevice* SimComponents::getCPUByID(ID iID) const{
 	for(SchedulingList::const_iterator i=_cpuList.begin(); i != _cpuList.end(); ++i){
 		if ((*i)->getID()==iID) return (*i);
 	}
 	return NULL;
 }
 
-TMLTask* SimComponents::getTaskByID(unsigned int iID) const{
+TMLTask* SimComponents::getTaskByID(ID iID) const{
 	for(TaskList::const_iterator i=_taskList.begin(); i != _taskList.end(); ++i){
 		if ((*i)->getID()==iID) return (*i);
 	}
 	return NULL;
 }
 
-SchedulableCommDevice* SimComponents::getBusByID(unsigned int iID) const{
+SchedulableCommDevice* SimComponents::getBusByID(ID iID) const{
 	for(BusList::const_iterator i=_busList.begin(); i != _busList.end(); ++i){
 		if ((*i)->getID()==iID) return (*i);
 	}
 	return NULL;
 }
 
-Slave* SimComponents::getSlaveByID(unsigned int iID) const{
+Slave* SimComponents::getSlaveByID(ID iID) const{
 	for(SlaveList::const_iterator i=_slList.begin(); i != _slList.end(); ++i){
 		if ((*i)->getID()==iID) return (*i);
 	}
 	return NULL;
 }
 
-TMLChannel* SimComponents::getChannelByID(unsigned int iID) const{
+TMLChannel* SimComponents::getChannelByID(ID iID) const{
 	for(ChannelList::const_iterator i=_channelList.begin(); i != _channelList.end(); ++i){
 		if ((*i)->getID()==iID) return (*i);
 	}
@@ -263,7 +263,7 @@ TMLChoiceCommand* SimComponents::getCurrentChoiceCmd(){
 	return 0;
 }
 
-std::string SimComponents::getCmpNameByID(unsigned int iID){
+std::string SimComponents::getCmpNameByID(ID iID){
 	SchedulableDevice* aSched = getCPUByID(iID);
 	if (aSched!=0) return aSched->toString();
 	TMLTask* aTask = getTaskByID(iID);
diff --git a/simulators/c++2/src_simulator/sim/SimComponents.h b/simulators/c++2/src_simulator/sim/SimComponents.h
index f3ea03957670d61d723c047b1cce43044c9f5e77..7440f60283ee168c0d31a8ff96e406791af3b1c0 100644
--- a/simulators/c++2/src_simulator/sim/SimComponents.h
+++ b/simulators/c++2/src_simulator/sim/SimComponents.h
@@ -151,31 +151,31 @@ public:
 	\param iID ID of the CPU
 	\return Pointer to that CPU
 	*/
-	SchedulableDevice* getCPUByID(unsigned int iID) const;
+	SchedulableDevice* getCPUByID(ID iID) const;
 	///Searches for a Task based on its name
 	/**
 	\param iID ID of the Task
 	\return Pointer to that Task
 	*/
-	TMLTask* getTaskByID(unsigned int iID) const;
+	TMLTask* getTaskByID(ID iID) const;
 	///Searches for a Bus based on its name
 	/**
 	\param iID ID of the Bus
 	\return Pointer to that Bus
 	*/
-	SchedulableCommDevice* getBusByID(unsigned int iID) const;
+	SchedulableCommDevice* getBusByID(ID iID) const;
 	///Searches for a Slave based on its name
 	/**
 	\param iID ID of the Slave
 	\return Pointer to that Slave
 	*/
-	Slave* getSlaveByID(unsigned int iID) const;
+	Slave* getSlaveByID(ID iID) const;
 	///Searches for a Channel based on its name
 	/**
 	\param iID ID of the Channel
 	\return Pointer to that Channel
 	*/
-	TMLChannel* getChannelByID(unsigned int iID) const;
+	TMLChannel* getChannelByID(ID iID) const;
 	///Returns an iterator for the internal CPU list
 	/**
 	\param iEnd true for iterator pointing to the end of the list, false for iterator pointing to the first element
@@ -240,7 +240,7 @@ public:
 	*/
 	Simulator* getSimulator(){return _simulator;}
 	void setSimulator(Simulator* iSim){_simulator=iSim;}
-	std::string getCmpNameByID(unsigned int iID);
+	std::string getCmpNameByID(ID iID);
 	///Returns the hash value for the current task state
 	/**
 	\return Hash Value
diff --git a/simulators/c++2/src_simulator/sim/Simulator.cpp b/simulators/c++2/src_simulator/sim/Simulator.cpp
index 35954ba614ba3be93337b8b03681a74839bfdf00..9b0abb36d36461372e397f53b07d2408977372e4 100644
--- a/simulators/c++2/src_simulator/sim/Simulator.cpp
+++ b/simulators/c++2/src_simulator/sim/Simulator.cpp
@@ -101,7 +101,7 @@ void Simulator::schedule2Graph(std::string& iTraceFileName) const{
 			CPU* aCPU;
 			aTopElement = aQueue.top();
 			aCPU = aTopElement->getCommand()->getTask()->getCPU();
-			for (unsigned int a=0; a < aTopElement->getVirtualLength(); a++){
+			for (TMLLength a=0; a < aTopElement->getVirtualLength(); a++){
 				aOutp << "(" << aTransitionNo << ",\"i(" << aCPU->toString() << "__" << aTopElement->getCommand()->getTask()->toString() << "__" << aTopElement->getCommand()->getCommandStr();
 				if (aTopElement->getChannel()!=0){
 					aOutp << "__" << aTopElement->getChannel()->toShortString();
@@ -181,7 +181,7 @@ void Simulator::schedule2VCD(std::string& iTraceFileName) const{
 		TraceableDevice* actDevice;
 		TMLTime aTime=0, aCurrTime=-1;
 		SignalChangeData* aTopElement;
-		unsigned int aNextClockEvent=0;
+		TMLTime aNextClockEvent=0;
 		myfile << "$date\n" << asctime(aTimeinfo) << "$end\n\n$version\nDaniels TML simulator\n$end\n\n";
 		myfile << "$timescale\n1 ns\n$end\n\n$scope module Simulation $end\n";
 		std::cout << "Before 1st loop" << std::endl;
@@ -289,7 +289,7 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
 #endif
 		 cpuLET->schedule();
 		 unsigned int nbOfChannels = commandLET->getNbOfChannels();
-		 for (int i=0;i<nbOfChannels; i++){
+		 for (unsigned int i=0;i<nbOfChannels; i++){
 		 if ((depTask=commandLET->getDependentTask(i))==0) continue;
 		 //if (depTask!=0){
 #ifdef DEBUG_KERNEL
@@ -1025,12 +1025,12 @@ bool Simulator::runXCommands(unsigned int iCmds, TMLTransaction*& oLastTrans){
 	return test;
 }
 
-bool Simulator::runTillTimeX(unsigned int iTime, TMLTransaction*& oLastTrans){
+bool Simulator::runTillTimeX(TMLTime iTime, TMLTransaction*& oLastTrans){
 	RunXTimeUnits aListener(_simComp,iTime);
 	return simulate(oLastTrans);
 }
 
-bool Simulator::runXTimeUnits(unsigned int iTime, TMLTransaction*& oLastTrans){
+bool Simulator::runXTimeUnits(TMLTime iTime, TMLTransaction*& oLastTrans){
 	RunXTimeUnits aListener(_simComp,iTime+SchedulableDevice::getSimulatedTime());
 	return simulate(oLastTrans);
 }
@@ -1080,7 +1080,7 @@ bool Simulator::runUntilCondition(std::string& iCond, TMLTask* iTask, TMLTransac
 	if (oSuccess) return simulate(oLastTrans); else return false;
 }
 
-void Simulator::exploreTree(unsigned int iDepth, unsigned int iPrevID, std::ofstream& iFile){
+void Simulator::exploreTree(unsigned int iDepth, ID iPrevID, std::ofstream& iFile){
 /*std::ofstream myfile (iTraceFileName.c_str());
 	if (myfile.is_open()){
 		for(SchedulingList::const_iterator i=_simComp->getCPUIterator(false); i != _simComp->getCPUIterator(true); ++i){
@@ -1089,7 +1089,7 @@ void Simulator::exploreTree(unsigned int iDepth, unsigned int iPrevID, std::ofst
 		myfile.close();*/
 	TMLTransaction* aLastTrans;
 	if (iDepth<RECUR_DEPTH){
-		unsigned int aMyID= ++_leafsID;
+		ID aMyID= ++_leafsID;
 		bool aSimTerminated=false;
 		TMLChoiceCommand* aChoiceCmd;
 		do{
diff --git a/simulators/c++2/src_simulator/sim/Simulator.h b/simulators/c++2/src_simulator/sim/Simulator.h
index 192ee5901861f55cf72fad11ef8c97e69ced697e..72ba36a296560996f6dc0a2d1894b5e931127234 100644
--- a/simulators/c++2/src_simulator/sim/Simulator.h
+++ b/simulators/c++2/src_simulator/sim/Simulator.h
@@ -138,14 +138,14 @@ public:
 	\param oLastTrans Returns the last transaction executed during a simulation
 	\return Return value of simulate() function
 	*/
-	bool runTillTimeX(unsigned int iTime, TMLTransaction*& oLastTrans);
+	bool runTillTimeX(TMLTime iTime, TMLTransaction*& oLastTrans);
 	///Runs the simulation for iTime time units
 	/**
 	\param iTime Number of time units
 	\param oLastTrans Returns the last transaction executed during a simulation
 	\return Return value of simulate() function
 	*/
-	bool runXTimeUnits(unsigned int iTime, TMLTransaction*& oLastTrans);
+	bool runXTimeUnits(TMLTime iTime, TMLTransaction*& oLastTrans);
 	///Runs the simulation until a transaction on iBus is executed
 	/**
 	\param iBus Pointer to the bus
@@ -202,7 +202,7 @@ public:
 	\param iPrevID ID of the parent leaf
 	\param iFile Reference to the output file
 	*/
-	void exploreTree(unsigned int iDepth, unsigned int iPrevID, std::ofstream& iFile);
+	void exploreTree(unsigned int iDepth, ID iPrevID, std::ofstream& iFile);
 	///Writes a HTML representation of the schedule of CPUs and buses to an output file
 	void schedule2HTML(std::string& iTraceFileName) const;
 	///Writes simulation traces in VCD format to an output file