2021-07-13 20:22:54 +02:00
|
|
|
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2021-01-03 14:16:52 +01:00
|
|
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
2021-01-03 14:08:40 +01:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
ServiceInterfaceStream::ServiceInterfaceStream(std::string setMessage, bool addCrToPreamble,
|
|
|
|
bool buffered, bool errStream, uint16_t port)
|
|
|
|
: std::ostream(&streambuf), streambuf(setMessage, addCrToPreamble, buffered, errStream, port) {}
|
2020-06-03 23:14:17 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
void ServiceInterfaceStream::setActive(bool myActive) { this->streambuf.isActive = myActive; }
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
std::string* ServiceInterfaceStream::getPreamble() { return streambuf.getPreamble(); }
|
2020-06-04 14:08:26 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
bool ServiceInterfaceStream::crAdditionEnabled() const { return streambuf.crAdditionEnabled(); }
|
2021-01-15 18:07:32 +01:00
|
|
|
|
2021-07-24 07:15:24 +02:00
|
|
|
#if FSFW_COLORED_OUTPUT == 1
|
2021-06-11 15:05:43 +02:00
|
|
|
void ServiceInterfaceStream::setAsciiColorPrefix(std::string asciiColorCode) {
|
2022-02-02 10:29:30 +01:00
|
|
|
streambuf.setAsciiColorPrefix(asciiColorCode);
|
2021-06-11 14:52:09 +02:00
|
|
|
}
|
2021-07-24 07:15:24 +02:00
|
|
|
#endif
|
2021-06-11 14:52:09 +02:00
|
|
|
|
2021-01-03 14:08:40 +01:00
|
|
|
#endif
|