2016-08-04 13:10:53 +02:00
|
|
|
#pragma once
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <QString>
|
2016-08-04 13:10:53 +02:00
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
namespace hyperion
|
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
|
2016-08-04 13:10:53 +02:00
|
|
|
/**
|
|
|
|
* Enumeration of components in Hyperion.
|
|
|
|
*/
|
|
|
|
enum Components
|
|
|
|
{
|
2016-08-11 07:13:55 +02:00
|
|
|
COMP_INVALID,
|
2018-12-27 23:11:32 +01:00
|
|
|
COMP_ALL,
|
2016-08-11 07:13:55 +02:00
|
|
|
COMP_SMOOTHING,
|
|
|
|
COMP_BLACKBORDER,
|
|
|
|
COMP_FORWARDER,
|
|
|
|
COMP_BOBLIGHTSERVER,
|
2016-08-31 00:54:47 +02:00
|
|
|
COMP_GRABBER,
|
2016-10-10 18:29:54 +02:00
|
|
|
COMP_V4L,
|
|
|
|
COMP_COLOR,
|
2018-12-27 23:11:32 +01:00
|
|
|
COMP_IMAGE,
|
2017-03-01 15:23:53 +01:00
|
|
|
COMP_EFFECT,
|
2018-12-28 18:12:45 +01:00
|
|
|
COMP_LEDDEVICE,
|
2019-02-17 15:26:11 +01:00
|
|
|
COMP_FLATBUFSERVER,
|
|
|
|
COMP_PROTOSERVER
|
2016-08-04 13:10:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
inline const char* componentToString(Components c)
|
|
|
|
{
|
|
|
|
switch (c)
|
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
case COMP_ALL: return "Hyperion";
|
2016-08-11 07:13:55 +02:00
|
|
|
case COMP_SMOOTHING: return "Smoothing";
|
|
|
|
case COMP_BLACKBORDER: return "Blackborder detector";
|
|
|
|
case COMP_FORWARDER: return "Json/Proto forwarder";
|
|
|
|
case COMP_BOBLIGHTSERVER:return "Boblight server";
|
|
|
|
case COMP_GRABBER: return "Framegrabber";
|
2016-10-10 18:29:54 +02:00
|
|
|
case COMP_V4L: return "V4L capture device";
|
2017-01-10 19:58:41 +01:00
|
|
|
case COMP_COLOR: return "Solid color";
|
|
|
|
case COMP_EFFECT: return "Effect";
|
2018-12-27 23:11:32 +01:00
|
|
|
case COMP_IMAGE: return "Image";
|
2017-03-21 17:55:46 +01:00
|
|
|
case COMP_LEDDEVICE: return "LED device";
|
2019-02-17 15:26:11 +01:00
|
|
|
case COMP_FLATBUFSERVER: return "Image Receiver";
|
|
|
|
case COMP_PROTOSERVER: return "Proto Server";
|
2016-08-11 07:13:55 +02:00
|
|
|
default: return "";
|
2016-08-04 13:10:53 +02:00
|
|
|
}
|
2016-08-11 07:13:55 +02:00
|
|
|
}
|
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
inline const char* componentToIdString(Components c)
|
|
|
|
{
|
|
|
|
switch (c)
|
|
|
|
{
|
2018-12-27 23:11:32 +01:00
|
|
|
case COMP_ALL: return "ALL";
|
2016-09-07 20:10:37 +02:00
|
|
|
case COMP_SMOOTHING: return "SMOOTHING";
|
|
|
|
case COMP_BLACKBORDER: return "BLACKBORDER";
|
|
|
|
case COMP_FORWARDER: return "FORWARDER";
|
|
|
|
case COMP_BOBLIGHTSERVER:return "BOBLIGHTSERVER";
|
|
|
|
case COMP_GRABBER: return "GRABBER";
|
|
|
|
case COMP_V4L: return "V4L";
|
2016-10-10 18:29:54 +02:00
|
|
|
case COMP_COLOR: return "COLOR";
|
|
|
|
case COMP_EFFECT: return "EFFECT";
|
2018-12-27 23:11:32 +01:00
|
|
|
case COMP_IMAGE: return "IMAGE";
|
2017-03-21 17:55:46 +01:00
|
|
|
case COMP_LEDDEVICE: return "LEDDEVICE";
|
2018-12-28 18:12:45 +01:00
|
|
|
case COMP_FLATBUFSERVER: return "FLATBUFSERVER";
|
2019-02-17 15:26:11 +01:00
|
|
|
case COMP_PROTOSERVER: return "PROTOSERVER";
|
2016-09-07 20:10:37 +02:00
|
|
|
default: return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-08 23:12:43 +02:00
|
|
|
inline Components stringToComponent(const QString& component)
|
2016-08-11 07:13:55 +02:00
|
|
|
{
|
2020-08-08 23:12:43 +02:00
|
|
|
const QString cmp = component.toUpper();
|
|
|
|
if (cmp == "ALL") return COMP_ALL;
|
|
|
|
if (cmp == "SMOOTHING") return COMP_SMOOTHING;
|
|
|
|
if (cmp == "BLACKBORDER") return COMP_BLACKBORDER;
|
|
|
|
if (cmp == "FORWARDER") return COMP_FORWARDER;
|
|
|
|
if (cmp == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
|
|
|
|
if (cmp == "GRABBER") return COMP_GRABBER;
|
|
|
|
if (cmp == "V4L") return COMP_V4L;
|
|
|
|
if (cmp == "COLOR") return COMP_COLOR;
|
|
|
|
if (cmp == "EFFECT") return COMP_EFFECT;
|
|
|
|
if (cmp == "IMAGE") return COMP_IMAGE;
|
|
|
|
if (cmp == "LEDDEVICE") return COMP_LEDDEVICE;
|
|
|
|
if (cmp == "FLATBUFSERVER") return COMP_FLATBUFSERVER;
|
|
|
|
if (cmp == "PROTOSERVER") return COMP_PROTOSERVER;
|
2016-08-11 07:13:55 +02:00
|
|
|
return COMP_INVALID;
|
|
|
|
}
|
|
|
|
|
2020-05-25 21:51:11 +02:00
|
|
|
} // end of namespace
|