SerialOutput-plugin update
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1458 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "SerialOutput.hpp"
|
||||
|
||||
using namespace std;
|
||||
@ -8,16 +6,10 @@ using namespace fail;
|
||||
bool SerialOutput::run()
|
||||
{
|
||||
IOPortListener ev_ioport(m_port, m_out);
|
||||
BaseListener *ev;
|
||||
while (true) {
|
||||
simulator.addListener(&ev_ioport);
|
||||
ev = simulator.resume();
|
||||
simulator.removeListener(&ev_ioport);
|
||||
if (ev == &ev_ioport) {
|
||||
m_output += ev_ioport.getData();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
simulator.resume();
|
||||
m_output += ev_ioport.getData();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -30,10 +30,10 @@ public:
|
||||
*
|
||||
* @param port the port the listener is listening on
|
||||
* @param out Defines the direction of the listener.
|
||||
* \arg \c true Output on the given port is captured.
|
||||
* \arg \c true Output on the given port is captured. This is default.
|
||||
* \arg \c false Input on the given port is captured.
|
||||
*/
|
||||
SerialOutput(unsigned port, bool out) : m_out(out), m_port(port) { }
|
||||
SerialOutput(unsigned port, bool out = true) : m_out(out), m_port(port) { }
|
||||
bool run();
|
||||
/**
|
||||
* Resets the output variable which contains the traffic of
|
||||
|
||||
Reference in New Issue
Block a user