fsfw/serviceinterface/ServiceInterfaceStream.cpp
Robin.Mueller 7259a13569 more improvements:
1. New optional flag to redirect print to stderr. THis can be useful on
host environemtns (e.g linux)
2. non-buffered mode if this flag is true: the preamble msut be printed
manually
2. Getter function for preamble for that case.
3. printChar function: specify whether to print to stderr or stdout
2020-06-03 23:14:17 +02:00

16 lines
444 B
C++

#include <framework/serviceinterface/ServiceInterfaceStream.h>
ServiceInterfaceStream::ServiceInterfaceStream(std::string setMessage,
bool errStream, bool addCrToPreamble, uint16_t port) :
std::ostream(&buf),
buf(setMessage, errStream, addCrToPreamble, port) {
}
void ServiceInterfaceStream::setActive( bool myActive) {
this->buf.isActive = myActive;
}
std::string ServiceInterfaceStream::getPreamble() {
return buf.getPreamble();
}