From 5fbb2f2a2b6448d99e223fa4f5098dad3f62631c Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Mon, 10 Jan 2022 10:03:55 +0100 Subject: [PATCH] add string representation of state --- include/cell.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/cell.h b/include/cell.h index 7ac7677..915a7b0 100644 --- a/include/cell.h +++ b/include/cell.h @@ -15,6 +15,19 @@ struct Cell WORKING }; + std::string stateString() const { + switch (state) { + case DISCONNECTED: + return "DISCONNECTED"; + case IDLE: + return "IDLE"; + case WORKING: + return "WORKING"; + default: + return "UNDEFINED"; + } + } + std::string id; Scene scene; State state = UNDEFINED; -- GitLab