diff --git a/simulators/c++2/src_simulator/TMLTransaction.cpp b/simulators/c++2/src_simulator/TMLTransaction.cpp index 40c25c5bc51e3ffd36ab6afccde9c95aea45da61..a0fcf7f9d5e1ebca338a10f2749f466f0904e846 100755 --- a/simulators/c++2/src_simulator/TMLTransaction.cpp +++ b/simulators/c++2/src_simulator/TMLTransaction.cpp @@ -79,3 +79,7 @@ std::string TMLTransaction::toShortString() const{ } +void toXML(std::ostringstream& glob, int deviceID, std::string deviceNAME) const { + +} + diff --git a/simulators/c++2/src_simulator/TMLTransaction.h b/simulators/c++2/src_simulator/TMLTransaction.h index 1c2e52b647ee105a9d9542f5200d651254a41de4..d349ccadd9d72fc4547264f21fa476e6f0cadecf 100644 --- a/simulators/c++2/src_simulator/TMLTransaction.h +++ b/simulators/c++2/src_simulator/TMLTransaction.h @@ -226,6 +226,9 @@ public: inline static void resetID() {_ID=1;} inline void setStateID(ID iID) {_stateID=iID;} inline ID getStateID() {return _stateID;} + + void toXML(std::ostringstream& glob, int deviceID, std::string deviceNAME) const; + protected: ///Time when the transaction became runnable TMLTime _runnableTime; diff --git a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp index 8963e0947c6cd6a4b1c03beac399c1b8bfbf63c7..7cdce1382dd4b604f525cc39bd38ec1150e65878 100644 --- a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp +++ b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp @@ -315,6 +315,9 @@ std::string SingleCoreCPU::toShortString() const{ return outp.str(); } + + + void SingleCoreCPU::schedule2HTML(std::ofstream& myfile) const{ TMLTime aCurrTime=0; TMLTransaction* aCurrTrans; @@ -397,6 +400,13 @@ void SingleCoreCPU::schedule2TXT(std::ofstream& myfile) const{ } } + +void allTrans2XML(std::ostringstream& glob) const { + for(TransactionList::const_iterator i=_transactList.begin(); i != _transactList.end(); ++i){ + (*i)->toXML(glob, 0, _name); + } +} + //TMLTime SingleCoreCPU::getNextSignalChange(bool iInit, std::string& oSigChange, bool& oNoMoreTrans){ void SingleCoreCPU::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ //new (oSigData) SignalChangeData(RUNNING, aCurrTrans->getStartTimeOperation(), this); diff --git a/simulators/c++2/src_simulator/arch/SingleCoreCPU.h b/simulators/c++2/src_simulator/arch/SingleCoreCPU.h index ee6c40f3039d861919d4970231e6280515565903..abdb37bae301dcf4056cbc1167b09a8a7aa18f1d 100644 --- a/simulators/c++2/src_simulator/arch/SingleCoreCPU.h +++ b/simulators/c++2/src_simulator/arch/SingleCoreCPU.h @@ -118,6 +118,13 @@ public: std::ostream& writeObject(std::ostream &os); protected: ///Truncates the next transaction at time iTime + + /** + \param glob refers to the output stream + */ + void allTrans2XML(std::ostringstream& glob) const; + + /** \param iTime Indicates at what time the transaction should be truncated */ diff --git a/simulators/c++2/src_simulator/sim/Simulator.cpp b/simulators/c++2/src_simulator/sim/Simulator.cpp index 44112a8858f5b6d6a2bfd14be7824468b339a373..f7338db5911f59a2a079f7a223980c424de1f386 100644 --- a/simulators/c++2/src_simulator/sim/Simulator.cpp +++ b/simulators/c++2/src_simulator/sim/Simulator.cpp @@ -217,7 +217,13 @@ void Simulator::schedule2TXT(std::string& iTraceFileName) const{ void Simulator::allTrans2XML(std::ostringstream& glob) const{ glob << TAG_TRANSo << "Transaction" << TAG_TRANSc << std::endl; + for(CPUList::const_iterator i=_simComp->getCPUList().begin(); i != _simComp->getCPUList().end(); ++i){ + (*i)->allTrans2XML(myfile); + } + for(BusList::const_iterator j=_simComp->getBusList().begin(); j != _simComp->getBusList().end(); ++j){ + (*j)->allTrans2XML(myfile); + } }