checksum-oostubs adapted to ProtoStream (NOT TESTED)

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1303 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hellwig
2012-06-05 13:54:29 +00:00
parent 2ca3e84c64
commit b68a5c432e
2 changed files with 12 additions and 19 deletions

View File

@ -66,8 +66,8 @@ bool ChecksumOOStuBSExperiment::run()
tp.restrictMemoryAddresses(&mm);
// record trace
Trace trace;
tp.setTraceMessage(&trace);
std::ofstream of("trace.pb");
tp.setTraceFile(&of);
// this must be done *after* configuring the plugin:
sal::simulator.addFlow(&tp);
@ -94,14 +94,11 @@ bool ChecksumOOStuBSExperiment::run()
sal::simulator.removeFlow(&tp);
// serialize trace to file
char const *tracefile = "trace.pb";
std::ofstream of(tracefile);
if (of.fail()) {
log << "failed to write " << tracefile << endl;
sal::simulator.clearEvents(this);
return false;
}
trace.SerializeToOstream(&of);
of.close();
log << "trace written to " << tracefile << endl;