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 "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
inline Components stringToComponent(QString component)
|
|
|
|
{
|
|
|
|
component = component.toUpper();
|
2018-12-27 23:11:32 +01:00
|
|
|
if (component == "ALL") return COMP_ALL;
|
2016-08-11 07:13:55 +02:00
|
|
|
if (component == "SMOOTHING") return COMP_SMOOTHING;
|
|
|
|
if (component == "BLACKBORDER") return COMP_BLACKBORDER;
|
|
|
|
if (component == "FORWARDER") return COMP_FORWARDER;
|
|
|
|
if (component == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
|
|
|
|
if (component == "GRABBER") return COMP_GRABBER;
|
2016-08-31 00:54:47 +02:00
|
|
|
if (component == "V4L") return COMP_V4L;
|
2016-10-10 18:29:54 +02:00
|
|
|
if (component == "COLOR") return COMP_COLOR;
|
|
|
|
if (component == "EFFECT") return COMP_EFFECT;
|
2018-12-27 23:11:32 +01:00
|
|
|
if (component == "IMAGE") return COMP_IMAGE;
|
2017-03-21 17:55:46 +01:00
|
|
|
if (component == "LEDDEVICE") return COMP_LEDDEVICE;
|
2018-12-28 18:12:45 +01:00
|
|
|
if (component == "FLATBUFSERVER") return COMP_FLATBUFSERVER;
|
2019-02-17 15:26:11 +01:00
|
|
|
if (component == "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
|