fsfw-example-common/example/test/testFmt.cpp

20 lines
715 B
C++
Raw Normal View History

2022-05-09 00:09:39 +02:00
#include "fsfw/serviceinterface/fmtWrapper.h"
2022-05-08 02:06:29 +02:00
void fmtTests() {
2022-05-09 00:09:39 +02:00
sif::initialize();
2022-05-09 01:28:41 +02:00
sif::debug_s(__FILENAME__, __LINE__, "Hello {}", "World\n");
sif::debug_st(__FILENAME__, __LINE__, "Hallo\n");
2022-05-09 01:14:53 +02:00
FSFW_LOGD("{}", "Hallo\n");
2022-05-09 00:09:39 +02:00
sif::info_t("Hallo\n");
sif::info("Hallo\n");
2022-05-09 00:12:25 +02:00
sif::warning_s(__FILENAME__, __LINE__, "Hello\n");
sif::warning_st(__FILENAME__, __LINE__, "Hello\n");
2022-05-09 01:14:53 +02:00
FSFW_LOGW("Hello World\n");
FSFW_LOGW("{} World\n", "Hello");
uint8_t test0 = 5;
float test1 = 12.0;
uint32_t test2 = 0x00ff11ff;
FSFW_LOGW("Test 0 {} | Test 1 {:.3f} | Test 2 {:#010x}\n", test0, test1, test2);
2022-05-09 00:12:25 +02:00
sif::error_s(__FILENAME__, __LINE__, "Hello\n");
sif::error_st(__FILENAME__, __LINE__, "Hello\n");
2022-05-08 02:06:29 +02:00
}