1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00
VILLASnode/common/lib/common.cpp
Steffen Vogel 310136c7cf update Steffens mail address
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 18:58:07 +01:00

46 lines
837 B
C++

/** Common code.
*
* @author Steffen Vogel <post@steffenvogel.de>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache License 2.0
*********************************************************************************/
#include <villas/common.hpp>
#include <cstdlib>
std::string stateToString(enum State s)
{
switch (s) {
case State::DESTROYED:
return "destroyed";
case State::INITIALIZED:
return "initialized";
case State::PARSED:
return "parsed";
case State::CHECKED:
return "checked";
case State::STARTED:
return "running";
case State::STOPPED:
return "stopped";
case State::PENDING_CONNECT:
return "pending-connect";
case State::CONNECTED:
return "connected";
case State::PAUSED:
return "paused";
default:
return "";
}
}