More work on the logger overhaul: the reader should be done now.

This commit is contained in:
David Given
2022-02-19 22:48:44 +01:00
parent 649b78611c
commit f2bdd1cc49
10 changed files with 331 additions and 203 deletions

View File

@@ -2,7 +2,7 @@
#include "sector.h"
#include "fmt/format.h"
const std::string Sector::statusToString(Status status)
std::string Sector::statusToString(Status status)
{
switch (status)
{
@@ -15,6 +15,19 @@ const std::string Sector::statusToString(Status status)
}
}
std::string Sector::statusToChar(Status status)
{
switch (status)
{
case Status::OK: return "";
case Status::MISSING: return "?";
case Status::BAD_CHECKSUM: return "!";
case Status::DATA_MISSING: return "!";
case Status::CONFLICT: return "*";
default: return "?";
}
}
Sector::Status Sector::stringToStatus(const std::string& value)
{
if (value == "OK")