mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
The standalone visualiser functions.
This commit is contained in:
@@ -14,3 +14,18 @@ const std::string Sector::statusToString(Status status)
|
||||
default: return fmt::format("unknown error {}", status);
|
||||
}
|
||||
}
|
||||
|
||||
Sector::Status Sector::stringToStatus(const std::string& value)
|
||||
{
|
||||
if (value == "OK")
|
||||
return Status::OK;
|
||||
if (value == "bad checksum")
|
||||
return Status::BAD_CHECKSUM;
|
||||
if ((value == "sector not found") || (value == "MISSING"))
|
||||
return Status::MISSING;
|
||||
if (value == "present but no data found")
|
||||
return Status::DATA_MISSING;
|
||||
if (value == "conflicting data")
|
||||
return Status::CONFLICT;
|
||||
return Status::INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user