serialoutput: consistent plugin class naming
Change-Id: I8abe0cfdebecb0adc7229e29bd241da65b27105a
This commit is contained in:
26
src/plugins/serialoutput/SerialOutputLogger.cc
Normal file
26
src/plugins/serialoutput/SerialOutputLogger.cc
Normal file
@ -0,0 +1,26 @@
|
||||
#include "SerialOutputLogger.hpp"
|
||||
#include "sal/Listener.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace fail;
|
||||
|
||||
bool SerialOutputLogger::run()
|
||||
{
|
||||
IOPortListener ev_ioport(m_port, m_out);
|
||||
while (true) {
|
||||
simulator.addListener(&ev_ioport);
|
||||
simulator.resume();
|
||||
m_output += ev_ioport.getData();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SerialOutputLogger::resetOutput()
|
||||
{
|
||||
m_output.clear();
|
||||
}
|
||||
|
||||
string SerialOutputLogger::getOutput()
|
||||
{
|
||||
return m_output;
|
||||
}
|
||||
Reference in New Issue
Block a user